S5PC100: serial driver for SMDKC100 support
PATCH 3/6 S5PC100: serial driver for SMDKC100 support
This patch is the serial driver for S5PC100 & SMDKC100.
Signed-off-by HeungJun, Kim <[email protected]>
---
drivers/serial/Makefile | 1 + drivers/serial/serial_s5pc100.c | 179 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 180 insertions(+), 0 deletions(-) create mode 100644 drivers/serial/serial_s5pc100.c
drivers/serial/Makefile +1 -0
@@ -49,6 +49,7 @@ COBJS-$(CONFIG_PXA_SERIAL) += serial_pxa.o COBJS-$(CONFIG_SA1100_SERIAL) += serial_sa1100.o COBJS-$(CONFIG_S3C24X0_SERIAL) += serial_s3c24x0.o COBJS-$(CONFIG_S3C44B0_SERIAL) += serial_s3c44b0.o +COBJS-$(CONFIG_S5PC100_SERIAL) += serial_s5pc100.o COBJS-$(CONFIG_XILINX_UARTLITE) += serial_xuartlite.o COBJS-$(CONFIG_SCIF_CONSOLE) += serial_sh.o COBJS-$(CONFIG_USB_TTY) += usbtty.o
drivers/serial/serial_s5pc100.c new file +179 -0
179 lines not on this page · raw message
Signature · 1 line
1.5.6.3
PATCH 3/6 S5PC100: serial driver for SMDKC100 support
Dear HeungJun Kim,
Quoted 3 lines · In message <[email protected]> you…
This patch is the serial driver for S5PC100 & SMDKC100.
Signed-off-by HeungJun, Kim <[email protected]>
I think this patch should be merged with the patch(es) that add the rest of the code.
Quoted 5 lines
drivers/serial/serial_s5pc100.c new file +0
-0
...
drivers/serial/serial_s5pc100.c line 87
Quoted 12 lines
drivers/serial/serial_s5pc100.c new file +12
-0+void serial_setbrg (void ) +{ +DECLARE_GLOBAL_DATA_PTR ; +s5pc1xx_uart_t *const uart =s5pc1xx_get_base_uart (UART_NR ); +u32 pclk =get_PCLK (); +u32 baudrate = gd->baudrate; +int i; + + i = (pclk / baudrate) %16 ; + + uart->UBRDIV = pclk / baudrate /16 -1 ; + uart->UDIVSLOT = udivslot[i];
Please use I/O accessors instead of register writes. [Here and everywhere.]
drivers/serial/serial_s5pc100.c line 90
Quoted 2 lines
drivers/serial/serial_s5pc100.c new file +2
-0+for (i =0 ; i <100 ; i++); +barrier ();
What's this? This should not be needed.
Best regards,
Wolfgang Denk
Signature · 5 lines
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 Unix is supported by IBM, like a hanging man is supported by rope. - Don Libes & Sandy Ressler: _Life With Unix_