diff options
author | Stefan Agner <stefan.agner@toradex.com> | 2015-06-30 12:31:56 +0200 |
---|---|---|
committer | Stefan Agner <stefan.agner@toradex.com> | 2015-06-30 12:31:56 +0200 |
commit | fa19144376604fb83b3f977ff6b637434886c646 (patch) | |
tree | 56ba4ff7599266c7fe61f490637c6cec0f9ce178 /board | |
parent | caacb7d519ddf0c697ae20a9c55c6c0aed4b4a61 (diff) |
colibri_vf: use device-tree for MTD partitions
Use device-tree fixup to communicate the MTD partitions to the
kernel. U-Boot's mtdparts environment variable will be used as
partition source for the device-tree based partition table too.
Diffstat (limited to 'board')
-rw-r--r-- | board/toradex/colibri_vf/colibri_vf.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/board/toradex/colibri_vf/colibri_vf.c b/board/toradex/colibri_vf/colibri_vf.c index 2cf763999b1..180fe2e413c 100644 --- a/board/toradex/colibri_vf/colibri_vf.c +++ b/board/toradex/colibri_vf/colibri_vf.c @@ -17,11 +17,14 @@ #include <asm/arch/clock.h> #include <asm/imx-common/boot_mode.h> #include <mmc.h> +#include <mtd_node.h> +#include <fdt_support.h> #include <fsl_esdhc.h> #include <fsl_dcu_fb.h> #include <miiphy.h> #include <netdev.h> #include <i2c.h> +#include <jffs2/load_kernel.h> #include <asm/gpio.h> #include "../common/configblock.h" @@ -467,6 +470,16 @@ int checkboard_fallback(void) #if defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP) int ft_board_setup(void *blob, bd_t *bd) { +#ifdef CONFIG_FDT_FIXUP_PARTITIONS + static struct node_info nodes[] = { + { "fsl,vf610-nfc", MTD_DEV_TYPE_NAND, }, /* NAND flash */ + }; + + /* Update partition nodes using info from mtdparts env var */ + puts(" Updating MTD partitions...\n"); + fdt_fixup_mtdparts(blob, nodes, ARRAY_SIZE(nodes)); +#endif + return fsl_dcu_fixedfb_setup(blob); } #endif |