Skip to content

Commit

Permalink
mmc: omap: Fix broken reg_shift initialization
Browse files Browse the repository at this point in the history
Commit fa55018 (mmc: core: Prevent eMMC VCC supply to be cut from late init)
slightly affected timings for how things are done for the omap MMC driver
causing the MMC cards not getting detected any longer.

Turns out this was caused by buggy reg_shift initialization in the omap
MMC driver that was happening after mmc_add_host() was being called.

Fix this by initializing reg_shift before mmc_add_host() is called.

Signed-off-by: Tony Lindgren <tony@atomide.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
  • Loading branch information
Tony Lindgren authored and Chris Ball committed Jun 6, 2012
1 parent 3caf414 commit ebbe6f8
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/mmc/host/omap.c
Original file line number Diff line number Diff line change
Expand Up @@ -1485,6 +1485,7 @@ static int __devinit mmc_omap_probe(struct platform_device *pdev)
}

host->nr_slots = pdata->nr_slots;
host->reg_shift = (cpu_is_omap7xx() ? 1 : 2);

host->mmc_omap_wq = alloc_workqueue("mmc_omap", 0, 0);
if (!host->mmc_omap_wq)
Expand All @@ -1500,8 +1501,6 @@ static int __devinit mmc_omap_probe(struct platform_device *pdev)
}
}

host->reg_shift = (cpu_is_omap7xx() ? 1 : 2);

return 0;

err_destroy_wq:
Expand Down

0 comments on commit ebbe6f8

Please sign in to comment.