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: Mike Looijmans <mike.looijmans@topic.nl>
diff --git a/common/spl/spl_nor.c b/common/spl/spl_nor.c
index da2422f..8ea874c 100644
--- a/common/spl/spl_nor.c
+++ b/common/spl/spl_nor.c
@@ -40,11 +40,11 @@
/*
* 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,
(void *)(CONFIG_SYS_FDT_BASE),
- (16 << 10));
+ CONFIG_SYS_FDT_SIZE);
return 0;
} else {