diff mbox series

[1/2] mmc: update guard for legacy part_init() call

Message ID faa9691528835dce9733dcfd1c1a8f20d13fa0bb.1580585717.git.tommyhebb@gmail.com
State New
Headers show
Series [1/2] mmc: update guard for legacy part_init() call | expand

Commit Message

Thomas Hebb Feb. 1, 2020, 7:35 p.m. UTC
commit eef05fd3ba68 ("mmc: bring back partition init for non-DM MMC
drivers") added this call to support drivers not yet migrated to driver
model. Slightly previously, however, commit 91ff6865629c ("blk: Rework
guard around part_init call") had removed the last reference in the code
to SPL_LIBDISK_SUPPORT, replacing it with a non-stage-specific check for
CONFIG_PARTITIONS and CONFIG_HAVE_BLOCK_DEVICE. Make that same change to
the guard here.

Signed-off-by: Thomas Hebb <tommyhebb at gmail.com>
---

 drivers/mmc/mmc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Tom Rini Feb. 11, 2020, 3:13 a.m. UTC | #1
On Sat, Feb 01, 2020 at 11:35:37AM -0800, Thomas Hebb wrote:

> commit eef05fd3ba68 ("mmc: bring back partition init for non-DM MMC
> drivers") added this call to support drivers not yet migrated to driver
> model. Slightly previously, however, commit 91ff6865629c ("blk: Rework
> guard around part_init call") had removed the last reference in the code
> to SPL_LIBDISK_SUPPORT, replacing it with a non-stage-specific check for
> CONFIG_PARTITIONS and CONFIG_HAVE_BLOCK_DEVICE. Make that same change to
> the guard here.
> 
> Signed-off-by: Thomas Hebb <tommyhebb at gmail.com>

This breaks a large number of platforms including T1024QDS_SDCARD.
Thomas Hebb Feb. 11, 2020, 5:10 a.m. UTC | #2
On Mon, Feb 10, 2020, 19:13 Tom Rini <trini at konsulko.com> wrote:

> On Sat, Feb 01, 2020 at 11:35:37AM -0800, Thomas Hebb wrote:
>
> > commit eef05fd3ba68 ("mmc: bring back partition init for non-DM MMC
> > drivers") added this call to support drivers not yet migrated to driver
> > model. Slightly previously, however, commit 91ff6865629c ("blk: Rework
> > guard around part_init call") had removed the last reference in the code
> > to SPL_LIBDISK_SUPPORT, replacing it with a non-stage-specific check for
> > CONFIG_PARTITIONS and CONFIG_HAVE_BLOCK_DEVICE. Make that same change to
> > the guard here.
> >
> > Signed-off-by: Thomas Hebb <tommyhebb at gmail.com>
>
> This breaks a large number of platforms including T1024QDS_SDCARD.
>

Thanks for the catch! Absolutely my fault for not testing on all platforms.
I'll figure out what I missed and send a v2 next week.


> --
> Tom
>
diff mbox series

Patch

diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c
index d43983d4a6..e0720318a9 100644
--- a/drivers/mmc/mmc.c
+++ b/drivers/mmc/mmc.c
@@ -2617,7 +2617,7 @@  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))
+#if !defined(CONFIG_DM_MMC) && (defined(CONFIG_PARTITIONS) && defined(CONFIG_HAVE_BLOCK_DEVICE))
 	part_init(bdesc);
 #endif