diff mbox

[v5,37/41] rockchip: Add config_distro_bootcmd support

Message ID 1440975352-28528-38-git-send-email-sjg@chromium.org
State Accepted
Commit 6460fc42a1fe4de24a68a64cba7ce84b1fe5bcb1
Headers show

Commit Message

Simon Glass Aug. 30, 2015, 10:55 p.m. UTC
From: Sjoerd Simons <sjoerd.simons@collabora.co.uk>

Now that MMC works in U-Boot add config distro command support to start
Linux in a standard fashion. One oddity here is that linux fails to load
when the fdt is relocated to above 512MB, so set fdt_high to make sure it's
loaded below that.

Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
Acked-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
---

Changes in v5: None
Changes in v4: None
Changes in v3: None
Changes in v2: None

 include/configs/rk3288_common.h | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

Comments

Simon Glass Sept. 3, 2015, 6 p.m. UTC | #1
On 30 August 2015 at 16:55, Simon Glass <sjg@chromium.org> wrote:
> From: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
>
> Now that MMC works in U-Boot add config distro command support to start
> Linux in a standard fashion. One oddity here is that linux fails to load
> when the fdt is relocated to above 512MB, so set fdt_high to make sure it's
> loaded below that.
>
> Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
> Acked-by: Simon Glass <sjg@chromium.org>
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
>
> Changes in v5: None
> Changes in v4: None
> Changes in v3: None
> Changes in v2: None
>
>  include/configs/rk3288_common.h | 21 +++++++++++++++++++++
>  1 file changed, 21 insertions(+)

Applied to u-boot-rockchip, thanks!
diff mbox

Patch

diff --git a/include/configs/rk3288_common.h b/include/configs/rk3288_common.h
index ce7fa75..e8aec28 100644
--- a/include/configs/rk3288_common.h
+++ b/include/configs/rk3288_common.h
@@ -92,6 +92,27 @@ 
 
 #ifndef CONFIG_SPL_BUILD
 #include <config_distro_defaults.h>
+
+#define ENV_MEM_LAYOUT_SETTINGS \
+	"scriptaddr=0x00000000\0" \
+	"pxefile_addr_r=0x00100000\0" \
+	"fdt_addr_r=0x01f00000\0" \
+	"kernel_addr_r=0x02000000\0" \
+	"ramdisk_addr_r=0x04000000\0"
+
+/* First try to boot from SD (index 0), then eMMC (index 1 */
+#define BOOT_TARGET_DEVICES(func) \
+	func(MMC, mmc, 0) \
+	func(MMC, mmc, 1)
+
+#include <config_distro_bootcmd.h>
+
+/* Linux fails to load the fdt if it's loaded above 512M on a Rock 2 board, so
+ * limit the fdt reallocation to that */
+#define CONFIG_EXTRA_ENV_SETTINGS \
+	"fdt_high=0x1fffffff\0" \
+	ENV_MEM_LAYOUT_SETTINGS \
+	BOOTENV
 #endif
 
 #endif