[U-Boot] [PATCH 1/2] Enable ROCKCHIP_SPL_BACK_TO_BROM for firefly-rk3288 board

Romain Perier romain.perier at collabora.com
Tue Jan 17 10:32:24 CET 2017


Like the rock2, this board has been tested with back to brom feature.
This commits adjusts environment offset regarding if back_to_brom is
enabled or not and uses this feature by default.

Signed-off-by: Romain Perier <romain.perier at collabora.com>
---
 configs/firefly-rk3288_defconfig | 2 ++
 include/configs/firefly-rk3288.h | 9 +++++++++
 2 files changed, 11 insertions(+)

diff --git a/configs/firefly-rk3288_defconfig b/configs/firefly-rk3288_defconfig
index 3ed17b4..3aa8bcf 100644
--- a/configs/firefly-rk3288_defconfig
+++ b/configs/firefly-rk3288_defconfig
@@ -2,6 +2,8 @@ CONFIG_ARM=y
 CONFIG_ARCH_ROCKCHIP=y
 CONFIG_SYS_MALLOC_F_LEN=0x2000
 CONFIG_ROCKCHIP_RK3288=y
+# CONFIG_SPL_MMC_SUPPORT is not set
+CONFIG_ROCKCHIP_SPL_BACK_TO_BROM=y
 CONFIG_TARGET_FIREFLY_RK3288=y
 CONFIG_SPL_STACK_R_ADDR=0x80000
 CONFIG_DEFAULT_DEVICE_TREE="rk3288-firefly"
diff --git a/include/configs/firefly-rk3288.h b/include/configs/firefly-rk3288.h
index 14fdead..b9c2290 100644
--- a/include/configs/firefly-rk3288.h
+++ b/include/configs/firefly-rk3288.h
@@ -16,11 +16,20 @@
 
 #define CONFIG_ENV_IS_IN_MMC
 #define CONFIG_SYS_MMC_ENV_DEV 0
+
+#ifdef CONFIG_ROCKCHIP_SPL_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
  */
 #define CONFIG_ENV_OFFSET (96 * 1024)
+#endif
 
 #define CONFIG_SYS_WHITE_ON_BLACK
 
-- 
2.9.3



More information about the U-Boot mailing list