diff mbox series

[v2,2/3] rk3399: Add boot flash script offset, size

Message ID 20200410182631.11951-3-jagan@amarulasolutions.com
State Accepted
Commit d2c19b740c48c662fe23d02ac8d6514895d8c205
Headers show
Series environment: distro: Add SF distro support | expand

Commit Message

Jagan Teki April 10, 2020, 6:26 p.m. UTC
Most of the SPI flash devices in rockchip (rk3399)
are 16MiB size. So, let's use the script offset at
the end of 8K.?

This way it cannot overlap any offsets being used
by software components in flash layout.

Signed-off-by: Jagan Teki <jagan at amarulasolutions.com>
Reviewed-by: Kever Yang <kever.yang at rock-chips.com>
---
Changes for v2:
- new patch

 include/configs/rk3399_common.h | 2 ++
 1 file changed, 2 insertions(+)

Comments

Peter Robinson April 20, 2020, 3:51 p.m. UTC | #1
> Most of the SPI flash devices in rockchip (rk3399)
> are 16MiB size. So, let's use the script offset at
> the end of 8K.

You wouldn't have the commands for writing the
idbloader.img/u-boot.itb to these SPI flash on one of these devices by
chance?

Peter

> This way it cannot overlap any offsets being used
> by software components in flash layout.
>
> Signed-off-by: Jagan Teki <jagan at amarulasolutions.com>
> Reviewed-by: Kever Yang <kever.yang at rock-chips.com>
> ---
> Changes for v2:
> - new patch
>
>  include/configs/rk3399_common.h | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/include/configs/rk3399_common.h b/include/configs/rk3399_common.h
> index 89a8a44bbe..01a9174bd2 100644
> --- a/include/configs/rk3399_common.h
> +++ b/include/configs/rk3399_common.h
> @@ -48,6 +48,8 @@
>
>  #define ENV_MEM_LAYOUT_SETTINGS \
>         "scriptaddr=0x00500000\0" \
> +       "script_offset_f=0xffe000\0" \
> +       "script_size_f=0x2000\0" \
>         "pxefile_addr_r=0x00600000\0" \
>         "fdt_addr_r=0x01f00000\0" \
>         "kernel_addr_r=0x02080000\0" \
> --
> 2.17.1
>
Jagan Teki April 20, 2020, 4:25 p.m. UTC | #2
On Mon, Apr 20, 2020 at 9:21 PM Peter Robinson <pbrobinson at gmail.com> wrote:
>
> > Most of the SPI flash devices in rockchip (rk3399)
> > are 16MiB size. So, let's use the script offset at
> > the end of 8K.
>
> You wouldn't have the commands for writing the
> idbloader.img/u-boot.itb to these SPI flash on one of these devices by
> chance?

https://wiki.amarulasolutions.com/bsp/rockchip/rk3399/roc-rk3399-pc.html#booting-from
diff mbox series

Patch

diff --git a/include/configs/rk3399_common.h b/include/configs/rk3399_common.h
index 89a8a44bbe..01a9174bd2 100644
--- a/include/configs/rk3399_common.h
+++ b/include/configs/rk3399_common.h
@@ -48,6 +48,8 @@ 
 
 #define ENV_MEM_LAYOUT_SETTINGS \
 	"scriptaddr=0x00500000\0" \
+	"script_offset_f=0xffe000\0" \
+	"script_size_f=0x2000\0" \
 	"pxefile_addr_r=0x00600000\0" \
 	"fdt_addr_r=0x01f00000\0" \
 	"kernel_addr_r=0x02080000\0" \