diff options
author | Chunhe Lan <Chunhe.Lan@freescale.com> | 2012-04-18 15:58:56 -0500 |
---|---|---|
committer | Andy Fleming <afleming@freescale.com> | 2012-04-24 23:58:30 -0500 |
commit | 617e46e3c01da2785d320d48d1248c97edbab685 (patch) | |
tree | 0a37f538ccbdc59c21dc8c2a87071cc1c1070f73 /board/freescale/p1023rds | |
parent | 61ddce07f8b96c5df7d00466b4da9edaecb0eff1 (diff) | |
download | u-boot-imx-617e46e3c01da2785d320d48d1248c97edbab685.zip u-boot-imx-617e46e3c01da2785d320d48d1248c97edbab685.tar.gz u-boot-imx-617e46e3c01da2785d320d48d1248c97edbab685.tar.bz2 |
powerpc/p1023rds: Disable nor flash node and enable nand flash node
In the p1023rds, when system boots from nor flash, kernel only accesses nor
flash and can not access nand flash with BR0/OR0; when system boots from
nand flash, kernel only accesses nand flash and can not access nor flash
with BR0/OR0.
Default device tree nor and nand node should have the following structure:
Example:
nor_flash: nor@0,0 {
#address-cells = <1>;
#size-cells = <1>;
compatible = "cfi-flash";
reg = <0x0 0x0 0x02000000>;
bank-width = <2>;
device-width = <1>;
status = "okay";
partition@0 {
label = "ramdisk";
reg = <0x00000000 0x01c00000>;
};
}
nand_flash: nand@1,0 {
#address-cells = <1>;
#size-cells = <1>;
compatible = "fsl,p1023-fcm-nand",
"fsl,elbc-fcm-nand";
reg = <0x2 0x0 0x00040000>;
status = "disabled";
u-boot-nand@0 {
/* This location must not be altered */
/* 1MB for u-boot Bootloader Image */
reg = <0x0 0x00100000>;
read-only;
};
}
When booting from nor flash, the status of nor node is enabled and the
status of nand node is disabled in the default dts file, so do not do
anything.
But, when booting from nand flash, need to do some operations:
o Disable the NOR node by setting status = "disabled";
o Enable the NAND node by setting status = "okay";
Signed-off-by: Chunhe Lan <Chunhe.Lan@freescale.com>
Signed-off-by: Andy Fleming <afleming@freescale.com>
Diffstat (limited to 'board/freescale/p1023rds')
-rw-r--r-- | board/freescale/p1023rds/p1023rds.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/board/freescale/p1023rds/p1023rds.c b/board/freescale/p1023rds/p1023rds.c index 546819c..082976a 100644 --- a/board/freescale/p1023rds/p1023rds.c +++ b/board/freescale/p1023rds/p1023rds.c @@ -197,6 +197,12 @@ void ft_board_setup(void *blob, bd_t *bd) fdt_fixup_memory(blob, (u64)base, (u64)size); + /* By default NOR is on, and NAND is disabled */ +#ifdef CONFIG_NAND_U_BOOT + do_fixup_by_path_string(blob, "nor_flash", "status", "disabled"); + do_fixup_by_path_string(blob, "nand_flash", "status", "okay"); +#endif + fdt_fixup_fman_ethernet(blob); } #endif |