]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
SAMSUNG: serial: modify name from s5pc1xx to s5p
authorMinkyu Kang <mk7.kang@samsung.com>
Wed, 24 Mar 2010 07:59:30 +0000 (16:59 +0900)
committerMinkyu Kang <mk7.kang@samsung.com>
Fri, 26 Mar 2010 04:56:59 +0000 (13:56 +0900)
Because of other s5p series SoC will use these serial functions,
modify function's name and structure's name.

Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
common/serial.c
drivers/serial/Makefile
drivers/serial/serial_s5p.c [moved from drivers/serial/serial_s5pc1xx.c with 83% similarity]
include/asm-arm/arch-s5pc1xx/uart.h
include/serial.h

index 5f9ffd7e4575e8608d393f9caadc5555a89197dd..94e192121130b04b2c47834bb7dff99e2b0d6fbf 100644 (file)
@@ -71,13 +71,13 @@ struct serial_device *__default_serial_console (void)
 #endif
 #elif defined(CONFIG_S5PC1XX)
 #if defined(CONFIG_SERIAL0)
-       return &s5pc1xx_serial0_device;
+       return &s5p_serial0_device;
 #elif defined(CONFIG_SERIAL1)
-       return &s5pc1xx_serial1_device;
+       return &s5p_serial1_device;
 #elif defined(CONFIG_SERIAL2)
-       return &s5pc1xx_serial2_device;
+       return &s5p_serial2_device;
 #elif defined(CONFIG_SERIAL3)
-       return &s5pc1xx_serial3_device;
+       return &s5p_serial3_device;
 #else
 #error "CONFIG_SERIAL? missing."
 #endif
@@ -154,10 +154,10 @@ void serial_initialize (void)
        serial_register(&s3c24xx_serial2_device);
 #endif
 #if defined(CONFIG_S5PC1XX)
-       serial_register(&s5pc1xx_serial0_device);
-       serial_register(&s5pc1xx_serial1_device);
-       serial_register(&s5pc1xx_serial2_device);
-       serial_register(&s5pc1xx_serial3_device);
+       serial_register(&s5p_serial0_device);
+       serial_register(&s5p_serial1_device);
+       serial_register(&s5p_serial2_device);
+       serial_register(&s5p_serial3_device);
 #endif
        serial_assign (default_serial_console ()->name);
 }
index 3c77a7c6c07f5493424748accb7da6f737c1d904..71392e6847a4cb4b4ef398acac364df62110d121 100644 (file)
@@ -33,7 +33,7 @@ COBJS-$(CONFIG_NS9750_UART) += ns9750_serial.o
 COBJS-$(CONFIG_SYS_NS16550) += ns16550.o
 COBJS-$(CONFIG_DRIVER_S3C4510_UART) += s3c4510b_uart.o
 COBJS-$(CONFIG_S3C64XX) += s3c64xx.o
-COBJS-$(CONFIG_S5PC1XX) += serial_s5pc1xx.o
+COBJS-$(CONFIG_S5PC1XX) += serial_s5p.o
 COBJS-$(CONFIG_SYS_NS16550_SERIAL) += serial.o
 COBJS-$(CONFIG_CLPS7111_SERIAL) += serial_clps7111.o
 COBJS-$(CONFIG_IMX_SERIAL) += serial_imx.o
similarity index 83%
rename from drivers/serial/serial_s5pc1xx.c
rename to drivers/serial/serial_s5p.c
index 73669a9f1704b581480d8257797082df786e28ad..68b8d0101bfc7258c5f1605f9a23e88c879953b5 100644 (file)
 #include <asm/arch/clk.h>
 #include <serial.h>
 
-static inline struct s5pc1xx_uart *s5pc1xx_get_base_uart(int dev_index)
+static inline struct s5p_uart *s5p_get_base_uart(int dev_index)
 {
-       u32 offset = dev_index * sizeof(struct s5pc1xx_uart);
+       u32 offset = dev_index * sizeof(struct s5p_uart);
 
        if (cpu_is_s5pc100())
-               return (struct s5pc1xx_uart *)(S5PC100_UART_BASE + offset);
+               return (struct s5p_uart *)(S5PC100_UART_BASE + offset);
        else
-               return (struct s5pc1xx_uart *)(S5PC110_UART_BASE + offset);
+               return (struct s5p_uart *)(S5PC110_UART_BASE + offset);
 }
 
 /*
- * The coefficient, used to calculate the baudrate on S5PC1XX UARTs is
+ * The coefficient, used to calculate the baudrate on S5P UARTs is
  * calculated as
  * C = UBRDIV * 16 + number_of_set_bits_in_UDIVSLOT
  * however, section 31.6.11 of the datasheet doesn't recomment using 1 for 1,
@@ -66,7 +66,7 @@ static const int udivslot[] = {
 void serial_setbrg_dev(const int dev_index)
 {
        DECLARE_GLOBAL_DATA_PTR;
-       struct s5pc1xx_uart *const uart = s5pc1xx_get_base_uart(dev_index);
+       struct s5p_uart *const uart = s5p_get_base_uart(dev_index);
        u32 pclk = get_pclk();
        u32 baudrate = gd->baudrate;
        u32 val;
@@ -83,7 +83,7 @@ void serial_setbrg_dev(const int dev_index)
  */
 int serial_init_dev(const int dev_index)
 {
-       struct s5pc1xx_uart *const uart = s5pc1xx_get_base_uart(dev_index);
+       struct s5p_uart *const uart = s5p_get_base_uart(dev_index);
 
        /* reset and enable FIFOs, set triggers to the maximum */
        writel(0, &uart->ufcon);
@@ -100,7 +100,7 @@ int serial_init_dev(const int dev_index)
 
 static int serial_err_check(const int dev_index, int op)
 {
-       struct s5pc1xx_uart *const uart = s5pc1xx_get_base_uart(dev_index);
+       struct s5p_uart *const uart = s5p_get_base_uart(dev_index);
        unsigned int mask;
 
        /*
@@ -125,7 +125,7 @@ static int serial_err_check(const int dev_index, int op)
  */
 int serial_getc_dev(const int dev_index)
 {
-       struct s5pc1xx_uart *const uart = s5pc1xx_get_base_uart(dev_index);
+       struct s5p_uart *const uart = s5p_get_base_uart(dev_index);
 
        /* wait for character to arrive */
        while (!(readl(&uart->utrstat) & 0x1)) {
@@ -141,7 +141,7 @@ int serial_getc_dev(const int dev_index)
  */
 void serial_putc_dev(const char c, const int dev_index)
 {
-       struct s5pc1xx_uart *const uart = s5pc1xx_get_base_uart(dev_index);
+       struct s5p_uart *const uart = s5p_get_base_uart(dev_index);
 
        /* wait for room in the tx FIFO */
        while (!(readl(&uart->utrstat) & 0x2)) {
@@ -161,7 +161,7 @@ void serial_putc_dev(const char c, const int dev_index)
  */
 int serial_tstc_dev(const int dev_index)
 {
-       struct s5pc1xx_uart *const uart = s5pc1xx_get_base_uart(dev_index);
+       struct s5p_uart *const uart = s5p_get_base_uart(dev_index);
 
        return (int)(readl(&uart->utrstat) & 0x1);
 }
@@ -192,14 +192,14 @@ void s5p_serial##port##_puts(const char *s) { serial_puts_dev(s, port); }
        s5p_serial##port##_puts, }
 
 DECLARE_S5P_SERIAL_FUNCTIONS(0);
-struct serial_device s5pc1xx_serial0_device =
+struct serial_device s5p_serial0_device =
        INIT_S5P_SERIAL_STRUCTURE(0, "s5pser0", "S5PUART0");
 DECLARE_S5P_SERIAL_FUNCTIONS(1);
-struct serial_device s5pc1xx_serial1_device =
+struct serial_device s5p_serial1_device =
        INIT_S5P_SERIAL_STRUCTURE(1, "s5pser1", "S5PUART1");
 DECLARE_S5P_SERIAL_FUNCTIONS(2);
-struct serial_device s5pc1xx_serial2_device =
+struct serial_device s5p_serial2_device =
        INIT_S5P_SERIAL_STRUCTURE(2, "s5pser2", "S5PUART2");
 DECLARE_S5P_SERIAL_FUNCTIONS(3);
-struct serial_device s5pc1xx_serial3_device =
+struct serial_device s5p_serial3_device =
        INIT_S5P_SERIAL_STRUCTURE(3, "s5pser3", "S5PUART3");
index 140dbdc45fc9a42d03479b98243f0cd8050d974e..2d7ad7ec987ff1f7f900c7ba5a052eae72b50ce9 100644 (file)
@@ -24,7 +24,7 @@
 #define __ASM_ARCH_UART_H_
 
 #ifndef __ASSEMBLY__
-struct s5pc1xx_uart {
+struct s5p_uart {
        unsigned int    ulcon;
        unsigned int    ucon;
        unsigned int    ufcon;
index f2638ec5667df90efd08f4610e5d2efd0ba50c8d..4caf7907237be19234920f87bde03ebd8f31e8a9 100644 (file)
@@ -44,10 +44,10 @@ extern struct serial_device s3c24xx_serial2_device;
 #endif
 
 #if defined(CONFIG_S5PC1XX)
-extern struct serial_device s5pc1xx_serial0_device;
-extern struct serial_device s5pc1xx_serial1_device;
-extern struct serial_device s5pc1xx_serial2_device;
-extern struct serial_device s5pc1xx_serial3_device;
+extern struct serial_device s5p_serial0_device;
+extern struct serial_device s5p_serial1_device;
+extern struct serial_device s5p_serial2_device;
+extern struct serial_device s5p_serial3_device;
 #endif
 
 #if defined(CONFIG_OMAP3_ZOOM2)