[U-Boot] [PATCH 1/2] mpc83xx: Add a GPIO driver for the MPC83XX family

Scott Wood scottwood at freescale.com
Wed Aug 10 00:15:17 CEST 2011


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?

> @@ -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?

-Scott



More information about the U-Boot mailing list