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

Chunhe Lan b25806 at freescale.com
Mon Aug 29 04:53:57 CEST 2011


On Mon, 29 Aug 2011 02:14:20 +0800, Kumar Gala <kumar.gala at freescale.com>  
wrote:

>
> 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):

      OK.

>     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>
>
> Can you provide example of what the device tree looks like for the two  
> cases.

    OK.

>> ---
>> 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()

     OK.

    Thanks.

    -Jack Lan

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