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

Jean-Christophe PLAGNIOL-VILLARD plagnioj at jcrosoft.com
Sat Sep 5 02:30:37 CEST 2009


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 at 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

Best Regards,
J.


More information about the U-Boot mailing list