diff mbox

[U-Boot,2/2,v2] powerpc/p1023rds: Enable nand node and disable nor node

Message ID 1313480048-14289-1-git-send-email-Chunhe.Lan@freescale.com
State Superseded
Headers show

Commit Message

Chunhe Lan Aug. 16, 2011, 7:34 a.m. UTC
In the p1023rds, accessing exclusively nor flash or nand flash
device by BR0/OR0. When booting from nor flash, nand node is
disabled and nor node is enabled in the default dtb. So, when
booting from nand flash, nand node should be enabled and nor
node should be disabled.

Signed-off-by: Chunhe Lan <Chunhe.Lan@freescale.com>
---
 board/freescale/p1023rds/p1023rds.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)
diff mbox

Patch

diff --git a/board/freescale/p1023rds/p1023rds.c b/board/freescale/p1023rds/p1023rds.c
index 8cfd199..2fec3ee 100644
--- a/board/freescale/p1023rds/p1023rds.c
+++ b/board/freescale/p1023rds/p1023rds.c
@@ -146,6 +146,14 @@  int board_eth_init(bd_t *bis)
 	return pci_eth_init(bis);
 }
 
+void fdt_fixup_flash(void *fdt)
+{
+#ifdef CONFIG_NAND_U_BOOT
+	do_fixup_by_path_string(fdt, "nor_flash", "status", "disabled");
+	do_fixup_by_path_string(fdt, "nand_flash", "status", "okay");
+#endif
+}
+
 #if defined(CONFIG_OF_BOARD_SETUP)
 void ft_board_setup(void *blob, bd_t *bd)
 {
@@ -158,5 +166,7 @@  void ft_board_setup(void *blob, bd_t *bd)
 	size = getenv_bootm_size();
 
 	fdt_fixup_memory(blob, (u64)base, (u64)size);
+
+	fdt_fixup_flash(blob);
 }
 #endif