[U-Boot] [PATCH] at91: Add support for taskit AT91SAM9G20 boards.

Andreas Bießmann
2012-08-06T12:49:51Z

Dear Markus Hubig,

On 02.08.2012 16:14, Markus Hubig wrote:
> On Wed, Aug 01, 2012 at 11:58:22AM +0200, Andreas Bie?mann wrote:
>> On 30.07.12 20:01, Markus Hubig wrote:
>>>
>
> <snipp>
>
>>> +int board_early_init_f(void)
>>> +{
>>> + struct at91_pmc *pmc = (struct at91_pmc *)ATMEL_BASE_PMC;
>>> +
>>> + /* Enable clocks for all PIOs */
>>> + writel((1 << ATMEL_ID_PIOA) | (1 << ATMEL_ID_PIOB) |
>>> + (1 << ATMEL_ID_PIOC), &pmc->pcer);
>>
>> you should initialize seriald_hw here to avoid strange characters on
>> serial line when switching from at91bootstrap to u-boot.
>
> <snip>
>
>>> + /* adress of boot parameters */
>>> + gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE + 0x100;
>>> +
>>> + at91_set_gpio_output(AT91_PIN_PC9, 1);
>>> + at91_set_gpio_output(AT91_PIN_PC5, 1);
>>
>> Can you please add some comment why switching these pins?
>
> OK now I now that PC5 switches the red LED on and there since is a
> LED framework in u-boot I will use that in a later patch.
>
> PC9 is somewhat strange. If I set it to 0 I don't have a console!

can you please ask at taskit what function this pin has and document it
here?

> So I tried to put both
>
> | at91_set_gpio_output(AT91_PIN_PC9, 1);
> | at91_seriald_hw_init();
>
> into board_early_init_f() to avoid the strange characters at boot time,
> but again no console output ...
>
> Further tests showed that It seems that I can't use at91_set_gpio_output()
> inside board_early_init_f(). Switching on the red LED with PC5 also do not
> work in board_early_init_f() ...
>
> Any ideas?

Not currently. Maybe the PC9 has some vital functionality for UART to
work (some switch, power, ...) and is reset by another part running
after board_early_init_f()?

>
> Cheers, Markus

Best regards

Andreas Bie?mann