Commit 5aa79f26 authored by Mike Looijmans's avatar Mike Looijmans Committed by Tom Rini
Browse files

spl_nor.c: Support devicetree sizes different from 16k



The devicetrees for various platforms already exceed 16k. Add a define
CONFIG_SYS_FDT_SIZE to specify the FDT size, and set to 16k for the
two boards that define this CONFIG_SYS_FDT_BASE parameter. This
allows platforms with larger devicetree blobs to boot from NOR.
Signed-off-by: default avatarMike Looijmans <mike.looijmans@topic.nl>
parent 5405817a
...@@ -40,11 +40,11 @@ int spl_nor_load_image(void) ...@@ -40,11 +40,11 @@ int spl_nor_load_image(void)
/* /*
* Copy DT blob (fdt) to SDRAM. Passing pointer to * Copy DT blob (fdt) to SDRAM. Passing pointer to
* flash doesn't work (16 KiB should be enough for DT) * flash doesn't work
*/ */
memcpy((void *)CONFIG_SYS_SPL_ARGS_ADDR, memcpy((void *)CONFIG_SYS_SPL_ARGS_ADDR,
(void *)(CONFIG_SYS_FDT_BASE), (void *)(CONFIG_SYS_FDT_BASE),
(16 << 10)); CONFIG_SYS_FDT_SIZE);
return 0; return 0;
} else { } else {
......
...@@ -334,6 +334,7 @@ ...@@ -334,6 +334,7 @@
#define CONFIG_SYS_OS_BASE 0xfc200000 #define CONFIG_SYS_OS_BASE 0xfc200000
#define CONFIG_SYS_FDT_BASE 0xfc1e0000 #define CONFIG_SYS_FDT_BASE 0xfc1e0000
#define CONFIG_SYS_FDT_SIZE (16<<10)
#define CONFIG_EXTRA_ENV_SETTINGS \ #define CONFIG_EXTRA_ENV_SETTINGS \
"netdev=eth0\0" \ "netdev=eth0\0" \
......
...@@ -305,6 +305,7 @@ ...@@ -305,6 +305,7 @@
0x60000) 0x60000)
#define CONFIG_SYS_FDT_BASE (CONFIG_SYS_FLASH_BASE + \ #define CONFIG_SYS_FDT_BASE (CONFIG_SYS_FLASH_BASE + \
0x40000) 0x40000)
#define CONFIG_SYS_FDT_SIZE (16<<10)
#define CONFIG_SYS_SPL_ARGS_ADDR (CONFIG_SYS_TEXT_BASE + \ #define CONFIG_SYS_SPL_ARGS_ADDR (CONFIG_SYS_TEXT_BASE + \
0x1000000) 0x1000000)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment