diff options
author | Stefan Agner <stefan.agner@toradex.com> | 2017-03-09 15:25:49 -0800 |
---|---|---|
committer | Marcel Ziswiler <marcel.ziswiler@toradex.com> | 2017-03-30 10:06:54 +0200 |
commit | 25eb2538f6d16eaef886485780ceecd1ec9c4e14 (patch) | |
tree | c8faee1fee432433c9e0d49bda4e569aad52f66e /board | |
parent | cedf55d098b4b0af2815c92ee40576a4c899fcfb (diff) |
colibri_imx7: use device-tree for MTD partitions
Use device-tree fixup to communicate the MTD partitions to the
kernel. Remove mtdparts from the kernel command line.
Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Diffstat (limited to 'board')
-rw-r--r-- | board/toradex/colibri_imx7/colibri_imx7.c | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/board/toradex/colibri_imx7/colibri_imx7.c b/board/toradex/colibri_imx7/colibri_imx7.c index 9f831671e04..3ff68c4259b 100644 --- a/board/toradex/colibri_imx7/colibri_imx7.c +++ b/board/toradex/colibri_imx7/colibri_imx7.c @@ -18,9 +18,11 @@ #include <dm/platform_data/serial_mxc.h> #include <fdt_support.h> #include <fsl_esdhc.h> +#include <jffs2/load_kernel.h> #include <linux/sizes.h> #include <mmc.h> #include <miiphy.h> +#include <mtd_node.h> #include <netdev.h> #include <power/pmic.h> #include <power/rn5t567_pmic.h> @@ -431,12 +433,19 @@ ulong board_get_usable_ram_top(ulong total_size) #if defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP) int ft_board_setup(void *blob, bd_t *bd) { + int ret = 0; +#if defined(CONFIG_FDT_FIXUP_PARTITIONS) + static struct node_info nodes[] = { + { "fsl,imx7d-gpmi-nand", 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 #if defined(CONFIG_IMX_BOOTAUX) - int up; - - up = arch_auxiliary_core_check_up(0); - if (up) { - int ret; + ret = arch_auxiliary_core_check_up(0); + if (ret) { int areas = 1; u64 start[2], size[2]; |