[v2,2/3] sifive: fu540: Add U-Boot proper sector start

Message ID 20200420133735.23599-2-jagan@amarulasolutions.com
State New
Headers show
Series
  • [v2,1/3] sifive: fu540: Add sample SD gpt partition layout
Related show

Commit Message

Jagan Teki April 20, 2020, 1:37 p.m. UTC
Add U-Boot proper sector start offset for SiFive FU540.
This value is based on the partition layout supported
by SiFive FU540.

u-boot.itb need to write on this specific offset so-that
the SPL will retrieve it from here and load.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
---
Changes for v2:
- none

 common/spl/Kconfig | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Bin Meng April 29, 2020, 1:58 p.m. UTC | #1
Hi Jagan,

On Mon, Apr 20, 2020 at 9:37 PM Jagan Teki <jagan@amarulasolutions.com> wrote:
>
> Add U-Boot proper sector start offset for SiFive FU540.
> This value is based on the partition layout supported
> by SiFive FU540.
>
> u-boot.itb need to write on this specific offset so-that
> the SPL will retrieve it from here and load.
>
> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
> ---
> Changes for v2:
> - none
>
>  common/spl/Kconfig | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/common/spl/Kconfig b/common/spl/Kconfig
> index 07eee56219..1ebb30344a 100644
> --- a/common/spl/Kconfig
> +++ b/common/spl/Kconfig
> @@ -308,7 +308,7 @@ config SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR
>                      ARCH_MX6 || ARCH_MX7 || \
>                      ARCH_ROCKCHIP || ARCH_MVEBU ||  ARCH_SOCFPGA || \
>                      ARCH_AT91 || ARCH_ZYNQ || ARCH_KEYSTONE || OMAP34XX || \
> -                    OMAP44XX || OMAP54XX || AM33XX || AM43XX
> +                    OMAP44XX || OMAP54XX || AM33XX || AM43XX || TARGET_SIFIVE_FU540
>         help
>           Use sector number for specifying U-Boot location on MMC/SD in
>           raw mode.
> @@ -325,6 +325,7 @@ config SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR
>         default 0x300 if ARCH_ZYNQ || ARCH_KEYSTONE || OMAP34XX || OMAP44XX || \
>                          OMAP54XX || AM33XX || AM43XX || ARCH_K3
>         default 0x4000 if ARCH_ROCKCHIP
> +       default 0x822 if TARGET_SIFIVE_FU540
>         help
>           Address on the MMC to load U-Boot from, when the MMC is being used
>           in raw mode. Units: MMC sectors (1 sector = 512 bytes).
> --

It looks my comments in v1 patch is not addressed?

Regards,
Bin
Pragnesh Patel April 29, 2020, 2:04 p.m. UTC | #2
Hi Bin,

>-----Original Message-----
>From: Bin Meng <bmeng.cn@gmail.com>
>Sent: 29 April 2020 19:28
>To: Jagan Teki <jagan@amarulasolutions.com>
>Cc: Pragnesh Patel <pragnesh.patel@sifive.com>; Rick Chen
><rick@andestech.com>; U-Boot Mailing List <u-boot@lists.denx.de>; Sagar
>Kadam <sagar.kadam@sifive.com>; Paul Walmsley
><paul.walmsley@sifive.com>; Troy Benjegerdes
><troy.benjegerdes@sifive.com>; Palmer Dabbelt
><palmerdabbelt@google.com>; Anup Patel <anup.patel@wdc.com>; Atish
>Patra <atish.patra@wdc.com>; linux-amarula <linux-
>amarula@amarulasolutions.com>
>Subject: Re: [PATCH v2 2/3] sifive: fu540: Add U-Boot proper sector start
>
>[External Email] Do not click links or attachments unless you recognize the
>sender and know the content is safe
>
>Hi Jagan,
>
>On Mon, Apr 20, 2020 at 9:37 PM Jagan Teki <jagan@amarulasolutions.com>
>wrote:
>>
>> Add U-Boot proper sector start offset for SiFive FU540.
>> This value is based on the partition layout supported by SiFive FU540.
>>
>> u-boot.itb need to write on this specific offset so-that the SPL will
>> retrieve it from here and load.
>>
>> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
>> ---
>> Changes for v2:
>> - none
>>
>>  common/spl/Kconfig | 3 ++-
>>  1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/common/spl/Kconfig b/common/spl/Kconfig index
>> 07eee56219..1ebb30344a 100644
>> --- a/common/spl/Kconfig
>> +++ b/common/spl/Kconfig
>> @@ -308,7 +308,7 @@ config
>SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR
>>                      ARCH_MX6 || ARCH_MX7 || \
>>                      ARCH_ROCKCHIP || ARCH_MVEBU ||  ARCH_SOCFPGA || \
>>                      ARCH_AT91 || ARCH_ZYNQ || ARCH_KEYSTONE || OMAP34XX ||
>\
>> -                    OMAP44XX || OMAP54XX || AM33XX || AM43XX
>> +                    OMAP44XX || OMAP54XX || AM33XX || AM43XX ||
>> + TARGET_SIFIVE_FU540
>>         help
>>           Use sector number for specifying U-Boot location on MMC/SD in
>>           raw mode.
>> @@ -325,6 +325,7 @@ config SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR
>>         default 0x300 if ARCH_ZYNQ || ARCH_KEYSTONE || OMAP34XX ||
>OMAP44XX || \
>>                          OMAP54XX || AM33XX || AM43XX || ARCH_K3
>>         default 0x4000 if ARCH_ROCKCHIP
>> +       default 0x822 if TARGET_SIFIVE_FU540
>>         help
>>           Address on the MMC to load U-Boot from, when the MMC is being
>used
>>           in raw mode. Units: MMC sectors (1 sector = 512 bytes).
>> --
>
>It looks my comments in v1 patch is not addressed?

@Bin Meng I did not see any comment from your side, please help me if I was wrong.

>
>Regards,
>Bin
Pragnesh Patel April 29, 2020, 2:30 p.m. UTC | #3
>-----Original Message-----
>From: Jagan Teki <jagan@amarulasolutions.com>
>Sent: 20 April 2020 19:08
>To: Pragnesh Patel <pragnesh.patel@sifive.com>; rick@andestech.com; u-
>boot@lists.denx.de
>Cc: bmeng.cn@gmail.com; Sagar Kadam <sagar.kadam@sifive.com>; Paul
>Walmsley <paul.walmsley@sifive.com>; Troy Benjegerdes
><troy.benjegerdes@sifive.com>; palmerdabbelt@google.com;
>anup.patel@wdc.com; atish.patra@wdc.com; linux-
>amarula@amarulasolutions.com; Jagan Teki <jagan@amarulasolutions.com>
>Subject: [PATCH v2 2/3] sifive: fu540: Add U-Boot proper sector start
>
>[External Email] Do not click links or attachments unless you recognize the
>sender and know the content is safe
>
>Add U-Boot proper sector start offset for SiFive FU540.
>This value is based on the partition layout supported by SiFive FU540.
>
>u-boot.itb need to write on this specific offset so-that the SPL will retrieve it
>from here and load.
>
>Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
>---
>Changes for v2:
>- none
>
> common/spl/Kconfig | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
>diff --git a/common/spl/Kconfig b/common/spl/Kconfig index
>07eee56219..1ebb30344a 100644
>--- a/common/spl/Kconfig
>+++ b/common/spl/Kconfig
>@@ -308,7 +308,7 @@ config
>SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR
>                     ARCH_MX6 || ARCH_MX7 || \
>                     ARCH_ROCKCHIP || ARCH_MVEBU ||  ARCH_SOCFPGA || \
>                     ARCH_AT91 || ARCH_ZYNQ || ARCH_KEYSTONE || OMAP34XX || \
>-                    OMAP44XX || OMAP54XX || AM33XX || AM43XX
>+                    OMAP44XX || OMAP54XX || AM33XX || AM43XX ||
>+ TARGET_SIFIVE_FU540
>        help
>          Use sector number for specifying U-Boot location on MMC/SD in
>          raw mode.
>@@ -325,6 +325,7 @@ config SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR
>        default 0x300 if ARCH_ZYNQ || ARCH_KEYSTONE || OMAP34XX ||
>OMAP44XX || \
>                         OMAP54XX || AM33XX || AM43XX || ARCH_K3
>        default 0x4000 if ARCH_ROCKCHIP
>+       default 0x822 if TARGET_SIFIVE_FU540
>        help
>          Address on the MMC to load U-Boot from, when the MMC is being used
>          in raw mode. Units: MMC sectors (1 sector = 512 bytes).
>--
>2.17.1

Reviewed-by: Pragnesh Patel <pragnesh.patel@sifive.com>
Bin Meng April 29, 2020, 2:37 p.m. UTC | #4
Hi Pragnesh,

On Wed, Apr 29, 2020 at 10:04 PM Pragnesh Patel
<pragnesh.patel@sifive.com> wrote:
>
> Hi Bin,
>
> >-----Original Message-----
> >From: Bin Meng <bmeng.cn@gmail.com>
> >Sent: 29 April 2020 19:28
> >To: Jagan Teki <jagan@amarulasolutions.com>
> >Cc: Pragnesh Patel <pragnesh.patel@sifive.com>; Rick Chen
> ><rick@andestech.com>; U-Boot Mailing List <u-boot@lists.denx.de>; Sagar
> >Kadam <sagar.kadam@sifive.com>; Paul Walmsley
> ><paul.walmsley@sifive.com>; Troy Benjegerdes
> ><troy.benjegerdes@sifive.com>; Palmer Dabbelt
> ><palmerdabbelt@google.com>; Anup Patel <anup.patel@wdc.com>; Atish
> >Patra <atish.patra@wdc.com>; linux-amarula <linux-
> >amarula@amarulasolutions.com>
> >Subject: Re: [PATCH v2 2/3] sifive: fu540: Add U-Boot proper sector start
> >
> >[External Email] Do not click links or attachments unless you recognize the
> >sender and know the content is safe
> >
> >Hi Jagan,
> >
> >On Mon, Apr 20, 2020 at 9:37 PM Jagan Teki <jagan@amarulasolutions.com>
> >wrote:
> >>
> >> Add U-Boot proper sector start offset for SiFive FU540.
> >> This value is based on the partition layout supported by SiFive FU540.
> >>
> >> u-boot.itb need to write on this specific offset so-that the SPL will
> >> retrieve it from here and load.
> >>
> >> Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
> >> ---
> >> Changes for v2:
> >> - none
> >>
> >>  common/spl/Kconfig | 3 ++-
> >>  1 file changed, 2 insertions(+), 1 deletion(-)
> >>
> >> diff --git a/common/spl/Kconfig b/common/spl/Kconfig index
> >> 07eee56219..1ebb30344a 100644
> >> --- a/common/spl/Kconfig
> >> +++ b/common/spl/Kconfig
> >> @@ -308,7 +308,7 @@ config
> >SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR
> >>                      ARCH_MX6 || ARCH_MX7 || \
> >>                      ARCH_ROCKCHIP || ARCH_MVEBU ||  ARCH_SOCFPGA || \
> >>                      ARCH_AT91 || ARCH_ZYNQ || ARCH_KEYSTONE || OMAP34XX ||
> >\
> >> -                    OMAP44XX || OMAP54XX || AM33XX || AM43XX
> >> +                    OMAP44XX || OMAP54XX || AM33XX || AM43XX ||
> >> + TARGET_SIFIVE_FU540
> >>         help
> >>           Use sector number for specifying U-Boot location on MMC/SD in
> >>           raw mode.
> >> @@ -325,6 +325,7 @@ config SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR
> >>         default 0x300 if ARCH_ZYNQ || ARCH_KEYSTONE || OMAP34XX ||
> >OMAP44XX || \
> >>                          OMAP54XX || AM33XX || AM43XX || ARCH_K3
> >>         default 0x4000 if ARCH_ROCKCHIP
> >> +       default 0x822 if TARGET_SIFIVE_FU540
> >>         help
> >>           Address on the MMC to load U-Boot from, when the MMC is being
> >used
> >>           in raw mode. Units: MMC sectors (1 sector = 512 bytes).
> >> --
> >
> >It looks my comments in v1 patch is not addressed?
>
> @Bin Meng I did not see any comment from your side, please help me if I was wrong.

Sorry, I was referring to another patch which is similar to this one:
https://lists.denx.de/pipermail/u-boot/2020-April/407627.html

Regards,
Bin

Patch

diff --git a/common/spl/Kconfig b/common/spl/Kconfig
index 07eee56219..1ebb30344a 100644
--- a/common/spl/Kconfig
+++ b/common/spl/Kconfig
@@ -308,7 +308,7 @@  config SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR
 		     ARCH_MX6 || ARCH_MX7 || \
 		     ARCH_ROCKCHIP || ARCH_MVEBU ||  ARCH_SOCFPGA || \
 		     ARCH_AT91 || ARCH_ZYNQ || ARCH_KEYSTONE || OMAP34XX || \
-		     OMAP44XX || OMAP54XX || AM33XX || AM43XX
+		     OMAP44XX || OMAP54XX || AM33XX || AM43XX || TARGET_SIFIVE_FU540
 	help
 	  Use sector number for specifying U-Boot location on MMC/SD in
 	  raw mode.
@@ -325,6 +325,7 @@  config SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR
 	default 0x300 if ARCH_ZYNQ || ARCH_KEYSTONE || OMAP34XX || OMAP44XX || \
 		         OMAP54XX || AM33XX || AM43XX || ARCH_K3
 	default 0x4000 if ARCH_ROCKCHIP
+	default 0x822 if TARGET_SIFIVE_FU540
 	help
 	  Address on the MMC to load U-Boot from, when the MMC is being used
 	  in raw mode. Units: MMC sectors (1 sector = 512 bytes).