mmc: bring back partition init for non-DM MMC drivers
authorAndre Przywara <andre.przywara@arm.com>
Mon, 17 Dec 2018 10:05:45 +0000 (10:05 +0000)
committerTom Rini <trini@konsulko.com>
Wed, 9 Jan 2019 12:13:30 +0000 (07:13 -0500)
Commit d0851c893706 ("blk: Call part_init() in the post_probe() method")
removed the call to part_init() in mmc.c, as this is done by the DM_MMC
framework.
However Allwinner is (still) relying on a non-DM MMC driver, so we are
now missing the implicit partition init, leading to failing MMC accesses
due to the missing partition information.

Bring the call back just for non-DM MMC driver to fix this regression.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Soeren Moch <smoch@web.de>
drivers/mmc/mmc.c

index f5c821e308cba8331a8109a3e109cbf79c8ebfb9..d8581271321228d0634cdec5e5df31ffcc922a6c 100644 (file)
@@ -2449,6 +2449,10 @@ static int mmc_startup(struct mmc *mmc)
        bdesc->revision[0] = 0;
 #endif
 
+#if !defined(CONFIG_DM_MMC) && (!defined(CONFIG_SPL_BUILD) || defined(CONFIG_SPL_LIBDISK_SUPPORT))
+       part_init(bdesc);
+#endif
+
        return 0;
 }