]> git.sur5r.net Git - u-boot/commitdiff
spl_nor.c: Support devicetree sizes different from 16k
authorMike Looijmans <mike.looijmans@topic.nl>
Tue, 26 Jul 2016 05:34:07 +0000 (07:34 +0200)
committerTom Rini <trini@konsulko.com>
Mon, 8 Aug 2016 17:32:52 +0000 (13:32 -0400)
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>
common/spl/spl_nor.c
include/configs/a3m071.h
include/configs/microblaze-generic.h

index da2422f30515ac07d1af7161ac7ae906783de3f7..8ea874c888e8d6d4c8c2594458e1f2641f33fc47 100644 (file)
@@ -40,11 +40,11 @@ int spl_nor_load_image(void)
 
                        /*
                         * 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 {
index 8f17dd18c7ac38cf7edc59e320fa6af9bc95dcca..ab2477c4d57de4e84ee63ef1386eee14a59d27b7 100644 (file)
 
 #define CONFIG_SYS_OS_BASE     0xfc200000
 #define CONFIG_SYS_FDT_BASE    0xfc1e0000
+#define CONFIG_SYS_FDT_SIZE    (16<<10)
 
 #define        CONFIG_EXTRA_ENV_SETTINGS                                       \
        "netdev=eth0\0"                                                 \
index 047e756e71d95894dfa11e2300a3a8c2655e3b02..e5bf700853216d63ec419d743e09a2752924f157 100644 (file)
                                         0x60000)
 #define CONFIG_SYS_FDT_BASE            (CONFIG_SYS_FLASH_BASE + \
                                         0x40000)
+#define CONFIG_SYS_FDT_SIZE            (16<<10)
 #define CONFIG_SYS_SPL_ARGS_ADDR       (CONFIG_SYS_TEXT_BASE + \
                                         0x1000000)