Philipp,
On 11/03/2017 05:45 PM, Dr. Philipp Tomsich wrote:
On 31 Oct 2017, at 08:52, Kever Yang <kever.y...@rock-chips.com> wrote:
Using the ENV offset from rockchip legacy U-Boot for all SoCs,
the offset is 4MB-32KB
Signed-off-by: Kever Yang <kever.y...@rock-chips.com>
---
include/configs/rockchip-common.h | 15 +++------------
1 file changed, 3 insertions(+), 12 deletions(-)
diff --git a/include/configs/rockchip-common.h
b/include/configs/rockchip-common.h
index 96b5fce..3fc1b71 100644
--- a/include/configs/rockchip-common.h
+++ b/include/configs/rockchip-common.h
@@ -61,19 +61,10 @@
#endif
-#if CONFIG_IS_ENABLED(ROCKCHIP_BACK_TO_BROM)
-/* SPL @ 32k for 34k
- * u-boot directly after @ 68k for 400k or so
- * ENV @ 992k
- */
-#define CONFIG_ENV_OFFSET ((1024-32) * 1024)
-#else
-/* SPL @ 32k for ~36k
- * ENV @ 96k
- * u-boot @ 128K
+/*
+ * Rockchip SoCs use fixed ENV 32KB@(4MB-32KB)
*/
-#define CONFIG_ENV_OFFSET (96 * 1024)
-#endif
+#define CONFIG_ENV_OFFSET (SZ_4M - SZ_32K)
Is there a reason why we don’t move this to the DTS (there is a
/config/u-boot,mmc-env-offset property node for this)?
Because it's simple enough for use.
To be honest, I didn't notice there is a DTS node for ENV offset.
And I didn't see a good reason to move this to DTS:
- Almost all the SoCs using the macro define in header file, using dts
is not popular way;
- I don't think we need to add a node for each SoC dtsi, we only need
one MACRO
define in common header and use it directly instead of parse it from
different SoC dtsi;
- kernel dtsi file does not have the 'u-boot,mmc-env-offset' node, that
means we have to
add them in dtsi for each soc when we add one soc support, I think
most people do not
have idea about this, why don't we make it easier?
Thanks,
- Kever
#define CONFIG_DISPLAY_BOARDINFO_LATE
--
1.9.1
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot