On Aug 17, 2011, at 1:24 AM, Chunhe Lan wrote:

> 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.

Fix where you break the line, should like more like (use upto 75 chars per 
line):

    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....@freescale.com>

Can you provide example of what the device tree looks like for the two cases.

> ---
> 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..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
> +}
> +

No need for a separate function, just put the two line in ft_board_setup()

> #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


_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to