summaryrefslogtreecommitdiff
path: root/board/toradex/colibri_vf/colibri_vf.c
diff options
context:
space:
mode:
authorStefan Agner <stefan.agner@toradex.com>2016-11-30 13:41:54 -0800
committerMax Krummenacher <max.krummenacher@toradex.com>2017-01-11 15:45:21 +0100
commit8a4b68a2cb49d6bfb8893b2c148f33c49960a2bd (patch)
tree9e3330324708107b463ca066bcc6b3d7dc5e0bde /board/toradex/colibri_vf/colibri_vf.c
parenta738cfa862ca585ae7971a9c816dcfd95009dad7 (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. Signed-off-by: Stefan Agner <stefan.agner@toradex.com> (cherry picked from commit 6119b0f764eb8b68d6148d4c017cbd343408c2d8)
Diffstat (limited to 'board/toradex/colibri_vf/colibri_vf.c')
-rw-r--r--board/toradex/colibri_vf/colibri_vf.c13
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 86f52c5f63..0f8b440df9 100644
--- a/board/toradex/colibri_vf/colibri_vf.c
+++ b/board/toradex/colibri_vf/colibri_vf.c
@@ -15,8 +15,11 @@
#include <asm/arch/crm_regs.h>
#include <asm/arch/clock.h>
#include <mmc.h>
+#include <fdt_support.h>
#include <fsl_esdhc.h>
+#include <jffs2/load_kernel.h>
#include <miiphy.h>
+#include <mtd_node.h>
#include <netdev.h>
#include <i2c.h>
#include <g_dnl.h>
@@ -532,6 +535,16 @@ int checkboard(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 ft_common_board_setup(blob, bd);
}
#endif