public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Tom <Tom.Rix@windriver.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] ZOOM2 Add serial support.
Date: Wed, 01 Apr 2009 15:45:22 -0500	[thread overview]
Message-ID: <49D3D262.5010602@windriver.com> (raw)
In-Reply-To: <20090401202532.6C88183797DC@gemini.denx.de>

Wolfgang Denk wrote:
> 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.
>
>   
This was fixed on the last patch for led support.
>>  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.
>
>   
OK
I will move this.
>> 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.
>
>   
The other boards that do CONFIG_SERIAL_MULTI do the same thing.
Can I have a pass on this ?
> Best regards,
>
> Wolfgang Denk
>
>   

  reply	other threads:[~2009-04-01 20:45 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       ` [U-Boot] [PATCH] ZOOM2 Add serial support Wolfgang Denk
2009-04-01 20:45         ` Tom [this message]
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
  -- strict thread matches above, loose matches on Subject: below --
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=49D3D262.5010602@windriver.com \
    --to=tom.rix@windriver.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox