summaryrefslogtreecommitdiff
path: root/board
diff options
context:
space:
mode:
authorAshish Kumar <Ashish.Kumar@freescale.com>2014-10-06 18:24:56 +0530
committerYork Sun <yorksun@freescale.com>2014-11-14 11:12:14 -0800
commit42a9e2fe1be0f8879ad0928e05116e5a4c7cea1a (patch)
tree6b017f1830731ce544552fdf8505891b688d780c /board
parentaa5a3d8d4622fc5f0115aa7c4ac752ae60458a44 (diff)
downloadu-boot-imx-42a9e2fe1be0f8879ad0928e05116e5a4c7cea1a.zip
u-boot-imx-42a9e2fe1be0f8879ad0928e05116e5a4c7cea1a.tar.gz
u-boot-imx-42a9e2fe1be0f8879ad0928e05116e5a4c7cea1a.tar.bz2
powerpc/BSC9132QDS: Enable creation of dynamic partition for NAND and NOR
* fdt_fixup_mtdparts is called from ft_board_setup * run "mtdparts default" to create NAND, NOR partition on uboot * Use mtdparts to create partitions dynamically rather than using static partitions in device tree Signed-off-by: Ashish Kumar <Ashish.Kumar@freescale.com> Reviewed-by: York Sun <yorksun@freescale.com>
Diffstat (limited to 'board')
-rw-r--r--board/freescale/bsc9132qds/bsc9132qds.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/board/freescale/bsc9132qds/bsc9132qds.c b/board/freescale/bsc9132qds/bsc9132qds.c
index 10580bc..c88838b 100644
--- a/board/freescale/bsc9132qds/bsc9132qds.c
+++ b/board/freescale/bsc9132qds/bsc9132qds.c
@@ -21,6 +21,9 @@
#include <hwconfig.h>
#include <i2c.h>
#include <fsl_ddr_sdram.h>
+#include <jffs2/load_kernel.h>
+#include <mtd_node.h>
+#include <flash.h>
#ifdef CONFIG_PCI
#include <pci.h>
@@ -354,6 +357,12 @@ void fdt_del_node_compat(void *blob, const char *compatible)
}
#if defined(CONFIG_OF_BOARD_SETUP)
+#ifdef CONFIG_FDT_FIXUP_PARTITIONS
+struct node_info nodes[] = {
+ { "cfi-flash", MTD_DEV_TYPE_NOR, },
+ { "fsl,ifc-nand", MTD_DEV_TYPE_NAND, },
+};
+#endif
void ft_board_setup(void *blob, bd_t *bd)
{
phys_addr_t base;
@@ -369,6 +378,9 @@ void ft_board_setup(void *blob, bd_t *bd)
#endif
fdt_fixup_memory(blob, (u64)base, (u64)size);
+#ifdef CONFIG_FDT_FIXUP_PARTITIONS
+ fdt_fixup_mtdparts(blob, nodes, ARRAY_SIZE(nodes));
+#endif
ccsr_gur_t *gur = (void *)(CONFIG_SYS_MPC85xx_GUTS_ADDR);
u32 porbmsr = in_be32(&gur->porbmsr);