[U-Boot] [PATCH 1/2] mpc83xx: Add a GPIO driver for the MPC83XX family
Joe Hershberger
joe.hershberger at gmail.com
Wed Aug 10 00:23:12 CEST 2011
On Tue, Aug 9, 2011 at 5:15 PM, Scott Wood <scottwood at freescale.com> wrote:
> On 08/09/2011 05:31 PM, Joe Hershberger wrote:
>> diff --git a/arch/powerpc/include/asm/arch-mpc83xx/gpio.h b/arch/powerpc/include/asm/arch-mpc83xx/gpio.h
>> new file mode 100644
>> index 0000000..4319d07
>> --- /dev/null
>> +++ b/arch/powerpc/include/asm/arch-mpc83xx/gpio.h
> [snip
>> +void gpio_init_f(void);
>> +void gpio_init_r(void);
>
> These are quite generic function names for 83xx to claim. If it's to be
> part of the generic gpio API, why not add it to asm/gpio.h?
That's a good point. I'll make them board specific since the board
init must call them (there isn't a generic place that will call them).
>> @@ -140,6 +146,9 @@ void board_init_f(ulong bootflag)
>>
>> void board_init_r(gd_t *gd, ulong dest_addr)
>> {
>> +#if defined(CONFIG_MPC83XX_GPIO) && !defined(CONFIG_NAND_SPL)
>> + gpio_init_r();
>> +#endif
>> nand_boot();
>> }
>
> This instance of board_init_r() is only for CONFIG_NAND_SPL, so this
> won't do anything.
>
> Maybe create a board_early_init_r() for this board?
Sounds good.
-Joe
More information about the U-Boot
mailing list