Re: [PATCH] MMC: omap_hsmmc: enable interface clock before calling mmc_host_enable()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Dec 7, 2010 at 5:27 PM, Paul Walmsley <paul@xxxxxxxxx> wrote:
>
> In the OMAP HSMMC driver, the code path entered via mmc_host_enable() can
> include register accesses to the HSMMC IP block.  For this to work, both
> the device interface clock and functional clock need to be enabled before
> mmc_host_enable() is called.  However, omap_hsmmc_probe() calls
> mmc_host_enable() before enabling the device interface clock.  This can
> crash the kernel with:
>
> Unhandled fault: external abort on non-linefetch (0x1028) at 0xfa09c014
>
> Fix by calling mmc_host_enable() after the device interface clock is
> enabled.
>
> Signed-off-by: Paul Walmsley <paul@xxxxxxxxx>
> Cc: Madhusudhan Chikkature Rajashekar <madhu.cr@xxxxxx>
> Cc: Adrian Hunter <adrian.hunter@xxxxxxxxx>
> Cc: Kishore Kadiyala <kishore.kadiyala@xxxxxx>
> Cc: Tero Kristo <Tero.Kristo@xxxxxxxxx>
> ---
Acked-by: Madhusudhan Chikkature <madhu.cr@xxxxxx>

>  drivers/mmc/host/omap_hsmmc.c |    6 +++---
>  1 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
> index 5d46021..58a2c5e 100644
> --- a/drivers/mmc/host/omap_hsmmc.c
> +++ b/drivers/mmc/host/omap_hsmmc.c
> @@ -2101,14 +2101,14 @@ static int __init omap_hsmmc_probe(struct platform_device *pdev)
>        /* we start off in DISABLED state */
>        host->dpm_state = DISABLED;
>
> -       if (mmc_host_enable(host->mmc) != 0) {
> +       if (clk_enable(host->iclk) != 0) {
>                clk_put(host->iclk);
>                clk_put(host->fclk);
>                goto err1;
>        }
>
> -       if (clk_enable(host->iclk) != 0) {
> -               mmc_host_disable(host->mmc);
> +       if (mmc_host_enable(host->mmc) != 0) {
> +               clk_disable(host->iclk);
>                clk_put(host->iclk);
>                clk_put(host->fclk);
>                goto err1;
> --
> 1.7.2.3
>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux