summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--board/freescale/bsc9131rdb/bsc9131rdb.c11
-rw-r--r--include/configs/BSC9131RDB.h17
2 files changed, 28 insertions, 0 deletions
diff --git a/board/freescale/bsc9131rdb/bsc9131rdb.c b/board/freescale/bsc9131rdb/bsc9131rdb.c
index 7fe4ae74ea..9146f49262 100644
--- a/board/freescale/bsc9131rdb/bsc9131rdb.c
+++ b/board/freescale/bsc9131rdb/bsc9131rdb.c
@@ -15,6 +15,9 @@
#include <fdt_support.h>
#include <fsl_mdio.h>
#include <tsec.h>
+#include <jffs2/load_kernel.h>
+#include <mtd_node.h>
+#include <flash.h>
#include <netdev.h>
@@ -50,6 +53,11 @@ int checkboard(void)
}
#if defined(CONFIG_OF_BOARD_SETUP)
+#ifdef CONFIG_FDT_FIXUP_PARTITIONS
+struct node_info nodes[] = {
+ { "fsl,ifc-nand", MTD_DEV_TYPE_NAND, },
+};
+#endif
void ft_board_setup(void *blob, bd_t *bd)
{
phys_addr_t base;
@@ -61,6 +69,9 @@ void ft_board_setup(void *blob, bd_t *bd)
size = getenv_bootm_size();
fdt_fixup_memory(blob, (u64)base, (u64)size);
+#ifdef CONFIG_FDT_FIXUP_PARTITIONS
+ fdt_fixup_mtdparts(blob, nodes, ARRAY_SIZE(nodes));
+#endif
fdt_fixup_dr_usb(blob, bd);
}
diff --git a/include/configs/BSC9131RDB.h b/include/configs/BSC9131RDB.h
index bc5af526c5..adb81461dd 100644
--- a/include/configs/BSC9131RDB.h
+++ b/include/configs/BSC9131RDB.h
@@ -400,6 +400,23 @@ extern unsigned long get_sdram_size(void);
#endif
/*
+ * Dynamic MTD Partition support with mtdparts
+ */
+#define CONFIG_MTD_DEVICE
+#define CONFIG_MTD_PARTITIONS
+#define CONFIG_CMD_MTDPARTS
+#define MTDIDS_DEFAULT "nand0=ff800000.flash,"
+#define MTDPARTS_DEFAULT "mtdparts=ff800000.flash:1m(uboot)," \
+ "8m(kernel),512k(dtb),-(fs)"
+/*
+ * Override partitions in device tree using info
+ * in "mtdparts" environment variable
+ */
+#ifdef CONFIG_CMD_MTDPARTS
+#define CONFIG_FDT_FIXUP_PARTITIONS
+#endif
+
+/*
* Environment Configuration
*/