diff mbox series

[U-Boot,2/2] mmc: bring back partition init for non-DM MMC drivers

Message ID 20181217100545.28369-3-andre.przywara@arm.com
State Accepted
Commit eef05fd3ba68220156f33ffe6a9e68e42a6a5b53
Delegated to: Tom Rini
Headers show
Series mmc: Fix partition table init regression | expand

Commit Message

Andre Przywara Dec. 17, 2018, 10:05 a.m. UTC
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>
---
 drivers/mmc/mmc.c | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Simon Glass Jan. 5, 2019, 1:56 a.m. UTC | #1
kOn Mon, 17 Dec 2018 at 03:07, Andre Przywara <andre.przywara@arm.com> wrote:
>
> 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>
> ---
>  drivers/mmc/mmc.c | 4 ++++
>  1 file changed, 4 insertions(+)

Reviewed-by: Simon Glass <sjg@chromium.org>
Sören Moch Jan. 5, 2019, 5:31 p.m. UTC | #2
On 05.01.19 02:56, Simon Glass wrote:
> kOn Mon, 17 Dec 2018 at 03:07, Andre Przywara <andre.przywara@arm.com> wrote:
>> 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>
>> ---
>>  drivers/mmc/mmc.c | 4 ++++
>>  1 file changed, 4 insertions(+)
> Reviewed-by: Simon Glass <sjg@chromium.org>

This also fixes MMC support on a tbs2910 board.

Tested-by: Soeren Moch <smoch@web.de>

Thanks,
Soeren
Petr Štetiar Jan. 5, 2019, 10:22 p.m. UTC | #3
Soeren Moch <smoch@web.de> [2019-01-05 18:31:09]:

> This also fixes MMC support on a tbs2910 board.

And also for Apalis board with i.MX6[1]. Thanks Andre!

 Tested-by: Petr Štetiar <ynezz@true.cz>

1. https://lists.denx.de/pipermail/u-boot/2018-December/352210.html

-- ynezz
Tom Rini Jan. 9, 2019, 3:44 a.m. UTC | #4
On Mon, Dec 17, 2018 at 10:05:45AM +0000, Andre Przywara wrote:

> 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 | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c
> index f5c821e308..d858127132 100644
> --- a/drivers/mmc/mmc.c
> +++ b/drivers/mmc/mmc.c
> @@ -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;
>  }

So, this pushes pine_h64 over the limit:
https://travis-ci.org/trini/u-boot/jobs/477078336
Andre Przywara Jan. 9, 2019, 9:03 a.m. UTC | #5
On 09/01/2019 03:44, Tom Rini wrote:
> On Mon, Dec 17, 2018 at 10:05:45AM +0000, Andre Przywara wrote:
> 
>> 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 | 4 ++++
>>  1 file changed, 4 insertions(+)
>>
>> diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c
>> index f5c821e308..d858127132 100644
>> --- a/drivers/mmc/mmc.c
>> +++ b/drivers/mmc/mmc.c
>> @@ -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;
>>  }
> 
> So, this pushes pine_h64 over the limit:
> https://travis-ci.org/trini/u-boot/jobs/477078336

It seems you are missing patch 1/2?
https://lists.denx.de/pipermail/u-boot/2018-December/352283.html
(sunxi: drop default SPL_LIBDISK_SUPPORT enablement)

I put this one in for exactly this reason.

I have some other cleanups which reduce the H6 SPL size by 2K, will send
them out shortly.

Cheers,
Andre.
Tom Rini Jan. 9, 2019, 12:11 p.m. UTC | #6
On Wed, Jan 09, 2019 at 09:03:19AM +0000, André Przywara wrote:
> On 09/01/2019 03:44, Tom Rini wrote:
> > On Mon, Dec 17, 2018 at 10:05:45AM +0000, Andre Przywara wrote:
> > 
> >> 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 | 4 ++++
> >>  1 file changed, 4 insertions(+)
> >>
> >> diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c
> >> index f5c821e308..d858127132 100644
> >> --- a/drivers/mmc/mmc.c
> >> +++ b/drivers/mmc/mmc.c
> >> @@ -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;
> >>  }
> > 
> > So, this pushes pine_h64 over the limit:
> > https://travis-ci.org/trini/u-boot/jobs/477078336
> 
> It seems you are missing patch 1/2?
> https://lists.denx.de/pipermail/u-boot/2018-December/352283.html
> (sunxi: drop default SPL_LIBDISK_SUPPORT enablement)
> 
> I put this one in for exactly this reason.
> 
> I have some other cleanups which reduce the H6 SPL size by 2K, will send
> them out shortly.

Thanks, I don't know why I thought that was in already.
Tom Rini Jan. 10, 2019, 2:30 a.m. UTC | #7
On Mon, Dec 17, 2018 at 10:05:45AM +0000, Andre Przywara wrote:

> 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>

Applied to u-boot/master, thanks!
diff mbox series

Patch

diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c
index f5c821e308..d858127132 100644
--- a/drivers/mmc/mmc.c
+++ b/drivers/mmc/mmc.c
@@ -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;
 }