diff mbox series

[U-Boot,1/3] spl: set SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR to 0x4000 for rockchip

Message ID 1509606996-10905-1-git-send-email-kever.yang@rock-chips.com
State Accepted
Commit 8f4d62b403db45dfa8b1cadb9da9096c79b7df47
Delegated to: Philipp Tomsich
Headers show
Series [U-Boot,1/3] spl: set SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR to 0x4000 for rockchip | expand

Commit Message

Kever Yang Nov. 2, 2017, 7:16 a.m. UTC
Rockchip use a 'loader2' partition for U-Boot, so u-boot.bin or
u-boot.itb load by SPL need to locate at0x4000. Detail here:
http://opensource.rock-chips.com/wiki_Boot_option

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
---

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

Comments

Jagan Teki Nov. 2, 2017, 7:32 a.m. UTC | #1
On Thu, Nov 2, 2017 at 12:46 PM, Kever Yang <kever.yang@rock-chips.com> wrote:
> Rockchip use a 'loader2' partition for U-Boot, so u-boot.bin or
> u-boot.itb load by SPL need to locate at0x4000. Detail here:
> http://opensource.rock-chips.com/wiki_Boot_option

Sorry, I'm not clear is this because of arm64 itb?  and we should have
16320 sectors in between SPL and U-Boot which is huge isn't it?

thanks!
Kever Yang Nov. 6, 2017, 10:07 a.m. UTC | #2
Hi Jegan,


On 11/02/2017 03:32 PM, Jagan Teki wrote:
> On Thu, Nov 2, 2017 at 12:46 PM, Kever Yang <kever.yang@rock-chips.com> wrote:
>> Rockchip use a 'loader2' partition for U-Boot, so u-boot.bin or
>> u-boot.itb load by SPL need to locate at0x4000. Detail here:
>> http://opensource.rock-chips.com/wiki_Boot_option
> Sorry, I'm not clear is this because of arm64 itb?  and we should have
> 16320 sectors in between SPL and U-Boot which is huge isn't it?

No, this is nothing to do with arm64  itb.
You can over write this in your board if you use a different partition 
table from Rockchip one.

We use 0x4000 because we have use this value for many years for U-Boot 
image,
no matter it's uboot.img or u-boot.bin or u-boot.itb, I think it's 
better to sync this
value for all Rockchip plaltform including Linux and Android OS in all SoCs.

Thanks,
- Kever
>
> thanks!
Philipp Tomsich Nov. 6, 2017, 5:28 p.m. UTC | #3
> Rockchip use a 'loader2' partition for U-Boot, so u-boot.bin or
> u-boot.itb load by SPL need to locate at0x4000. Detail here:
> http://opensource.rock-chips.com/wiki_Boot_option
> 
> Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
> ---
> 
>  common/spl/Kconfig | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 

Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Jagan Teki Nov. 6, 2017, 5:42 p.m. UTC | #4
On 06-Nov-2017 3:37 PM, "Kever Yang" <kever.yang@rock-chips.com> wrote:

Hi Jegan,



On 11/02/2017 03:32 PM, Jagan Teki wrote:

> On Thu, Nov 2, 2017 at 12:46 PM, Kever Yang <kever.yang@rock-chips.com>
> wrote:
>
>> Rockchip use a 'loader2' partition for U-Boot, so u-boot.bin or
>> u-boot.itb load by SPL need to locate at0x4000. Detail here:
>> http://opensource.rock-chips.com/wiki_Boot_option
>>
> Sorry, I'm not clear is this because of arm64 itb?  and we should have
> 16320 sectors in between SPL and U-Boot which is huge isn't it?
>

No, this is nothing to do with arm64  itb.
You can over write this in your board if you use a different partition
table from Rockchip one.

We use 0x4000 because we have use this value for many years for U-Boot
image,
no matter it's uboot.img or u-boot.bin or u-boot.itb, I think it's better
to sync this
value for all Rockchip plaltform including Linux and Android OS in all SoCs.


Sorry, this I didn't understand we left 8M between SPL and U-Boot. What
exactly the use case I never observed any issue case like this.

Can you please elaborate, I understand I can override this but what to know
because generally falcon configuration itself start just from 2M
Philipp Tomsich Nov. 6, 2017, 10:16 p.m. UTC | #5
> Rockchip use a 'loader2' partition for U-Boot, so u-boot.bin or
> u-boot.itb load by SPL need to locate at0x4000. Detail here:
> http://opensource.rock-chips.com/wiki_Boot_option
> 
> Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
> Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
> ---
> 
>  common/spl/Kconfig | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 

Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Philipp Tomsich Nov. 6, 2017, 10:21 p.m. UTC | #6
> Rockchip use a 'loader2' partition for U-Boot, so u-boot.bin or
> u-boot.itb load by SPL need to locate at0x4000. Detail here:
> http://opensource.rock-chips.com/wiki_Boot_option
> 
> Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
> Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
> ---
> 
>  common/spl/Kconfig | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 

Applied to u-boot-rockchip, thanks!
Kever Yang Nov. 7, 2017, 1:55 a.m. UTC | #7
On 11/07/2017 01:42 AM, Jagan Teki wrote:
>
>
> On 06-Nov-2017 3:37 PM, "Kever Yang" <kever.yang@rock-chips.com 
> <mailto:kever.yang@rock-chips.com>> wrote:
>
>     Hi Jegan,
>
>
>
>     On 11/02/2017 03:32 PM, Jagan Teki wrote:
>
>         On Thu, Nov 2, 2017 at 12:46 PM, Kever Yang
>         <kever.yang@rock-chips.com <mailto:kever.yang@rock-chips.com>>
>         wrote:
>
>             Rockchip use a 'loader2' partition for U-Boot, so
>             u-boot.bin or
>             u-boot.itb load by SPL need to locate at0x4000. Detail here:
>             http://opensource.rock-chips.com/wiki_Boot_option
>             <http://opensource.rock-chips.com/wiki_Boot_option>
>
>         Sorry, I'm not clear is this because of arm64 itb? and we
>         should have
>         16320 sectors in between SPL and U-Boot which is huge isn't it?
>
>
>     No, this is nothing to do with arm64  itb.
>     You can over write this in your board if you use a different
>     partition table from Rockchip one.
>
>     We use 0x4000 because we have use this value for many years for
>     U-Boot image,
>     no matter it's uboot.img or u-boot.bin or u-boot.itb, I think it's
>     better to sync this
>     value for all Rockchip plaltform including Linux and Android OS in
>     all SoCs.
>
>
> Sorry, this I didn't understand we left 8M between SPL and U-Boot. 
> What exactly the use case I never observed any issue case like this.
>
Here is something more detail:
http://opensource.rock-chips.com/wiki_Partitions

Rockchip have Android first, and then Linux, so we want to make the 
partitions before kernel/system can be compatible.

Thanks,
- Kever
> Can you please elaborate, I understand I can override this but what to 
> know because generally falcon configuration itself start just from 2M
diff mbox series

Patch

diff --git a/common/spl/Kconfig b/common/spl/Kconfig
index 0bd8370..e987c07 100644
--- a/common/spl/Kconfig
+++ b/common/spl/Kconfig
@@ -142,11 +142,12 @@  config SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR
 	default 0x50 if ARCH_SUNXI
 	default 0x75 if ARCH_DAVINCI
 	default 0x8a if ARCH_MX6
-	default 0x100 if ARCH_ROCKCHIP || ARCH_UNIPHIER
+	default 0x100 if ARCH_UNIPHIER
 	default 0x140 if ARCH_MVEBU
 	default 0x200 if ARCH_SOCFPGA || ARCH_AT91
 	default 0x300 if ARCH_ZYNQ || ARCH_KEYSTONE || OMAP34XX || OMAP44XX || \
 		         OMAP54XX || AM33XX || AM43XX
+	default 0x4000 if ARCH_ROCKCHIP
 	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).