diff options
author | Heiko Schocher <hs@denx.de> | 2016-10-17 15:51:32 +0200 |
---|---|---|
committer | Stefano Babic <sbabic@denx.de> | 2016-11-16 20:53:55 +0100 |
commit | 72c1015307afe6cf4541166964216a4f733b3faa (patch) | |
tree | d4654c9eaa262b3d2409fa42c02a04de3f0133b7 | |
parent | 97c16dc8bf0981d9c3ba04f1b8cc54b751a00f3f (diff) |
mx35: add DT support to flea3 board
Signed-off-by: Heiko Schocher <hs@denx.de>
-rw-r--r-- | board/CarMediaLab/flea3/flea3.c | 24 | ||||
-rw-r--r-- | configs/flea3_defconfig | 4 |
2 files changed, 28 insertions, 0 deletions
diff --git a/board/CarMediaLab/flea3/flea3.c b/board/CarMediaLab/flea3/flea3.c index 2463077475..be428637df 100644 --- a/board/CarMediaLab/flea3/flea3.c +++ b/board/CarMediaLab/flea3/flea3.c @@ -19,6 +19,9 @@ #include <asm/gpio.h> #include <asm/arch/sys_proto.h> #include <netdev.h> +#include <fdt_support.h> +#include <mtd_node.h> +#include <jffs2/load_kernel.h> #ifndef CONFIG_BOARD_EARLY_INIT_F #error "CONFIG_BOARD_EARLY_INIT_F must be set for this board" @@ -276,3 +279,24 @@ u32 get_board_rev(void) return (get_cpu_rev() & ~(0xF << 8)) | (rev & 0xF) << 8; } + +/* + * called prior to booting kernel or by 'fdt boardsetup' command + * + */ +int ft_board_setup(void *blob, bd_t *bd) +{ + struct node_info nodes[] = { + { "physmap-flash.0", MTD_DEV_TYPE_NOR, }, /* NOR flash */ + { "mxc_nand", MTD_DEV_TYPE_NAND, }, /* NAND flash */ + }; + + if (getenv("fdt_noauto")) { + puts(" Skiping ft_board_setup (fdt_noauto defined)\n"); + return 0; + } + + fdt_fixup_mtdparts(blob, nodes, ARRAY_SIZE(nodes)); + + return 0; +} diff --git a/configs/flea3_defconfig b/configs/flea3_defconfig index 7aa1ba8aea..c5ccbd6cd9 100644 --- a/configs/flea3_defconfig +++ b/configs/flea3_defconfig @@ -1,6 +1,7 @@ CONFIG_ARM=y CONFIG_TARGET_FLEA3=y CONFIG_FIT=y +CONFIG_OF_BOARD_SETUP=y CONFIG_BOOTDELAY=3 # CONFIG_DISPLAY_BOARDINFO is not set CONFIG_HUSH_PARSER=y @@ -12,3 +13,6 @@ CONFIG_CMD_DHCP=y CONFIG_CMD_MII=y CONFIG_CMD_PING=y CONFIG_CMD_CACHE=y +CONFIG_OF_LIBFDT=y +CONFIG_FDT_FIXUP_PARTITIONS=y +# CONFIG_EFI_LOADER is not set |