All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wolfgang Denk <wd@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] ZOOM2 Add serial support.
Date: Wed, 01 Apr 2009 22:25:32 +0200	[thread overview]
Message-ID: <20090401202532.6C88183797DC@gemini.denx.de> (raw)
In-Reply-To: <1238602273-27252-4-git-send-email-Tom.Rix@windriver.com>

Dear Tom Rix,

In message <1238602273-27252-4-git-send-email-Tom.Rix@windriver.com> you wrote:
> Zoom2 serial is in general supplied by one of the 4 UARTS on the debug board.
> The default serial is from the USB connector on left side of the debug board.
> The USB connector will produce 2 of the 4 UARTS.  On your host pick the first
> enumeration.
> 
> The serial port set up is the same with Zoom1.
> Baud rate 115200, 8 bit data, no parity, 1 stop bit, no flow.
> 
> The kernel bootargs are
> console=ttyS3,115200n8
...
> diff --git a/board/omap3/zoom2/Makefile b/board/omap3/zoom2/Makefile
> index b8fa5a7..d27990c 100644
> --- a/board/omap3/zoom2/Makefile
> +++ b/board/omap3/zoom2/Makefile
> @@ -26,7 +26,8 @@ include $(TOPDIR)/config.mk
>  LIB	= $(obj)lib$(BOARD).a
>  
>  COBJS	:= zoom2.o \
> -	debug_board.o
> +	debug_board.o \
> +	zoom2_serial.o

Please sort lists.

>  SRCS	:= $(COBJS:.o=.c)
>  OBJS	:= $(addprefix $(obj),$(COBJS))
> diff --git a/board/omap3/zoom2/zoom2_serial.c b/board/omap3/zoom2/zoom2_serial.c
> new file mode 100644
> index 0000000..c1c4f4a
> --- /dev/null
> +++ b/board/omap3/zoom2/zoom2_serial.c
...
> +int quad_init_dev(unsigned long base)
> +{
> +	/* The Quad UART is on the debug board.
> +	   Check if the debug board is attached before using the UART */

Incorrect multiline comment style. Please fix globally.


> diff --git a/drivers/serial/ns16550.c b/drivers/serial/ns16550.c
> index 397f5df..93a1bd2 100644
> --- a/drivers/serial/ns16550.c
> +++ b/drivers/serial/ns16550.c
> @@ -14,9 +14,18 @@
>  void NS16550_init (NS16550_t com_port, int baud_divisor)
>  {
>  	com_port->ier = 0x00;
> -#ifdef CONFIG_OMAP
> +#if defined(CONFIG_OMAP) && !defined(CONFIG_OMAP3_ZOOM2)
>  	com_port->mdr1 = 0x7;	/* mode select reset TL16C750*/
>  #endif
> +#if defined(CONFIG_OMAP3_ZOOM2)
> +	/* On Zoom2 board Set pre-scalar to 1
> +	 * CLKSEL is GND => MCR[7] is 1 => preslr is 4
> +	 * So change the prescl to 1
> +	 */
> +	com_port->lcr = 0xBF;
> +	com_port->fcr |= 0x10;
> +	com_port->mcr &= 0x7F;

Please don't add such strictly board-specific code to global driver
files.

> diff --git a/include/serial.h b/include/serial.h
> index e3d8b36..aca5221 100644
> --- a/include/serial.h
> +++ b/include/serial.h
> @@ -42,6 +42,13 @@ extern struct serial_device s3c24xx_serial1_device;
>  extern struct serial_device s3c24xx_serial2_device;
>  #endif
>  
> +#if defined(CONFIG_OMAP3_ZOOM2)
> +extern struct serial_device zoom2_serial_device0;
> +extern struct serial_device zoom2_serial_device1;
> +extern struct serial_device zoom2_serial_device2;
> +extern struct serial_device zoom2_serial_device3;
> +#endif
> +

Please don't add such strictly board-specific code to global header
files.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"Am besten betrachten Sie Fehlermeldungen als eine  Art  Psycho-Test,
mit  dem  herausgefunden  werden soll, wie belastbar Sie sind."
 - Dr. R. Wonneberger, Kompaktf?hrer LaTeX, Kap. 1.6: Fehlermeldungen

  parent reply	other threads:[~2009-04-01 20:25 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-01 16:11 [U-Boot] [PATCH] ZOOM2 Add initial support for Zoom2 Tom Rix
2009-04-01 16:11 ` [U-Boot] [PATCH] ZOOM2 Mux changes to support zoom2 configuration Tom Rix
2009-04-01 16:11   ` [U-Boot] [PATCH] ZOOM2 Add support for debug board detection Tom Rix
2009-04-01 16:11     ` [U-Boot] [PATCH] ZOOM2 Add serial support Tom Rix
2009-04-01 16:11       ` [U-Boot] [PATCH] ZOOM2 Add led support Tom Rix
2009-04-01 20:25       ` Wolfgang Denk [this message]
2009-04-01 20:45         ` [U-Boot] [PATCH] ZOOM2 Add serial support Tom
2009-04-01 21:36           ` Wolfgang Denk
2009-04-01 20:21     ` [U-Boot] [PATCH] ZOOM2 Add support for debug board detection Wolfgang Denk
2009-04-01 19:51 ` [U-Boot] [PATCH] ZOOM2 Add initial support for Zoom2 Scott Wood
2009-04-01 20:46   ` Tom
2009-04-01 20:19 ` Wolfgang Denk
2009-04-02  0:53   ` Tom
2009-04-01 19:11 [U-Boot] [PATCH] ZOOM2 Add serial support Tom Rix

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090401202532.6C88183797DC@gemini.denx.de \
    --to=wd@denx.de \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.