From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jean-Christophe PLAGNIOL-VILLARD Date: Sat, 5 Sep 2009 02:30:37 +0200 Subject: [U-Boot] [PATCH 8/8] OMAP3 zoom2 Use usbtty if the debug board is not connected. In-Reply-To: <1252095170-5492-8-git-send-email-Tom.Rix@windriver.com> References: <1252095170-5492-1-git-send-email-Tom.Rix@windriver.com> <1252095170-5492-2-git-send-email-Tom.Rix@windriver.com> <1252095170-5492-3-git-send-email-Tom.Rix@windriver.com> <1252095170-5492-4-git-send-email-Tom.Rix@windriver.com> <1252095170-5492-5-git-send-email-Tom.Rix@windriver.com> <1252095170-5492-6-git-send-email-Tom.Rix@windriver.com> <1252095170-5492-7-git-send-email-Tom.Rix@windriver.com> <1252095170-5492-8-git-send-email-Tom.Rix@windriver.com> Message-ID: <20090905003037.GD30118@game.jcrosoft.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 > --- > 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.