mbox series

[u-boot,0/4] mmc: Explain and cleanup partition selection

Message ID 20230413211057.10975-1-pali@kernel.org
Headers show
Series mmc: Explain and cleanup partition selection | expand

Message

Pali Rohár April 13, 2023, 9:10 p.m. UTC
Some people do not want to read review comments in emails. So put
comments and explanation into the source code itself; make emmc
partition selection code more explicit and validate configuration in
bubt command.

Pali Rohár (4):
  mmc: spl: Make partition choice in
    default_spl_mmc_emmc_boot_partition() more explicit
  cmd: mvebu/bubt: Validate EXT_CSD[179] eMMC register in
    mmc_burn_image()
  sunxi: eMMC: Add comments explaining mapping between bootpart and
    mmc_switch_part()
  board: purism: Use U-Boot mmc function for converting boot part to
    part access

 arch/arm/mach-sunxi/board.c    | 12 ++++++++++-
 board/purism/librem5/librem5.c |  6 +-----
 cmd/mvebu/bubt.c               | 24 +++++++++++++++++++--
 common/spl/spl_mmc.c           | 38 +++++++++++++++++++++++++++-------
 4 files changed, 64 insertions(+), 16 deletions(-)

Comments

Jaehoon Chung July 3, 2023, 12:16 p.m. UTC | #1
Hi,

On 4/14/23 06:10, Pali Rohár wrote:
> Some people do not want to read review comments in emails. So put
> comments and explanation into the source code itself; make emmc
> partition selection code more explicit and validate configuration in
> bubt command.

Sorry for too late. 
After applied this patch-set, some board are failed with spl's size overflowed 

The below is one of failed log.

+arm-linux-gnueabi-ld.bfd: region `.sram' overflowed by 352 bytes
+make[2]: *** [scripts/Makefile.spl:527: spl/u-boot-spl] Error 1
+make[1]: *** [Makefile:2049: spl/u-boot-spl] Error 2


Best Regards,
Jaehoon Chung

> 
> Pali Rohár (4):
>   mmc: spl: Make partition choice in
>     default_spl_mmc_emmc_boot_partition() more explicit
>   cmd: mvebu/bubt: Validate EXT_CSD[179] eMMC register in
>     mmc_burn_image()
>   sunxi: eMMC: Add comments explaining mapping between bootpart and
>     mmc_switch_part()
>   board: purism: Use U-Boot mmc function for converting boot part to
>     part access
> 
>  arch/arm/mach-sunxi/board.c    | 12 ++++++++++-
>  board/purism/librem5/librem5.c |  6 +-----
>  cmd/mvebu/bubt.c               | 24 +++++++++++++++++++--
>  common/spl/spl_mmc.c           | 38 +++++++++++++++++++++++++++-------
>  4 files changed, 64 insertions(+), 16 deletions(-)
Pali Rohár July 6, 2023, 10:50 a.m. UTC | #2
On Monday 03 July 2023 21:16:37 Jaehoon Chung wrote:
> Hi,
> 
> On 4/14/23 06:10, Pali Rohár wrote:
> > Some people do not want to read review comments in emails. So put
> > comments and explanation into the source code itself; make emmc
> > partition selection code more explicit and validate configuration in
> > bubt command.
> 
> Sorry for too late. 
> After applied this patch-set, some board are failed with spl's size overflowed 
> 
> The below is one of failed log.
> 
> +arm-linux-gnueabi-ld.bfd: region `.sram' overflowed by 352 bytes
> +make[2]: *** [scripts/Makefile.spl:527: spl/u-boot-spl] Error 1
> +make[1]: *** [Makefile:2049: spl/u-boot-spl] Error 2

Crap, and again we have there same issue. Patch after months does not
apply anymore. And resending the patch would again result in the same
problem that it would not apply anymore after half of the year...


Anyway, only first patch is SPL specific, other should apply without any
problem.

> 
> Best Regards,
> Jaehoon Chung
> 
> > 
> > Pali Rohár (4):
> >   mmc: spl: Make partition choice in
> >     default_spl_mmc_emmc_boot_partition() more explicit
> >   cmd: mvebu/bubt: Validate EXT_CSD[179] eMMC register in
> >     mmc_burn_image()
> >   sunxi: eMMC: Add comments explaining mapping between bootpart and
> >     mmc_switch_part()
> >   board: purism: Use U-Boot mmc function for converting boot part to
> >     part access
> > 
> >  arch/arm/mach-sunxi/board.c    | 12 ++++++++++-
> >  board/purism/librem5/librem5.c |  6 +-----
> >  cmd/mvebu/bubt.c               | 24 +++++++++++++++++++--
> >  common/spl/spl_mmc.c           | 38 +++++++++++++++++++++++++++-------
> >  4 files changed, 64 insertions(+), 16 deletions(-)
>
Pali Rohár July 6, 2023, 5:39 p.m. UTC | #3
On Thursday 06 July 2023 12:50:34 Pali Rohár wrote:
> On Monday 03 July 2023 21:16:37 Jaehoon Chung wrote:
> > Hi,
> > 
> > On 4/14/23 06:10, Pali Rohár wrote:
> > > Some people do not want to read review comments in emails. So put
> > > comments and explanation into the source code itself; make emmc
> > > partition selection code more explicit and validate configuration in
> > > bubt command.
> > 
> > Sorry for too late. 
> > After applied this patch-set, some board are failed with spl's size overflowed 
> > 
> > The below is one of failed log.
> > 
> > +arm-linux-gnueabi-ld.bfd: region `.sram' overflowed by 352 bytes
> > +make[2]: *** [scripts/Makefile.spl:527: spl/u-boot-spl] Error 1
> > +make[1]: *** [Makefile:2049: spl/u-boot-spl] Error 2
> 
> Crap, and again we have there same issue. Patch after months does not
> apply anymore. And resending the patch would again result in the same
> problem that it would not apply anymore after half of the year...

Here is v2 patch with simple fix for that platform:
https://patchwork.ozlabs.org/project/uboot/patch/20230706173502.2796-1-pali@kernel.org/

And it passed _now_ CI pipeline:
https://github.com/u-boot/u-boot/pull/340

> 
> Anyway, only first patch is SPL specific, other should apply without any
> problem.
> 
> > 
> > Best Regards,
> > Jaehoon Chung
> > 
> > > 
> > > Pali Rohár (4):
> > >   mmc: spl: Make partition choice in
> > >     default_spl_mmc_emmc_boot_partition() more explicit
> > >   cmd: mvebu/bubt: Validate EXT_CSD[179] eMMC register in
> > >     mmc_burn_image()
> > >   sunxi: eMMC: Add comments explaining mapping between bootpart and
> > >     mmc_switch_part()
> > >   board: purism: Use U-Boot mmc function for converting boot part to
> > >     part access
> > > 
> > >  arch/arm/mach-sunxi/board.c    | 12 ++++++++++-
> > >  board/purism/librem5/librem5.c |  6 +-----
> > >  cmd/mvebu/bubt.c               | 24 +++++++++++++++++++--
> > >  common/spl/spl_mmc.c           | 38 +++++++++++++++++++++++++++-------
> > >  4 files changed, 64 insertions(+), 16 deletions(-)
> >
Jaehoon Chung July 6, 2023, 10:53 p.m. UTC | #4
Hi

> -----Original Message-----
> From: Pali Rohár <pali@kernel.org>
> Sent: Friday, July 7, 2023 2:39 AM
> To: Jaehoon Chung <jh80.chung@samsung.com>; Tom Rini <trini@konsulko.com>
> Cc: Peng Fan <peng.fan@nxp.com>; Stefan Roese <sr@denx.de>; u-boot@lists.denx.de
> Subject: Re: [PATCH u-boot 0/4] mmc: Explain and cleanup partition selection
> 
> On Thursday 06 July 2023 12:50:34 Pali Rohár wrote:
> > On Monday 03 July 2023 21:16:37 Jaehoon Chung wrote:
> > > Hi,
> > >
> > > On 4/14/23 06:10, Pali Rohár wrote:
> > > > Some people do not want to read review comments in emails. So put
> > > > comments and explanation into the source code itself; make emmc
> > > > partition selection code more explicit and validate configuration in
> > > > bubt command.
> > >
> > > Sorry for too late.
> > > After applied this patch-set, some board are failed with spl's size overflowed
> > >
> > > The below is one of failed log.
> > >
> > > +arm-linux-gnueabi-ld.bfd: region `.sram' overflowed by 352 bytes
> > > +make[2]: *** [scripts/Makefile.spl:527: spl/u-boot-spl] Error 1
> > > +make[1]: *** [Makefile:2049: spl/u-boot-spl] Error 2
> >
> > Crap, and again we have there same issue. Patch after months does not
> > apply anymore. And resending the patch would again result in the same
> > problem that it would not apply anymore after half of the year...
> 
> Here is v2 patch with simple fix for that platform:
> https://protect2.fireeye.com/v1/url?k=bec9bc29-df42a906-bec83766-74fe485cbfe7-
> 2e40f47b53afb09d&q=1&e=e8f6a6f2-8f6f-4bf1-9b91-
> 3f71d3577fc7&u=https%3A%2F%2Fpatchwork.ozlabs.org%2Fproject%2Fuboot%2Fpatch%2F20230706173502.2796-1-
> pali%40kernel.org%2F
> 
> And it passed _now_ CI pipeline:
> https://protect2.fireeye.com/v1/url?k=543f3751-35b4227e-543ebc1e-74fe485cbfe7-
> ff5f636a3c274f12&q=1&e=e8f6a6f2-8f6f-4bf1-9b91-3f71d3577fc7&u=https%3A%2F%2Fgithub.com%2Fu-boot%2Fu-
> boot%2Fpull%2F340
> 

Thanks for sharing it. 

Best Regards,
Jaehoon Chung

> >
> > Anyway, only first patch is SPL specific, other should apply without any
> > problem.
> >
> > >
> > > Best Regards,
> > > Jaehoon Chung
> > >
> > > >
> > > > Pali Rohár (4):
> > > >   mmc: spl: Make partition choice in
> > > >     default_spl_mmc_emmc_boot_partition() more explicit
> > > >   cmd: mvebu/bubt: Validate EXT_CSD[179] eMMC register in
> > > >     mmc_burn_image()
> > > >   sunxi: eMMC: Add comments explaining mapping between bootpart and
> > > >     mmc_switch_part()
> > > >   board: purism: Use U-Boot mmc function for converting boot part to
> > > >     part access
> > > >
> > > >  arch/arm/mach-sunxi/board.c    | 12 ++++++++++-
> > > >  board/purism/librem5/librem5.c |  6 +-----
> > > >  cmd/mvebu/bubt.c               | 24 +++++++++++++++++++--
> > > >  common/spl/spl_mmc.c           | 38 +++++++++++++++++++++++++++-------
> > > >  4 files changed, 64 insertions(+), 16 deletions(-)
> > >
Jaehoon Chung July 6, 2023, 10:57 p.m. UTC | #5
> -----Original Message-----
> From: Pali Rohár <pali@kernel.org>
> Sent: Thursday, July 6, 2023 7:51 PM
> To: Jaehoon Chung <jh80.chung@samsung.com>; Tom Rini <trini@konsulko.com>
> Cc: Peng Fan <peng.fan@nxp.com>; Stefan Roese <sr@denx.de>; u-boot@lists.denx.de
> Subject: Re: [PATCH u-boot 0/4] mmc: Explain and cleanup partition selection
> 
> On Monday 03 July 2023 21:16:37 Jaehoon Chung wrote:
> > Hi,
> >
> > On 4/14/23 06:10, Pali Rohár wrote:
> > > Some people do not want to read review comments in emails. So put
> > > comments and explanation into the source code itself; make emmc
> > > partition selection code more explicit and validate configuration in
> > > bubt command.
> >
> > Sorry for too late.
> > After applied this patch-set, some board are failed with spl's size overflowed
> >
> > The below is one of failed log.
> >
> > +arm-linux-gnueabi-ld.bfd: region `.sram' overflowed by 352 bytes
> > +make[2]: *** [scripts/Makefile.spl:527: spl/u-boot-spl] Error 1
> > +make[1]: *** [Makefile:2049: spl/u-boot-spl] Error 2
> 
> Crap, and again we have there same issue. Patch after months does not
> apply anymore. And resending the patch would again result in the same
> problem that it would not apply anymore after half of the year...
> 
> 
> Anyway, only first patch is SPL specific, other should apply without any
> problem.

Except spl specific patch, I will check again about your other patches. Thanks!

Best Regards,
Jaehoon Chung

> 
> >
> > Best Regards,
> > Jaehoon Chung
> >
> > >
> > > Pali Rohár (4):
> > >   mmc: spl: Make partition choice in
> > >     default_spl_mmc_emmc_boot_partition() more explicit
> > >   cmd: mvebu/bubt: Validate EXT_CSD[179] eMMC register in
> > >     mmc_burn_image()
> > >   sunxi: eMMC: Add comments explaining mapping between bootpart and
> > >     mmc_switch_part()
> > >   board: purism: Use U-Boot mmc function for converting boot part to
> > >     part access
> > >
> > >  arch/arm/mach-sunxi/board.c    | 12 ++++++++++-
> > >  board/purism/librem5/librem5.c |  6 +-----
> > >  cmd/mvebu/bubt.c               | 24 +++++++++++++++++++--
> > >  common/spl/spl_mmc.c           | 38 +++++++++++++++++++++++++++-------
> > >  4 files changed, 64 insertions(+), 16 deletions(-)
> >