summaryrefslogtreecommitdiff
path: root/board/toradex
diff options
context:
space:
mode:
authorStefan Agner <stefan.agner@toradex.com>2017-03-10 01:17:54 (GMT)
committerStefano Babic <sbabic@denx.de>2017-03-19 16:29:28 (GMT)
commit640957042d8f878d093f37aadc04f6d08a7252a1 (patch)
tree9ec504d6a844d2d05b03df0cc2e7bf1e857f00d0 /board/toradex
parent05ed964d755ee1967640e63f8bef63e345725d05 (diff)
downloadu-boot-640957042d8f878d093f37aadc04f6d08a7252a1.tar.xz
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>
Diffstat (limited to 'board/toradex')
-rw-r--r--board/toradex/colibri_imx7/colibri_imx7.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/board/toradex/colibri_imx7/colibri_imx7.c b/board/toradex/colibri_imx7/colibri_imx7.c
index a106b3b..b2b12e4 100644
--- a/board/toradex/colibri_imx7/colibri_imx7.c
+++ b/board/toradex/colibri_imx7/colibri_imx7.c
@@ -16,10 +16,13 @@
#include <common.h>
#include <dm.h>
#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>
@@ -421,6 +424,16 @@ int checkboard(void)
#if defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP)
int ft_board_setup(void *blob, bd_t *bd)
{
+#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
+
return ft_common_board_setup(blob, bd);
}
#endif