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

Chunhe Lan Chunhe.Lan at freescale.com
Fri Aug 12 05:18:58 CEST 2011


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 at freescale.com>
---
 board/freescale/p1023rds/p1023rds.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/board/freescale/p1023rds/p1023rds.c b/board/freescale/p1023rds/p1023rds.c
index 8cfd199..b3511a4 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
+	fdt_set_node_status(fdt, "nor_flash", "disabled");
+	fdt_set_node_status(fdt, "nand_flash", "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
-- 
1.5.6.5




More information about the U-Boot mailing list