[U-Boot] [PATCH 8/8] OMAP3 zoom2 Use usbtty if the debug board is not connected.

Tom
2009-09-06T13:21:23Z

Jean-Christophe PLAGNIOL-VILLARD wrote:
> On 15:12 Fri 04 Sep , Tom Rix wrote:
>
>> The preferred serial output comes from the debug board.
>> When the debug board is disconnected, fall back on using
>> usbtty from the usb connector on the Zoom2 board.
>>
>> This shows up as /dev/ttyACM0 in a linux host.
>>
>> Signed-off-by: Tom Rix <Tom.Rix@windriver.com>
>> ---
>> board/omap3/zoom2/zoom2_serial.c | 16 ++++++++++++++++
>> include/configs/omap3_zoom2.h | 17 +++++++++++++++++
>> 2 files changed, 33 insertions(+), 0 deletions(-)
>>
>> diff --git a/board/omap3/zoom2/zoom2_serial.c b/board/omap3/zoom2/zoom2_serial.c
>> index a3d777d..434696a 100644
>> --- a/board/omap3/zoom2/zoom2_serial.c
>> +++ b/board/omap3/zoom2/zoom2_serial.c
>> @@ -87,6 +87,10 @@ void quad_putc_dev (unsigned long base, const char c)
>>
>> NS16550_putc ((NS16550_t) base, c);
>> }
>> +#ifdef CONFIG_USB_TTY
>>
> why not do this
> #ifndef CONFIG_USB_TTY
> #define usbtty_putc(c)
> #define usbtty_puts(s)
> #define usbtty_getc() 0
> #define usbtty_tstc() 0
> #endif
>
> and then avoid the ifdef
>
>
Yes I agree.
I will add stubs to the declarations in serial.h
Tom

> Best Regards,
> J.
>