[U-Boot] [PATCH] PXA: Fix building for lubbock board

Marek Vasut marek.vasut at gmail.com
Mon Dec 12 16:23:37 CET 2011


> Fix:
> drivers/mmc/libmmc.o: In function `mmc_legacy_init':
> drivers/mmc/pxa_mmc.c:565: undefined reference to `set_GPIO_mode'
> drivers/mmc/pxa_mmc.c:566: undefined reference to `set_GPIO_mode'
> 
> Re-add set_GPIO_mode() which has been removed by commit
> d10237d275300562bbfecbbe2f59a97cfb9dc180 (PXA: Separate
> PXA2xx CPU init).
> 
> Signed-off-by: Anatolij Gustschin <agust at denx.de>
> Cc: Marek Vasut <marek.vasut at gmail.com>
> ---
>  arch/arm/cpu/pxa/pxa2xx.c |   25 +++++++++++++++++++++++++
>  1 files changed, 25 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/arm/cpu/pxa/pxa2xx.c b/arch/arm/cpu/pxa/pxa2xx.c
> index 09e8177..42fb4fc 100644
> --- a/arch/arm/cpu/pxa/pxa2xx.c
> +++ b/arch/arm/cpu/pxa/pxa2xx.c
> @@ -299,3 +299,28 @@ void reset_cpu(ulong ignored)
>  	for (;;)
>  		;
>  }
> +
> +#ifndef CONFIG_CPU_MONAHANS
> +void set_GPIO_mode(int gpio_mode)
> +{
> +	int gpio = gpio_mode & GPIO_MD_MASK_NR;
> +	int fn = (gpio_mode & GPIO_MD_MASK_FN) >> 8;
> +	int val;
> +
> +	/* This below changes direction setting of GPIO "gpio" */
> +	val = readl(GPDR(gpio));
> +
> +	if (gpio_mode & GPIO_MD_MASK_DIR)
> +		val |= GPIO_bit(gpio);
> +	else
> +		val &= ~GPIO_bit(gpio);
> +
> +	writel(val, GPDR(gpio));
> +
> +	/* This below updates only AF of GPIO "gpio" */
> +	val = readl(GAFR(gpio));
> +	val &= ~(0x3 << (((gpio) & 0xf) * 2));
> +	val |= fn << (((gpio) & 0xf) * 2);
> +	writel(val, GAFR(gpio));
> +}
> +#endif /* CONFIG_CPU_MONAHANS */

NAK, this is insane and should die. I'll submit a proper patch.

M


More information about the U-Boot mailing list