[U-Boot] [PATCH 18/18] Make the at91sam9263ek compile again.

Andreas Bießmann andreas.devel at googlemail.com
Mon Feb 21 14:09:31 CET 2011


Dear Remy Bohmer,

Am 21.02.2011 12:00, schrieb Remy Bohmer:

>> diff --git a/board/atmel/at91sam9263ek/led.c b/board/atmel/at91sam9263ek/led.c
>> index fa1f05b..b3adc51 100644
>> --- a/board/atmel/at91sam9263ek/led.c
>> +++ b/board/atmel/at91sam9263ek/led.c
>> @@ -23,25 +23,22 @@
>>  */
>>
>>  #include <common.h>
>> -#include <asm/arch/hardware.h>
>> -#include <asm/arch/at91_pmc.h>
>> -#include <asm/arch/at91_pio.h>
>>  #include <asm/arch/gpio.h>
>> -#include <asm/arch/io.h>
>> +#include <asm/arch/at91_pmc.h>
>>
>>  void coloured_LED_init(void)
>>  {
>>        /* Enable clock */
>>        at91_pmc_t      *pmc    = (at91_pmc_t *) AT91_PMC_BASE;
>>
>> -       writel(1 << AT91SAM9263_ID_PIOB | 1 << AT91SAM9263_ID_PIOCDE,
>> +       writel(1 << AT91_ID_PIOB | 1 << AT91_ID_PIOCDE,
>>                &pmc->pcer);
> 
> Enable all the GPIO peripheral clocks in a board_early_init_f() routine.
> Not here.

No, that is wrong! board_early_init_f() is too late! coloured_LED stuff
is used (currently) in early init stage for debugging. Therefore we need
to initialize the clocks here. Nevertheless it should preserve old
settings in PCER!

If we need these coloured_LED stuff beside the other LED
implementation's is another question.

regards

Andreas Bießmann


More information about the U-Boot mailing list