public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Marek Vasut <marex@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 3/7] S3C24XX: Add serial driver
Date: Thu, 13 Sep 2012 11:17:51 +0200	[thread overview]
Message-ID: <201209131117.51999.marex@denx.de> (raw)
In-Reply-To: <50512ED2.4020803@inov.pt>

Dear Jos? Miguel Gon?alves,

> Hi Marek,
> 
> On 09/12/2012 10:01 PM, Marek Vasut wrote:
> > Dear Jos? Miguel Gon?alves,
> > 
> >> Serial driver for the S3C24XX SoCs.
> >> 
> >> Signed-off-by: Jos? Miguel Gon?alves <jose.goncalves@inov.pt>
> >> ---
> >> 
> >>   drivers/serial/Makefile         |    1 +
> >>   drivers/serial/s3c24xx_serial.c |  146
> >> 
> >> +++++++++++++++++++++++++++++++++++++++ 2 files changed, 147
> >> insertions(+)
> >> 
> >>   create mode 100644 drivers/serial/s3c24xx_serial.c
> >> 
> >> diff --git a/drivers/serial/Makefile b/drivers/serial/Makefile
> >> index 65d0f23..2cbdaac 100644
> >> --- a/drivers/serial/Makefile
> >> +++ b/drivers/serial/Makefile
> >> @@ -52,6 +52,7 @@ COBJS-$(CONFIG_PL011_SERIAL) += serial_pl01x.o
> >> 
> >>   COBJS-$(CONFIG_PXA_SERIAL) += serial_pxa.o
> >>   COBJS-$(CONFIG_SA1100_SERIAL) += serial_sa1100.o
> >>   COBJS-$(CONFIG_S3C24X0_SERIAL) += serial_s3c24x0.o
> >> 
> >> +COBJS-$(CONFIG_S3C24XX_SERIAL) += s3c24xx_serial.o
> > 
> > What's the difference between those two drivers ?!
> 
> No substantial differences exists. The UART controller block is the same
> in all S3C24XX chips. One difference is the number of UARTs. The more
> recent chips (S3C2416 & S3C2450) have 4 instead of the 3 found on the
> old ones. Besides that, the driver that I submitted uses a more precise
> method for baudrate generation.

So we will have two drivers for the same hardware? No way ... Use the original 
one and apply incremental patches onto it to improve it.

> >> +
> >> +#ifdef CONFIG_SERIAL0
> >> +#define UART_NR	S3C24XX_UART0
> >> +
> >> +#elif defined(CONFIG_SERIAL1)
> >> +#define UART_NR	S3C24XX_UART1
> >> +
> >> +#elif defined(CONFIG_SERIAL2)
> >> +#define UART_NR	S3C24XX_UART2
> >> +
> >> +#elif defined(CONFIG_SERIAL3)
> >> +#define UART_NR	S3C24XX_UART3
> >> +
> >> +#else
> >> +#error "Bad: you didn't configure serial ..."
> > 
> > Error itself is "Bad:" so remove it
> 
> OK.
> 
> >> +#endif
> >> +
> >> +#define barrier() asm volatile("" ::: "memory")
> > 
> > Is that even used ?
> 
> Yes. Without it the GCC optimization removes the loop at the end of the
> baurate generation routine.

So it's yet another accessor issue.
[...]

But anyway, there's more. I'd like to teach you how to do things properly. So 
let's focus on the in-tree driver and fix that one. Incrementally and in small 
steps.
Best regards,
Marek Vasut

  reply	other threads:[~2012-09-13  9:17 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-12 11:15 [U-Boot] [PATCH 0/7] Add support to MINI2416 board José Miguel Gonçalves
2012-09-12 11:15 ` [U-Boot] [PATCH 1/7] ARM: fix relocation on ARM926EJS José Miguel Gonçalves
2012-09-12 11:15 ` [U-Boot] [PATCH 2/7] S3C24XX: Add core support for Samsung's S3C24XX SoCs José Miguel Gonçalves
2012-09-12 11:15 ` [U-Boot] [PATCH 3/7] S3C24XX: Add serial driver José Miguel Gonçalves
2012-09-12 21:01   ` Marek Vasut
2012-09-13  0:54     ` José Miguel Gonçalves
2012-09-13  9:17       ` Marek Vasut [this message]
2012-09-13  9:30         ` José Miguel Gonçalves
2012-09-12 11:15 ` [U-Boot] [PATCH 4/7] S3C24XX: Add RTC driver José Miguel Gonçalves
2012-09-12 21:03   ` Marek Vasut
2012-09-12 23:28     ` José Miguel Gonçalves
2012-09-12 11:15 ` [U-Boot] [PATCH 5/7] S3C24XX: Add NAND Flash driver José Miguel Gonçalves
2012-09-12 21:11   ` Marek Vasut
2012-09-12 23:16     ` José Miguel Gonçalves
2012-09-12 23:20       ` Scott Wood
2012-09-13  0:18         ` José Miguel Gonçalves
2012-09-13  0:24           ` Marek Vasut
2012-09-13  0:40             ` José Miguel Gonçalves
2012-09-13  0:44               ` Marek Vasut
2012-09-12 23:45       ` Marek Vasut
2012-09-12 23:55         ` José Miguel Gonçalves
2012-09-12 11:15 ` [U-Boot] [PATCH 6/7] Add u-boot-ubl.bin target to the Makefile José Miguel Gonçalves
2012-09-12 11:15 ` [U-Boot] [PATCH 7/7] S3C24XX: Add support to MINI2416 board José Miguel Gonçalves

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=201209131117.51999.marex@denx.de \
    --to=marex@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox