[U-Boot] [PATCH V4 1/4] arm: Tegra2: Add basic NVIDIA Tegra2 SoC support

Tom Warren twarren.nvidia at gmail.com
Fri Jan 21 19:42:25 CET 2011


seedshope, (?)

On Fri, Jan 21, 2011 at 9:35 AM, seedshope <bocui107 at gmail.com> wrote:
> On 01/21/2011 08:42 AM, Tom Warren wrote:
>>
>> +
>> +enum {
>> +       UART_A = 1,
>> +       UART_B,
>> +       UART_C,
>> +       UART_D,
>> +       UART_E
>> +};
>> +
>> +#endif /* _BOARD_H_ */
>>
<snip>

>> +
>> +#if CONFIG_TEGRA2_ENABLE_UARTA
>> +       if (uart_num  == UART_A) {
>
> Why  you need get the parameters uart_num, I think if you want to use
> CONFIG_TEGRA2_ENABLE_UARTA,
> You  only defined CONFIG_TEGRA2_ENABLE_UARTA in include/configs/seaboard.h
> or include/configs/tegra2-common.h.
>
OK, makes sense. I'll move uart.c/board.h to drivers/serial as
serial_tegra2.[ch] and remove
all mention of UART_[A-E] and uart_num. Thanks.

> Here, The code formats may be as following:
>
> #ifdef CONFIG_SERIAL1
> ......
> #elif defined(CONFIG_SERIAL2)
> ......
> #else
> ......
> #endif
>
Some configs / builds can have both UARTs active, so each
#ifdef/#endif pair is needed.

> Thanks
> seedshope
Thanks for the feedback

Tom


More information about the U-Boot mailing list