diff options
author | Jiri Kosina <jkosina@suse.cz> | 2010-06-16 12:08:13 -0400 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2010-06-16 12:08:13 -0400 |
commit | f1bbbb6912662b9f6070c5bfc4ca9eb1f06a9d5b (patch) | |
tree | c2c130a74be25b0b2dff992e1a195e2728bdaadd /drivers/serial | |
parent | fd0961ff67727482bb20ca7e8ea97b83e9de2ddb (diff) | |
parent | 7e27d6e778cd87b6f2415515d7127eba53fe5d02 (diff) |
Merge branch 'master' into for-next
Diffstat (limited to 'drivers/serial')
-rw-r--r-- | drivers/serial/68328serial.c | 2 | ||||
-rw-r--r-- | drivers/serial/8250_pci.c | 71 | ||||
-rw-r--r-- | drivers/serial/altera_uart.c | 44 | ||||
-rw-r--r-- | drivers/serial/apbuart.c | 10 | ||||
-rw-r--r-- | drivers/serial/bfin_5xx.c | 9 | ||||
-rw-r--r-- | drivers/serial/cpm_uart/cpm_uart_core.c | 9 | ||||
-rw-r--r-- | drivers/serial/mpc52xx_uart.c | 84 | ||||
-rw-r--r-- | drivers/serial/msm_serial.c | 21 | ||||
-rw-r--r-- | drivers/serial/msm_serial.h | 56 | ||||
-rw-r--r-- | drivers/serial/nwpserial.c | 2 | ||||
-rw-r--r-- | drivers/serial/of_serial.c | 12 | ||||
-rw-r--r-- | drivers/serial/pmac_zilog.c | 9 | ||||
-rw-r--r-- | drivers/serial/s5pv210.c | 8 | ||||
-rw-r--r-- | drivers/serial/serial_cs.c | 18 | ||||
-rw-r--r-- | drivers/serial/sh-sci.c | 7 | ||||
-rw-r--r-- | drivers/serial/sunhv.c | 9 | ||||
-rw-r--r-- | drivers/serial/sunsab.c | 13 | ||||
-rw-r--r-- | drivers/serial/sunsu.c | 13 | ||||
-rw-r--r-- | drivers/serial/sunzilog.c | 15 | ||||
-rw-r--r-- | drivers/serial/uartlite.c | 11 | ||||
-rw-r--r-- | drivers/serial/ucc_uart.c | 10 |
21 files changed, 250 insertions, 183 deletions
diff --git a/drivers/serial/68328serial.c b/drivers/serial/68328serial.c index 78ed24bb6a3..30463862603 100644 --- a/drivers/serial/68328serial.c +++ b/drivers/serial/68328serial.c | |||
@@ -1437,7 +1437,7 @@ int m68328_console_setup(struct console *cp, char *arg) | |||
1437 | for (i = 0; i < ARRAY_SIZE(baud_table); i++) | 1437 | for (i = 0; i < ARRAY_SIZE(baud_table); i++) |
1438 | if (baud_table[i] == n) | 1438 | if (baud_table[i] == n) |
1439 | break; | 1439 | break; |
1440 | if (i < BAUD_TABLE_SIZE) { | 1440 | if (i < ARRAY_SIZE(baud_table)) { |
1441 | m68328_console_baud = n; | 1441 | m68328_console_baud = n; |
1442 | m68328_console_cbaud = 0; | 1442 | m68328_console_cbaud = 0; |
1443 | if (i > 15) { | 1443 | if (i > 15) { |
diff --git a/drivers/serial/8250_pci.c b/drivers/serial/8250_pci.c index 01c012da4e2..746a44621d9 100644 --- a/drivers/serial/8250_pci.c +++ b/drivers/serial/8250_pci.c | |||
@@ -982,6 +982,18 @@ static int skip_tx_en_setup(struct serial_private *priv, | |||
982 | #define PCI_SUBDEVICE_ID_POCTAL422 0x0408 | 982 | #define PCI_SUBDEVICE_ID_POCTAL422 0x0408 |
983 | #define PCI_VENDOR_ID_ADVANTECH 0x13fe | 983 | #define PCI_VENDOR_ID_ADVANTECH 0x13fe |
984 | #define PCI_DEVICE_ID_ADVANTECH_PCI3620 0x3620 | 984 | #define PCI_DEVICE_ID_ADVANTECH_PCI3620 0x3620 |
985 | #define PCI_DEVICE_ID_TITAN_200I 0x8028 | ||
986 | #define PCI_DEVICE_ID_TITAN_400I 0x8048 | ||
987 | #define PCI_DEVICE_ID_TITAN_800I 0x8088 | ||
988 | #define PCI_DEVICE_ID_TITAN_800EH 0xA007 | ||
989 | #define PCI_DEVICE_ID_TITAN_800EHB 0xA008 | ||
990 | #define PCI_DEVICE_ID_TITAN_400EH 0xA009 | ||
991 | #define PCI_DEVICE_ID_TITAN_100E 0xA010 | ||
992 | #define PCI_DEVICE_ID_TITAN_200E 0xA012 | ||
993 | #define PCI_DEVICE_ID_TITAN_400E 0xA013 | ||
994 | #define PCI_DEVICE_ID_TITAN_800E 0xA014 | ||
995 | #define PCI_DEVICE_ID_TITAN_200EI 0xA016 | ||
996 | #define PCI_DEVICE_ID_TITAN_200EISI 0xA017 | ||
985 | 997 | ||
986 | /* Unknown vendors/cards - this should not be in linux/pci_ids.h */ | 998 | /* Unknown vendors/cards - this should not be in linux/pci_ids.h */ |
987 | #define PCI_SUBDEVICE_ID_UNKNOWN_0x1584 0x1584 | 999 | #define PCI_SUBDEVICE_ID_UNKNOWN_0x1584 0x1584 |
@@ -1541,6 +1553,10 @@ enum pci_board_num_t { | |||
1541 | pbn_b3_4_115200, | 1553 | pbn_b3_4_115200, |
1542 | pbn_b3_8_115200, | 1554 | pbn_b3_8_115200, |
1543 | 1555 | ||
1556 | pbn_b4_bt_2_921600, | ||
1557 | pbn_b4_bt_4_921600, | ||
1558 | pbn_b4_bt_8_921600, | ||
1559 | |||
1544 | /* | 1560 | /* |
1545 | * Board-specific versions. | 1561 | * Board-specific versions. |
1546 | */ | 1562 | */ |
@@ -1995,6 +2011,25 @@ static struct pciserial_board pci_boards[] __devinitdata = { | |||
1995 | .uart_offset = 8, | 2011 | .uart_offset = 8, |
1996 | }, | 2012 | }, |
1997 | 2013 | ||
2014 | [pbn_b4_bt_2_921600] = { | ||
2015 | .flags = FL_BASE4, | ||
2016 | .num_ports = 2, | ||
2017 | .base_baud = 921600, | ||
2018 | .uart_offset = 8, | ||
2019 | }, | ||
2020 | [pbn_b4_bt_4_921600] = { | ||
2021 | .flags = FL_BASE4, | ||
2022 | .num_ports = 4, | ||
2023 | .base_baud = 921600, | ||
2024 | .uart_offset = 8, | ||
2025 | }, | ||
2026 | [pbn_b4_bt_8_921600] = { | ||
2027 | .flags = FL_BASE4, | ||
2028 | .num_ports = 8, | ||
2029 | .base_baud = 921600, | ||
2030 | .uart_offset = 8, | ||
2031 | }, | ||
2032 | |||
1998 | /* | 2033 | /* |
1999 | * Entries following this are board-specific. | 2034 | * Entries following this are board-specific. |
2000 | */ | 2035 | */ |
@@ -3043,6 +3078,42 @@ static struct pci_device_id serial_pci_tbl[] = { | |||
3043 | { PCI_VENDOR_ID_TITAN, PCI_DEVICE_ID_TITAN_800L, | 3078 | { PCI_VENDOR_ID_TITAN, PCI_DEVICE_ID_TITAN_800L, |
3044 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, | 3079 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
3045 | pbn_b0_bt_8_921600 }, | 3080 | pbn_b0_bt_8_921600 }, |
3081 | { PCI_VENDOR_ID_TITAN, PCI_DEVICE_ID_TITAN_200I, | ||
3082 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, | ||
3083 | pbn_b4_bt_2_921600 }, | ||
3084 | { PCI_VENDOR_ID_TITAN, PCI_DEVICE_ID_TITAN_400I, | ||
3085 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, | ||
3086 | pbn_b4_bt_4_921600 }, | ||
3087 | { PCI_VENDOR_ID_TITAN, PCI_DEVICE_ID_TITAN_800I, | ||
3088 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, | ||
3089 | pbn_b4_bt_8_921600 }, | ||
3090 | { PCI_VENDOR_ID_TITAN, PCI_DEVICE_ID_TITAN_400EH, | ||
3091 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, | ||
3092 | pbn_b0_4_921600 }, | ||
3093 | { PCI_VENDOR_ID_TITAN, PCI_DEVICE_ID_TITAN_800EH, | ||
3094 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, | ||
3095 | pbn_b0_4_921600 }, | ||
3096 | { PCI_VENDOR_ID_TITAN, PCI_DEVICE_ID_TITAN_800EHB, | ||
3097 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, | ||
3098 | pbn_b0_4_921600 }, | ||
3099 | { PCI_VENDOR_ID_TITAN, PCI_DEVICE_ID_TITAN_100E, | ||
3100 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, | ||
3101 | pbn_oxsemi_1_4000000 }, | ||
3102 | { PCI_VENDOR_ID_TITAN, PCI_DEVICE_ID_TITAN_200E, | ||
3103 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, | ||
3104 | pbn_oxsemi_2_4000000 }, | ||
3105 | { PCI_VENDOR_ID_TITAN, PCI_DEVICE_ID_TITAN_400E, | ||
3106 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, | ||
3107 | pbn_oxsemi_4_4000000 }, | ||
3108 | { PCI_VENDOR_ID_TITAN, PCI_DEVICE_ID_TITAN_800E, | ||
3109 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, | ||
3110 | pbn_oxsemi_8_4000000 }, | ||
3111 | { PCI_VENDOR_ID_TITAN, PCI_DEVICE_ID_TITAN_200EI, | ||
3112 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, | ||
3113 | pbn_oxsemi_2_4000000 }, | ||
3114 | { PCI_VENDOR_ID_TITAN, PCI_DEVICE_ID_TITAN_200EISI, | ||
3115 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, | ||
3116 | pbn_oxsemi_2_4000000 }, | ||
3046 | 3117 | ||
3047 | { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_1S_10x_550, | 3118 | { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_1S_10x_550, |
3048 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, | 3119 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, |
diff --git a/drivers/serial/altera_uart.c b/drivers/serial/altera_uart.c index bcee156d2f2..0f1189605d2 100644 --- a/drivers/serial/altera_uart.c +++ b/drivers/serial/altera_uart.c | |||
@@ -89,15 +89,12 @@ static unsigned int altera_uart_tx_empty(struct uart_port *port) | |||
89 | static unsigned int altera_uart_get_mctrl(struct uart_port *port) | 89 | static unsigned int altera_uart_get_mctrl(struct uart_port *port) |
90 | { | 90 | { |
91 | struct altera_uart *pp = container_of(port, struct altera_uart, port); | 91 | struct altera_uart *pp = container_of(port, struct altera_uart, port); |
92 | unsigned long flags; | ||
93 | unsigned int sigs; | 92 | unsigned int sigs; |
94 | 93 | ||
95 | spin_lock_irqsave(&port->lock, flags); | ||
96 | sigs = | 94 | sigs = |
97 | (readl(port->membase + ALTERA_UART_STATUS_REG) & | 95 | (readl(port->membase + ALTERA_UART_STATUS_REG) & |
98 | ALTERA_UART_STATUS_CTS_MSK) ? TIOCM_CTS : 0; | 96 | ALTERA_UART_STATUS_CTS_MSK) ? TIOCM_CTS : 0; |
99 | sigs |= (pp->sigs & TIOCM_RTS); | 97 | sigs |= (pp->sigs & TIOCM_RTS); |
100 | spin_unlock_irqrestore(&port->lock, flags); | ||
101 | 98 | ||
102 | return sigs; | 99 | return sigs; |
103 | } | 100 | } |
@@ -105,49 +102,37 @@ static unsigned int altera_uart_get_mctrl(struct uart_port *port) | |||
105 | static void altera_uart_set_mctrl(struct uart_port *port, unsigned int sigs) | 102 | static void altera_uart_set_mctrl(struct uart_port *port, unsigned int sigs) |
106 | { | 103 | { |
107 | struct altera_uart *pp = container_of(port, struct altera_uart, port); | 104 | struct altera_uart *pp = container_of(port, struct altera_uart, port); |
108 | unsigned long flags; | ||
109 | 105 | ||
110 | spin_lock_irqsave(&port->lock, flags); | ||
111 | pp->sigs = sigs; | 106 | pp->sigs = sigs; |
112 | if (sigs & TIOCM_RTS) | 107 | if (sigs & TIOCM_RTS) |
113 | pp->imr |= ALTERA_UART_CONTROL_RTS_MSK; | 108 | pp->imr |= ALTERA_UART_CONTROL_RTS_MSK; |
114 | else | 109 | else |
115 | pp->imr &= ~ALTERA_UART_CONTROL_RTS_MSK; | 110 | pp->imr &= ~ALTERA_UART_CONTROL_RTS_MSK; |
116 | writel(pp->imr, port->membase + ALTERA_UART_CONTROL_REG); | 111 | writel(pp->imr, port->membase + ALTERA_UART_CONTROL_REG); |
117 | spin_unlock_irqrestore(&port->lock, flags); | ||
118 | } | 112 | } |
119 | 113 | ||
120 | static void altera_uart_start_tx(struct uart_port *port) | 114 | static void altera_uart_start_tx(struct uart_port *port) |
121 | { | 115 | { |
122 | struct altera_uart *pp = container_of(port, struct altera_uart, port); | 116 | struct altera_uart *pp = container_of(port, struct altera_uart, port); |
123 | unsigned long flags; | ||
124 | 117 | ||
125 | spin_lock_irqsave(&port->lock, flags); | ||
126 | pp->imr |= ALTERA_UART_CONTROL_TRDY_MSK; | 118 | pp->imr |= ALTERA_UART_CONTROL_TRDY_MSK; |
127 | writel(pp->imr, port->membase + ALTERA_UART_CONTROL_REG); | 119 | writel(pp->imr, port->membase + ALTERA_UART_CONTROL_REG); |
128 | spin_unlock_irqrestore(&port->lock, flags); | ||
129 | } | 120 | } |
130 | 121 | ||
131 | static void altera_uart_stop_tx(struct uart_port *port) | 122 | static void altera_uart_stop_tx(struct uart_port *port) |
132 | { | 123 | { |
133 | struct altera_uart *pp = container_of(port, struct altera_uart, port); | 124 | struct altera_uart *pp = container_of(port, struct altera_uart, port); |
134 | unsigned long flags; | ||
135 | 125 | ||
136 | spin_lock_irqsave(&port->lock, flags); | ||
137 | pp->imr &= ~ALTERA_UART_CONTROL_TRDY_MSK; | 126 | pp->imr &= ~ALTERA_UART_CONTROL_TRDY_MSK; |
138 | writel(pp->imr, port->membase + ALTERA_UART_CONTROL_REG); | 127 | writel(pp->imr, port->membase + ALTERA_UART_CONTROL_REG); |
139 | spin_unlock_irqrestore(&port->lock, flags); | ||
140 | } | 128 | } |
141 | 129 | ||
142 | static void altera_uart_stop_rx(struct uart_port *port) | 130 | static void altera_uart_stop_rx(struct uart_port *port) |
143 | { | 131 | { |
144 | struct altera_uart *pp = container_of(port, struct altera_uart, port); | 132 | struct altera_uart *pp = container_of(port, struct altera_uart, port); |
145 | unsigned long flags; | ||
146 | 133 | ||
147 | spin_lock_irqsave(&port->lock, flags); | ||
148 | pp->imr &= ~ALTERA_UART_CONTROL_RRDY_MSK; | 134 | pp->imr &= ~ALTERA_UART_CONTROL_RRDY_MSK; |
149 | writel(pp->imr, port->membase + ALTERA_UART_CONTROL_REG); | 135 | writel(pp->imr, port->membase + ALTERA_UART_CONTROL_REG); |
150 | spin_unlock_irqrestore(&port->lock, flags); | ||
151 | } | 136 | } |
152 | 137 | ||
153 | static void altera_uart_break_ctl(struct uart_port *port, int break_state) | 138 | static void altera_uart_break_ctl(struct uart_port *port, int break_state) |
@@ -272,10 +257,14 @@ static irqreturn_t altera_uart_interrupt(int irq, void *data) | |||
272 | unsigned int isr; | 257 | unsigned int isr; |
273 | 258 | ||
274 | isr = readl(port->membase + ALTERA_UART_STATUS_REG) & pp->imr; | 259 | isr = readl(port->membase + ALTERA_UART_STATUS_REG) & pp->imr; |
260 | |||
261 | spin_lock(&port->lock); | ||
275 | if (isr & ALTERA_UART_STATUS_RRDY_MSK) | 262 | if (isr & ALTERA_UART_STATUS_RRDY_MSK) |
276 | altera_uart_rx_chars(pp); | 263 | altera_uart_rx_chars(pp); |
277 | if (isr & ALTERA_UART_STATUS_TRDY_MSK) | 264 | if (isr & ALTERA_UART_STATUS_TRDY_MSK) |
278 | altera_uart_tx_chars(pp); | 265 | altera_uart_tx_chars(pp); |
266 | spin_unlock(&port->lock); | ||
267 | |||
279 | return IRQ_RETVAL(isr); | 268 | return IRQ_RETVAL(isr); |
280 | } | 269 | } |
281 | 270 | ||
@@ -402,31 +391,24 @@ int __init early_altera_uart_setup(struct altera_uart_platform_uart *platp) | |||
402 | return 0; | 391 | return 0; |
403 | } | 392 | } |
404 | 393 | ||
405 | static void altera_uart_console_putc(struct console *co, const char c) | 394 | static void altera_uart_console_putc(struct uart_port *port, const char c) |
406 | { | 395 | { |
407 | struct uart_port *port = &(altera_uart_ports + co->index)->port; | 396 | while (!(readl(port->membase + ALTERA_UART_STATUS_REG) & |
408 | int i; | 397 | ALTERA_UART_STATUS_TRDY_MSK)) |
398 | cpu_relax(); | ||
409 | 399 | ||
410 | for (i = 0; i < 0x10000; i++) { | ||
411 | if (readl(port->membase + ALTERA_UART_STATUS_REG) & | ||
412 | ALTERA_UART_STATUS_TRDY_MSK) | ||
413 | break; | ||
414 | } | ||
415 | writel(c, port->membase + ALTERA_UART_TXDATA_REG); | 400 | writel(c, port->membase + ALTERA_UART_TXDATA_REG); |
416 | for (i = 0; i < 0x10000; i++) { | ||
417 | if (readl(port->membase + ALTERA_UART_STATUS_REG) & | ||
418 | ALTERA_UART_STATUS_TRDY_MSK) | ||
419 | break; | ||
420 | } | ||
421 | } | 401 | } |
422 | 402 | ||
423 | static void altera_uart_console_write(struct console *co, const char *s, | 403 | static void altera_uart_console_write(struct console *co, const char *s, |
424 | unsigned int count) | 404 | unsigned int count) |
425 | { | 405 | { |
406 | struct uart_port *port = &(altera_uart_ports + co->index)->port; | ||
407 | |||
426 | for (; count; count--, s++) { | 408 | for (; count; count--, s++) { |
427 | altera_uart_console_putc(co, *s); | 409 | altera_uart_console_putc(port, *s); |
428 | if (*s == '\n') | 410 | if (*s == '\n') |
429 | altera_uart_console_putc(co, '\r'); | 411 | altera_uart_console_putc(port, '\r'); |
430 | } | 412 | } |
431 | } | 413 | } |
432 | 414 | ||
@@ -516,7 +498,7 @@ static int __devinit altera_uart_probe(struct platform_device *pdev) | |||
516 | return 0; | 498 | return 0; |
517 | } | 499 | } |
518 | 500 | ||
519 | static int altera_uart_remove(struct platform_device *pdev) | 501 | static int __devexit altera_uart_remove(struct platform_device *pdev) |
520 | { | 502 | { |
521 | struct uart_port *port; | 503 | struct uart_port *port; |
522 | int i; | 504 | int i; |
diff --git a/drivers/serial/apbuart.c b/drivers/serial/apbuart.c index fe91319b5f6..0099b8692b6 100644 --- a/drivers/serial/apbuart.c +++ b/drivers/serial/apbuart.c | |||
@@ -559,7 +559,7 @@ static int __devinit apbuart_probe(struct of_device *op, | |||
559 | 559 | ||
560 | i = 0; | 560 | i = 0; |
561 | for (i = 0; i < grlib_apbuart_port_nr; i++) { | 561 | for (i = 0; i < grlib_apbuart_port_nr; i++) { |
562 | if (op->node == grlib_apbuart_nodes[i]) | 562 | if (op->dev.of_node == grlib_apbuart_nodes[i]) |
563 | break; | 563 | break; |
564 | } | 564 | } |
565 | 565 | ||
@@ -584,12 +584,12 @@ static struct of_device_id __initdata apbuart_match[] = { | |||
584 | }; | 584 | }; |
585 | 585 | ||
586 | static struct of_platform_driver grlib_apbuart_of_driver = { | 586 | static struct of_platform_driver grlib_apbuart_of_driver = { |
587 | .match_table = apbuart_match, | ||
588 | .probe = apbuart_probe, | 587 | .probe = apbuart_probe, |
589 | .driver = { | 588 | .driver = { |
590 | .owner = THIS_MODULE, | 589 | .owner = THIS_MODULE, |
591 | .name = "grlib-apbuart", | 590 | .name = "grlib-apbuart", |
592 | }, | 591 | .of_match_table = apbuart_match, |
592 | }, | ||
593 | }; | 593 | }; |
594 | 594 | ||
595 | 595 | ||
diff --git a/drivers/serial/bfin_5xx.c b/drivers/serial/bfin_5xx.c index 96f7e7484fe..511cbf68787 100644 --- a/drivers/serial/bfin_5xx.c +++ b/drivers/serial/bfin_5xx.c | |||
@@ -797,7 +797,7 @@ static void bfin_serial_shutdown(struct uart_port *port) | |||
797 | gpio_free(uart->rts_pin); | 797 | gpio_free(uart->rts_pin); |
798 | #endif | 798 | #endif |
799 | #ifdef CONFIG_SERIAL_BFIN_HARD_CTSRTS | 799 | #ifdef CONFIG_SERIAL_BFIN_HARD_CTSRTS |
800 | if (UART_GET_IER(uart) && EDSSI) | 800 | if (UART_GET_IER(uart) & EDSSI) |
801 | free_irq(uart->status_irq, uart); | 801 | free_irq(uart->status_irq, uart); |
802 | #endif | 802 | #endif |
803 | } | 803 | } |
@@ -869,7 +869,12 @@ bfin_serial_set_termios(struct uart_port *port, struct ktermios *termios, | |||
869 | } | 869 | } |
870 | 870 | ||
871 | baud = uart_get_baud_rate(port, termios, old, 0, port->uartclk/16); | 871 | baud = uart_get_baud_rate(port, termios, old, 0, port->uartclk/16); |
872 | quot = uart_get_divisor(port, baud) - ANOMALY_05000230; | 872 | quot = uart_get_divisor(port, baud); |
873 | |||
874 | /* If discipline is not IRDA, apply ANOMALY_05000230 */ | ||
875 | if (termios->c_line != N_IRDA) | ||
876 | quot -= ANOMALY_05000230; | ||
877 | |||
873 | spin_lock_irqsave(&uart->port.lock, flags); | 878 | spin_lock_irqsave(&uart->port.lock, flags); |
874 | 879 | ||
875 | UART_SET_ANOMALY_THRESHOLD(uart, USEC_PER_SEC / baud * 15); | 880 | UART_SET_ANOMALY_THRESHOLD(uart, USEC_PER_SEC / baud * 15); |
diff --git a/drivers/serial/cpm_uart/cpm_uart_core.c b/drivers/serial/cpm_uart/cpm_uart_core.c index 300cea768d7..9eb62a256e9 100644 --- a/drivers/serial/cpm_uart/cpm_uart_core.c +++ b/drivers/serial/cpm_uart/cpm_uart_core.c | |||
@@ -1342,7 +1342,7 @@ static int __devinit cpm_uart_probe(struct of_device *ofdev, | |||
1342 | /* initialize the device pointer for the port */ | 1342 | /* initialize the device pointer for the port */ |
1343 | pinfo->port.dev = &ofdev->dev; | 1343 | pinfo->port.dev = &ofdev->dev; |
1344 | 1344 | ||
1345 | ret = cpm_uart_init_port(ofdev->node, pinfo); | 1345 | ret = cpm_uart_init_port(ofdev->dev.of_node, pinfo); |
1346 | if (ret) | 1346 | if (ret) |
1347 | return ret; | 1347 | return ret; |
1348 | 1348 | ||
@@ -1372,8 +1372,11 @@ static struct of_device_id cpm_uart_match[] = { | |||
1372 | }; | 1372 | }; |
1373 | 1373 | ||
1374 | static struct of_platform_driver cpm_uart_driver = { | 1374 | static struct of_platform_driver cpm_uart_driver = { |
1375 | .name = "cpm_uart", | 1375 | .driver = { |
1376 | .match_table = cpm_uart_match, | 1376 | .name = "cpm_uart", |
1377 | .owner = THIS_MODULE, | ||
1378 | .of_match_table = cpm_uart_match, | ||
1379 | }, | ||
1377 | .probe = cpm_uart_probe, | 1380 | .probe = cpm_uart_probe, |
1378 | .remove = cpm_uart_remove, | 1381 | .remove = cpm_uart_remove, |
1379 | }; | 1382 | }; |
diff --git a/drivers/serial/mpc52xx_uart.c b/drivers/serial/mpc52xx_uart.c index 02469c31bf0..84a35f69901 100644 --- a/drivers/serial/mpc52xx_uart.c +++ b/drivers/serial/mpc52xx_uart.c | |||
@@ -397,34 +397,10 @@ static unsigned long mpc512x_getuartclk(void *p) | |||
397 | return mpc5xxx_get_bus_frequency(p); | 397 | return mpc5xxx_get_bus_frequency(p); |
398 | } | 398 | } |
399 | 399 | ||
400 | #define DEFAULT_FIFO_SIZE 16 | ||
401 | |||
402 | static unsigned int __init get_fifo_size(struct device_node *np, | ||
403 | char *fifo_name) | ||
404 | { | ||
405 | const unsigned int *fp; | ||
406 | |||
407 | fp = of_get_property(np, fifo_name, NULL); | ||
408 | if (fp) | ||
409 | return *fp; | ||
410 | |||
411 | pr_warning("no %s property in %s node, defaulting to %d\n", | ||
412 | fifo_name, np->full_name, DEFAULT_FIFO_SIZE); | ||
413 | |||
414 | return DEFAULT_FIFO_SIZE; | ||
415 | } | ||
416 | |||
417 | #define FIFOC(_base) ((struct mpc512x_psc_fifo __iomem *) \ | ||
418 | ((u32)(_base) + sizeof(struct mpc52xx_psc))) | ||
419 | |||
420 | /* Init PSC FIFO Controller */ | 400 | /* Init PSC FIFO Controller */ |
421 | static int __init mpc512x_psc_fifoc_init(void) | 401 | static int __init mpc512x_psc_fifoc_init(void) |
422 | { | 402 | { |
423 | struct device_node *np; | 403 | struct device_node *np; |
424 | void __iomem *psc; | ||
425 | unsigned int tx_fifo_size; | ||
426 | unsigned int rx_fifo_size; | ||
427 | int fifobase = 0; /* current fifo address in 32 bit words */ | ||
428 | 404 | ||
429 | np = of_find_compatible_node(NULL, NULL, | 405 | np = of_find_compatible_node(NULL, NULL, |
430 | "fsl,mpc5121-psc-fifo"); | 406 | "fsl,mpc5121-psc-fifo"); |
@@ -447,51 +423,6 @@ static int __init mpc512x_psc_fifoc_init(void) | |||
447 | return -ENODEV; | 423 | return -ENODEV; |
448 | } | 424 | } |
449 | 425 | ||
450 | for_each_compatible_node(np, NULL, "fsl,mpc5121-psc-uart") { | ||
451 | tx_fifo_size = get_fifo_size(np, "fsl,tx-fifo-size"); | ||
452 | rx_fifo_size = get_fifo_size(np, "fsl,rx-fifo-size"); | ||
453 | |||
454 | /* size in register is in 4 byte units */ | ||
455 | tx_fifo_size /= 4; | ||
456 | rx_fifo_size /= 4; | ||
457 | if (!tx_fifo_size) | ||
458 | tx_fifo_size = 1; | ||
459 | if (!rx_fifo_size) | ||
460 | rx_fifo_size = 1; | ||
461 | |||
462 | psc = of_iomap(np, 0); | ||
463 | if (!psc) { | ||
464 | pr_err("%s: Can't map %s device\n", | ||
465 | __func__, np->full_name); | ||
466 | continue; | ||
467 | } | ||
468 | |||
469 | /* FIFO space is 4KiB, check if requested size is available */ | ||
470 | if ((fifobase + tx_fifo_size + rx_fifo_size) > 0x1000) { | ||
471 | pr_err("%s: no fifo space available for %s\n", | ||
472 | __func__, np->full_name); | ||
473 | iounmap(psc); | ||
474 | /* | ||
475 | * chances are that another device requests less | ||
476 | * fifo space, so we continue. | ||
477 | */ | ||
478 | continue; | ||
479 | } | ||
480 | /* set tx and rx fifo size registers */ | ||
481 | out_be32(&FIFOC(psc)->txsz, (fifobase << 16) | tx_fifo_size); | ||
482 | fifobase += tx_fifo_size; | ||
483 | out_be32(&FIFOC(psc)->rxsz, (fifobase << 16) | rx_fifo_size); | ||
484 | fifobase += rx_fifo_size; | ||
485 | |||
486 | /* reset and enable the slices */ | ||
487 | out_be32(&FIFOC(psc)->txcmd, 0x80); | ||
488 | out_be32(&FIFOC(psc)->txcmd, 0x01); | ||
489 | out_be32(&FIFOC(psc)->rxcmd, 0x80); | ||
490 | out_be32(&FIFOC(psc)->rxcmd, 0x01); | ||
491 | |||
492 | iounmap(psc); | ||
493 | } | ||
494 | |||
495 | return 0; | 426 | return 0; |
496 | } | 427 | } |
497 | 428 | ||
@@ -1295,14 +1226,14 @@ mpc52xx_uart_of_probe(struct of_device *op, const struct of_device_id *match) | |||
1295 | 1226 | ||
1296 | /* Check validity & presence */ | 1227 | /* Check validity & presence */ |
1297 | for (idx = 0; idx < MPC52xx_PSC_MAXNUM; idx++) | 1228 | for (idx = 0; idx < MPC52xx_PSC_MAXNUM; idx++) |
1298 | if (mpc52xx_uart_nodes[idx] == op->node) | 1229 | if (mpc52xx_uart_nodes[idx] == op->dev.of_node) |
1299 | break; | 1230 | break; |
1300 | if (idx >= MPC52xx_PSC_MAXNUM) | 1231 | if (idx >= MPC52xx_PSC_MAXNUM) |
1301 | return -EINVAL; | 1232 | return -EINVAL; |
1302 | pr_debug("Found %s assigned to ttyPSC%x\n", | 1233 | pr_debug("Found %s assigned to ttyPSC%x\n", |
1303 | mpc52xx_uart_nodes[idx]->full_name, idx); | 1234 | mpc52xx_uart_nodes[idx]->full_name, idx); |
1304 | 1235 | ||
1305 | uartclk = psc_ops->getuartclk(op->node); | 1236 | uartclk = psc_ops->getuartclk(op->dev.of_node); |
1306 | if (uartclk == 0) { | 1237 | if (uartclk == 0) { |
1307 | dev_dbg(&op->dev, "Could not find uart clock frequency!\n"); | 1238 | dev_dbg(&op->dev, "Could not find uart clock frequency!\n"); |
1308 | return -EINVAL; | 1239 | return -EINVAL; |
@@ -1322,7 +1253,7 @@ mpc52xx_uart_of_probe(struct of_device *op, const struct of_device_id *match) | |||
1322 | port->dev = &op->dev; | 1253 | port->dev = &op->dev; |
1323 | 1254 | ||
1324 | /* Search for IRQ and mapbase */ | 1255 | /* Search for IRQ and mapbase */ |
1325 | ret = of_address_to_resource(op->node, 0, &res); | 1256 | ret = of_address_to_resource(op->dev.of_node, 0, &res); |
1326 | if (ret) | 1257 | if (ret) |
1327 | return ret; | 1258 | return ret; |
1328 | 1259 | ||
@@ -1332,7 +1263,7 @@ mpc52xx_uart_of_probe(struct of_device *op, const struct of_device_id *match) | |||
1332 | return -EINVAL; | 1263 | return -EINVAL; |
1333 | } | 1264 | } |
1334 | 1265 | ||
1335 | psc_ops->get_irq(port, op->node); | 1266 | psc_ops->get_irq(port, op->dev.of_node); |
1336 | if (port->irq == NO_IRQ) { | 1267 | if (port->irq == NO_IRQ) { |
1337 | dev_dbg(&op->dev, "Could not get irq\n"); | 1268 | dev_dbg(&op->dev, "Could not get irq\n"); |
1338 | return -EINVAL; | 1269 | return -EINVAL; |
@@ -1431,15 +1362,16 @@ mpc52xx_uart_of_enumerate(void) | |||
1431 | MODULE_DEVICE_TABLE(of, mpc52xx_uart_of_match); | 1362 | MODULE_DEVICE_TABLE(of, mpc52xx_uart_of_match); |
1432 | 1363 | ||
1433 | static struct of_platform_driver mpc52xx_uart_of_driver = { | 1364 | static struct of_platform_driver mpc52xx_uart_of_driver = { |
1434 | .match_table = mpc52xx_uart_of_match, | ||
1435 | .probe = mpc52xx_uart_of_probe, | 1365 | .probe = mpc52xx_uart_of_probe, |
1436 | .remove = mpc52xx_uart_of_remove, | 1366 | .remove = mpc52xx_uart_of_remove, |
1437 | #ifdef CONFIG_PM | 1367 | #ifdef CONFIG_PM |
1438 | .suspend = mpc52xx_uart_of_suspend, | 1368 | .suspend = mpc52xx_uart_of_suspend, |
1439 | .resume = mpc52xx_uart_of_resume, | 1369 | .resume = mpc52xx_uart_of_resume, |
1440 | #endif | 1370 | #endif |
1441 | .driver = { | 1371 | .driver = { |
1442 | .name = "mpc52xx-psc-uart", | 1372 | .name = "mpc52xx-psc-uart", |
1373 | .owner = THIS_MODULE, | ||
1374 | .of_match_table = mpc52xx_uart_of_match, | ||
1443 | }, | 1375 | }, |
1444 | }; | 1376 | }; |
1445 | 1377 | ||
diff --git a/drivers/serial/msm_serial.c b/drivers/serial/msm_serial.c index ecdc0facf7e..f8c816e7725 100644 --- a/drivers/serial/msm_serial.c +++ b/drivers/serial/msm_serial.c | |||
@@ -41,19 +41,6 @@ struct msm_port { | |||
41 | unsigned int imr; | 41 | unsigned int imr; |
42 | }; | 42 | }; |
43 | 43 | ||
44 | #define UART_TO_MSM(uart_port) ((struct msm_port *) uart_port) | ||
45 | |||
46 | static inline void msm_write(struct uart_port *port, unsigned int val, | ||
47 | unsigned int off) | ||
48 | { | ||
49 | __raw_writel(val, port->membase + off); | ||
50 | } | ||
51 | |||
52 | static inline unsigned int msm_read(struct uart_port *port, unsigned int off) | ||
53 | { | ||
54 | return __raw_readl(port->membase + off); | ||
55 | } | ||
56 | |||
57 | static void msm_stop_tx(struct uart_port *port) | 44 | static void msm_stop_tx(struct uart_port *port) |
58 | { | 45 | { |
59 | struct msm_port *msm_port = UART_TO_MSM(port); | 46 | struct msm_port *msm_port = UART_TO_MSM(port); |
@@ -320,11 +307,7 @@ static void msm_init_clock(struct uart_port *port) | |||
320 | struct msm_port *msm_port = UART_TO_MSM(port); | 307 | struct msm_port *msm_port = UART_TO_MSM(port); |
321 | 308 | ||
322 | clk_enable(msm_port->clk); | 309 | clk_enable(msm_port->clk); |
323 | 310 | msm_serial_set_mnd_regs(port); | |
324 | msm_write(port, 0xC0, UART_MREG); | ||
325 | msm_write(port, 0xB2, UART_NREG); | ||
326 | msm_write(port, 0x7D, UART_DREG); | ||
327 | msm_write(port, 0x1C, UART_MNDREG); | ||
328 | } | 311 | } |
329 | 312 | ||
330 | static int msm_startup(struct uart_port *port) | 313 | static int msm_startup(struct uart_port *port) |
@@ -706,6 +689,8 @@ static int __init msm_serial_probe(struct platform_device *pdev) | |||
706 | if (unlikely(IS_ERR(msm_port->clk))) | 689 | if (unlikely(IS_ERR(msm_port->clk))) |
707 | return PTR_ERR(msm_port->clk); | 690 | return PTR_ERR(msm_port->clk); |
708 | port->uartclk = clk_get_rate(msm_port->clk); | 691 | port->uartclk = clk_get_rate(msm_port->clk); |
692 | printk(KERN_INFO "uartclk = %d\n", port->uartclk); | ||
693 | |||
709 | 694 | ||
710 | resource = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 695 | resource = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
711 | if (unlikely(!resource)) | 696 | if (unlikely(!resource)) |
diff --git a/drivers/serial/msm_serial.h b/drivers/serial/msm_serial.h index 689f1fa0e84..f6ca9ca79e9 100644 --- a/drivers/serial/msm_serial.h +++ b/drivers/serial/msm_serial.h | |||
@@ -114,4 +114,60 @@ | |||
114 | #define UART_MISR 0x0010 | 114 | #define UART_MISR 0x0010 |
115 | #define UART_ISR 0x0014 | 115 | #define UART_ISR 0x0014 |
116 | 116 | ||
117 | #define UART_TO_MSM(uart_port) ((struct msm_port *) uart_port) | ||
118 | |||
119 | static inline | ||
120 | void msm_write(struct uart_port *port, unsigned int val, unsigned int off) | ||
121 | { | ||
122 | __raw_writel(val, port->membase + off); | ||
123 | } | ||
124 | |||
125 | static inline | ||
126 | unsigned int msm_read(struct uart_port *port, unsigned int off) | ||
127 | { | ||
128 | return __raw_readl(port->membase + off); | ||
129 | } | ||
130 | |||
131 | /* | ||
132 | * Setup the MND registers to use the TCXO clock. | ||
133 | */ | ||
134 | static inline void msm_serial_set_mnd_regs_tcxo(struct uart_port *port) | ||
135 | { | ||
136 | msm_write(port, 0x06, UART_MREG); | ||
137 | msm_write(port, 0xF1, UART_NREG); | ||
138 | msm_write(port, 0x0F, UART_DREG); | ||
139 | msm_write(port, 0x1A, UART_MNDREG); | ||
140 | } | ||
141 | |||
142 | /* | ||
143 | * Setup the MND registers to use the TCXO clock divided by 4. | ||
144 | */ | ||
145 | static inline void msm_serial_set_mnd_regs_tcxoby4(struct uart_port *port) | ||
146 | { | ||
147 | msm_write(port, 0x18, UART_MREG); | ||
148 | msm_write(port, 0xF6, UART_NREG); | ||
149 | msm_write(port, 0x0F, UART_DREG); | ||
150 | msm_write(port, 0x0A, UART_MNDREG); | ||
151 | } | ||
152 | |||
153 | static inline | ||
154 | void msm_serial_set_mnd_regs_from_uartclk(struct uart_port *port) | ||
155 | { | ||
156 | if (port->uartclk == 19200000) | ||
157 | msm_serial_set_mnd_regs_tcxo(port); | ||
158 | else | ||
159 | msm_serial_set_mnd_regs_tcxoby4(port); | ||
160 | } | ||
161 | |||
162 | /* | ||
163 | * TROUT has a specific defect that makes it report it's uartclk | ||
164 | * as 19.2Mhz (TCXO) when it's actually 4.8Mhz (TCXO/4). This special | ||
165 | * cases TROUT to use the right clock. | ||
166 | */ | ||
167 | #ifdef CONFIG_MACH_TROUT | ||
168 | #define msm_serial_set_mnd_regs msm_serial_set_mnd_regs_tcxoby4 | ||
169 | #else | ||
170 | #define msm_serial_set_mnd_regs msm_serial_set_mnd_regs_from_uartclk | ||
171 | #endif | ||
172 | |||
117 | #endif /* __DRIVERS_SERIAL_MSM_SERIAL_H */ | 173 | #endif /* __DRIVERS_SERIAL_MSM_SERIAL_H */ |
diff --git a/drivers/serial/nwpserial.c b/drivers/serial/nwpserial.c index e1ab8ec0a4a..3c02fa96f28 100644 --- a/drivers/serial/nwpserial.c +++ b/drivers/serial/nwpserial.c | |||
@@ -344,7 +344,7 @@ int nwpserial_register_port(struct uart_port *port) | |||
344 | 344 | ||
345 | mutex_lock(&nwpserial_mutex); | 345 | mutex_lock(&nwpserial_mutex); |
346 | 346 | ||
347 | dn = to_of_device(port->dev)->node; | 347 | dn = to_of_device(port->dev)->dev.of_node; |
348 | if (dn == NULL) | 348 | if (dn == NULL) |
349 | goto out; | 349 | goto out; |
350 | 350 | ||
diff --git a/drivers/serial/of_serial.c b/drivers/serial/of_serial.c index 4abfebdb0fc..a48d9080f55 100644 --- a/drivers/serial/of_serial.c +++ b/drivers/serial/of_serial.c | |||
@@ -31,7 +31,7 @@ static int __devinit of_platform_serial_setup(struct of_device *ofdev, | |||
31 | int type, struct uart_port *port) | 31 | int type, struct uart_port *port) |
32 | { | 32 | { |
33 | struct resource resource; | 33 | struct resource resource; |
34 | struct device_node *np = ofdev->node; | 34 | struct device_node *np = ofdev->dev.of_node; |
35 | const unsigned int *clk, *spd; | 35 | const unsigned int *clk, *spd; |
36 | const u32 *prop; | 36 | const u32 *prop; |
37 | int ret, prop_size; | 37 | int ret, prop_size; |
@@ -88,7 +88,7 @@ static int __devinit of_platform_serial_probe(struct of_device *ofdev, | |||
88 | int port_type; | 88 | int port_type; |
89 | int ret; | 89 | int ret; |
90 | 90 | ||
91 | if (of_find_property(ofdev->node, "used-by-rtas", NULL)) | 91 | if (of_find_property(ofdev->dev.of_node, "used-by-rtas", NULL)) |
92 | return -EBUSY; | 92 | return -EBUSY; |
93 | 93 | ||
94 | info = kmalloc(sizeof(*info), GFP_KERNEL); | 94 | info = kmalloc(sizeof(*info), GFP_KERNEL); |
@@ -175,11 +175,13 @@ static struct of_device_id __devinitdata of_platform_serial_table[] = { | |||
175 | }; | 175 | }; |
176 | 176 | ||
177 | static struct of_platform_driver of_platform_serial_driver = { | 177 | static struct of_platform_driver of_platform_serial_driver = { |
178 | .owner = THIS_MODULE, | 178 | .driver = { |
179 | .name = "of_serial", | 179 | .name = "of_serial", |
180 | .owner = THIS_MODULE, | ||
181 | .of_match_table = of_platform_serial_table, | ||
182 | }, | ||
180 | .probe = of_platform_serial_probe, | 183 | .probe = of_platform_serial_probe, |
181 | .remove = of_platform_serial_remove, | 184 | .remove = of_platform_serial_remove, |
182 | .match_table = of_platform_serial_table, | ||
183 | }; | 185 | }; |
184 | 186 | ||
185 | static int __init of_platform_serial_init(void) | 187 | static int __init of_platform_serial_init(void) |
diff --git a/drivers/serial/pmac_zilog.c b/drivers/serial/pmac_zilog.c index 700e10833bf..5b9cde79e4e 100644 --- a/drivers/serial/pmac_zilog.c +++ b/drivers/serial/pmac_zilog.c | |||
@@ -1611,7 +1611,7 @@ static int pmz_attach(struct macio_dev *mdev, const struct of_device_id *match) | |||
1611 | /* Iterate the pmz_ports array to find a matching entry | 1611 | /* Iterate the pmz_ports array to find a matching entry |
1612 | */ | 1612 | */ |
1613 | for (i = 0; i < MAX_ZS_PORTS; i++) | 1613 | for (i = 0; i < MAX_ZS_PORTS; i++) |
1614 | if (pmz_ports[i].node == mdev->ofdev.node) { | 1614 | if (pmz_ports[i].node == mdev->ofdev.dev.of_node) { |
1615 | struct uart_pmac_port *uap = &pmz_ports[i]; | 1615 | struct uart_pmac_port *uap = &pmz_ports[i]; |
1616 | 1616 | ||
1617 | uap->dev = mdev; | 1617 | uap->dev = mdev; |
@@ -2005,8 +2005,11 @@ static struct of_device_id pmz_match[] = | |||
2005 | MODULE_DEVICE_TABLE (of, pmz_match); | 2005 | MODULE_DEVICE_TABLE (of, pmz_match); |
2006 | 2006 | ||
2007 | static struct macio_driver pmz_driver = { | 2007 | static struct macio_driver pmz_driver = { |
2008 | .name = "pmac_zilog", | 2008 | .driver = { |
2009 | .match_table = pmz_match, | 2009 | .name = "pmac_zilog", |
2010 | .owner = THIS_MODULE, | ||
2011 | .of_match_table = pmz_match, | ||
2012 | }, | ||
2010 | .probe = pmz_attach, | 2013 | .probe = pmz_attach, |
2011 | .remove = pmz_detach, | 2014 | .remove = pmz_detach, |
2012 | .suspend = pmz_suspend, | 2015 | .suspend = pmz_suspend, |
diff --git a/drivers/serial/s5pv210.c b/drivers/serial/s5pv210.c index 8dc03837617..4a789e5361a 100644 --- a/drivers/serial/s5pv210.c +++ b/drivers/serial/s5pv210.c | |||
@@ -119,7 +119,7 @@ static int s5p_serial_probe(struct platform_device *pdev) | |||
119 | return s3c24xx_serial_probe(pdev, s5p_uart_inf[pdev->id]); | 119 | return s3c24xx_serial_probe(pdev, s5p_uart_inf[pdev->id]); |
120 | } | 120 | } |
121 | 121 | ||
122 | static struct platform_driver s5p_serial_drv = { | 122 | static struct platform_driver s5p_serial_driver = { |
123 | .probe = s5p_serial_probe, | 123 | .probe = s5p_serial_probe, |
124 | .remove = __devexit_p(s3c24xx_serial_remove), | 124 | .remove = __devexit_p(s3c24xx_serial_remove), |
125 | .driver = { | 125 | .driver = { |
@@ -130,19 +130,19 @@ static struct platform_driver s5p_serial_drv = { | |||
130 | 130 | ||
131 | static int __init s5pv210_serial_console_init(void) | 131 | static int __init s5pv210_serial_console_init(void) |
132 | { | 132 | { |
133 | return s3c24xx_serial_initconsole(&s5p_serial_drv, s5p_uart_inf); | 133 | return s3c24xx_serial_initconsole(&s5p_serial_driver, s5p_uart_inf); |
134 | } | 134 | } |
135 | 135 | ||
136 | console_initcall(s5pv210_serial_console_init); | 136 | console_initcall(s5pv210_serial_console_init); |
137 | 137 | ||
138 | static int __init s5p_serial_init(void) | 138 | static int __init s5p_serial_init(void) |
139 | { | 139 | { |
140 | return s3c24xx_serial_init(&s5p_serial_drv, *s5p_uart_inf); | 140 | return s3c24xx_serial_init(&s5p_serial_driver, *s5p_uart_inf); |
141 | } | 141 | } |
142 | 142 | ||
143 | static void __exit s5p_serial_exit(void) | 143 | static void __exit s5p_serial_exit(void) |
144 | { | 144 | { |
145 | platform_driver_unregister(&s5p_serial_drv); | 145 | platform_driver_unregister(&s5p_serial_driver); |
146 | } | 146 | } |
147 | 147 | ||
148 | module_init(s5p_serial_init); | 148 | module_init(s5p_serial_init); |
diff --git a/drivers/serial/serial_cs.c b/drivers/serial/serial_cs.c index dadd686c980..526307368f8 100644 --- a/drivers/serial/serial_cs.c +++ b/drivers/serial/serial_cs.c | |||
@@ -715,6 +715,8 @@ static struct pcmcia_device_id serial_ids[] = { | |||
715 | PCMCIA_PFC_DEVICE_MANF_CARD(1, 0x0057, 0x0021), | 715 | PCMCIA_PFC_DEVICE_MANF_CARD(1, 0x0057, 0x0021), |
716 | PCMCIA_PFC_DEVICE_MANF_CARD(1, 0x0089, 0x110a), | 716 | PCMCIA_PFC_DEVICE_MANF_CARD(1, 0x0089, 0x110a), |
717 | PCMCIA_PFC_DEVICE_MANF_CARD(1, 0x0104, 0x000a), | 717 | PCMCIA_PFC_DEVICE_MANF_CARD(1, 0x0104, 0x000a), |
718 | PCMCIA_PFC_DEVICE_MANF_CARD(1, 0x0105, 0x0d0a), | ||
719 | PCMCIA_PFC_DEVICE_MANF_CARD(1, 0x0105, 0x0e0a), | ||
718 | PCMCIA_PFC_DEVICE_MANF_CARD(1, 0x0105, 0xea15), | 720 | PCMCIA_PFC_DEVICE_MANF_CARD(1, 0x0105, 0xea15), |
719 | PCMCIA_PFC_DEVICE_MANF_CARD(1, 0x0109, 0x0501), | 721 | PCMCIA_PFC_DEVICE_MANF_CARD(1, 0x0109, 0x0501), |
720 | PCMCIA_PFC_DEVICE_MANF_CARD(1, 0x0138, 0x110a), | 722 | PCMCIA_PFC_DEVICE_MANF_CARD(1, 0x0138, 0x110a), |
@@ -724,8 +726,6 @@ static struct pcmcia_device_id serial_ids[] = { | |||
724 | PCMCIA_PFC_DEVICE_MANF_CARD(1, 0x016c, 0x0081), | 726 | PCMCIA_PFC_DEVICE_MANF_CARD(1, 0x016c, 0x0081), |
725 | PCMCIA_PFC_DEVICE_MANF_CARD(1, 0x021b, 0x0101), | 727 | PCMCIA_PFC_DEVICE_MANF_CARD(1, 0x021b, 0x0101), |
726 | PCMCIA_PFC_DEVICE_MANF_CARD(1, 0x08a1, 0xc0ab), | 728 | PCMCIA_PFC_DEVICE_MANF_CARD(1, 0x08a1, 0xc0ab), |
727 | PCMCIA_PFC_DEVICE_MANF_CARD(1, 0x0105, 0x0d0a), | ||
728 | PCMCIA_PFC_DEVICE_MANF_CARD(1, 0x0105, 0x0e0a), | ||
729 | PCMCIA_PFC_DEVICE_PROD_ID123(1, "MEGAHERTZ", "CC/XJEM3288", "DATA/FAX/CELL ETHERNET MODEM", 0xf510db04, 0x04cd2988, 0x46a52d63), | 729 | PCMCIA_PFC_DEVICE_PROD_ID123(1, "MEGAHERTZ", "CC/XJEM3288", "DATA/FAX/CELL ETHERNET MODEM", 0xf510db04, 0x04cd2988, 0x46a52d63), |
730 | PCMCIA_PFC_DEVICE_PROD_ID123(1, "MEGAHERTZ", "CC/XJEM3336", "DATA/FAX/CELL ETHERNET MODEM", 0xf510db04, 0x0143b773, 0x46a52d63), | 730 | PCMCIA_PFC_DEVICE_PROD_ID123(1, "MEGAHERTZ", "CC/XJEM3336", "DATA/FAX/CELL ETHERNET MODEM", 0xf510db04, 0x0143b773, 0x46a52d63), |
731 | PCMCIA_PFC_DEVICE_PROD_ID123(1, "MEGAHERTZ", "EM1144T", "PCMCIA MODEM", 0xf510db04, 0x856d66c8, 0xbd6c43ef), | 731 | PCMCIA_PFC_DEVICE_PROD_ID123(1, "MEGAHERTZ", "EM1144T", "PCMCIA MODEM", 0xf510db04, 0x856d66c8, 0xbd6c43ef), |
@@ -768,17 +768,26 @@ static struct pcmcia_device_id serial_ids[] = { | |||
768 | PCMCIA_DEVICE_MANF_CARD(0x00a4, 0x0276), | 768 | PCMCIA_DEVICE_MANF_CARD(0x00a4, 0x0276), |
769 | PCMCIA_DEVICE_MANF_CARD(0x0101, 0x0039), | 769 | PCMCIA_DEVICE_MANF_CARD(0x0101, 0x0039), |
770 | PCMCIA_DEVICE_MANF_CARD(0x0104, 0x0006), | 770 | PCMCIA_DEVICE_MANF_CARD(0x0104, 0x0006), |
771 | PCMCIA_DEVICE_MANF_CARD(0x0105, 0x0101), /* TDK DF2814 */ | ||
772 | PCMCIA_DEVICE_MANF_CARD(0x0105, 0x100a), /* Xircom CM-56G */ | ||
773 | PCMCIA_DEVICE_MANF_CARD(0x0105, 0x3e0a), /* TDK DF5660 */ | ||
771 | PCMCIA_DEVICE_MANF_CARD(0x0105, 0x410a), | 774 | PCMCIA_DEVICE_MANF_CARD(0x0105, 0x410a), |
775 | PCMCIA_DEVICE_MANF_CARD(0x0107, 0x0002), /* USRobotics 14,400 */ | ||
772 | PCMCIA_DEVICE_MANF_CARD(0x010b, 0x0d50), | 776 | PCMCIA_DEVICE_MANF_CARD(0x010b, 0x0d50), |
773 | PCMCIA_DEVICE_MANF_CARD(0x010b, 0x0d51), | 777 | PCMCIA_DEVICE_MANF_CARD(0x010b, 0x0d51), |
774 | PCMCIA_DEVICE_MANF_CARD(0x010b, 0x0d52), | 778 | PCMCIA_DEVICE_MANF_CARD(0x010b, 0x0d52), |
775 | PCMCIA_DEVICE_MANF_CARD(0x010b, 0x0d53), | 779 | PCMCIA_DEVICE_MANF_CARD(0x010b, 0x0d53), |
776 | PCMCIA_DEVICE_MANF_CARD(0x010b, 0xd180), | 780 | PCMCIA_DEVICE_MANF_CARD(0x010b, 0xd180), |
781 | PCMCIA_DEVICE_MANF_CARD(0x0115, 0x3330), /* USRobotics/SUN 14,400 */ | ||
782 | PCMCIA_DEVICE_MANF_CARD(0x0124, 0x0100), /* Nokia DTP-2 ver II */ | ||
783 | PCMCIA_DEVICE_MANF_CARD(0x0134, 0x5600), /* LASAT COMMUNICATIONS A/S */ | ||
777 | PCMCIA_DEVICE_MANF_CARD(0x0137, 0x000e), | 784 | PCMCIA_DEVICE_MANF_CARD(0x0137, 0x000e), |
778 | PCMCIA_DEVICE_MANF_CARD(0x0137, 0x001b), | 785 | PCMCIA_DEVICE_MANF_CARD(0x0137, 0x001b), |
779 | PCMCIA_DEVICE_MANF_CARD(0x0137, 0x0025), | 786 | PCMCIA_DEVICE_MANF_CARD(0x0137, 0x0025), |
780 | PCMCIA_DEVICE_MANF_CARD(0x0137, 0x0045), | 787 | PCMCIA_DEVICE_MANF_CARD(0x0137, 0x0045), |
781 | PCMCIA_DEVICE_MANF_CARD(0x0137, 0x0052), | 788 | PCMCIA_DEVICE_MANF_CARD(0x0137, 0x0052), |
789 | PCMCIA_DEVICE_MANF_CARD(0x016c, 0x0006), /* Psion 56K+Fax */ | ||
790 | PCMCIA_DEVICE_MANF_CARD(0x0200, 0x0001), /* MultiMobile */ | ||
782 | PCMCIA_DEVICE_PROD_ID134("ADV", "TECH", "COMpad-32/85", 0x67459937, 0x916d02ba, 0x8fbe92ae), | 791 | PCMCIA_DEVICE_PROD_ID134("ADV", "TECH", "COMpad-32/85", 0x67459937, 0x916d02ba, 0x8fbe92ae), |
783 | PCMCIA_DEVICE_PROD_ID124("GATEWAY2000", "CC3144", "PCMCIA MODEM", 0x506bccae, 0xcb3685f1, 0xbd6c43ef), | 792 | PCMCIA_DEVICE_PROD_ID124("GATEWAY2000", "CC3144", "PCMCIA MODEM", 0x506bccae, 0xcb3685f1, 0xbd6c43ef), |
784 | PCMCIA_DEVICE_PROD_ID14("MEGAHERTZ", "PCMCIA MODEM", 0xf510db04, 0xbd6c43ef), | 793 | PCMCIA_DEVICE_PROD_ID14("MEGAHERTZ", "PCMCIA MODEM", 0xf510db04, 0xbd6c43ef), |
@@ -792,16 +801,21 @@ static struct pcmcia_device_id serial_ids[] = { | |||
792 | PCMCIA_DEVICE_PROD_ID12("COMPAQ", "PCMCIA 33600 FAX/DATA MODEM", 0xa3a3062c, 0x5a00ce95), | 801 | PCMCIA_DEVICE_PROD_ID12("COMPAQ", "PCMCIA 33600 FAX/DATA MODEM", 0xa3a3062c, 0x5a00ce95), |
793 | PCMCIA_DEVICE_PROD_ID12("Computerboards, Inc.", "PCM-COM422", 0xd0b78f51, 0x7e2d49ed), | 802 | PCMCIA_DEVICE_PROD_ID12("Computerboards, Inc.", "PCM-COM422", 0xd0b78f51, 0x7e2d49ed), |
794 | PCMCIA_DEVICE_PROD_ID12("Dr. Neuhaus", "FURY CARD 14K4", 0x76942813, 0x8b96ce65), | 803 | PCMCIA_DEVICE_PROD_ID12("Dr. Neuhaus", "FURY CARD 14K4", 0x76942813, 0x8b96ce65), |
804 | PCMCIA_DEVICE_PROD_ID12("IBM", "ISDN/56K/GSM", 0xb569a6e5, 0xfee5297b), | ||
795 | PCMCIA_DEVICE_PROD_ID12("Intelligent", "ANGIA FAX/MODEM", 0xb496e65e, 0xf31602a6), | 805 | PCMCIA_DEVICE_PROD_ID12("Intelligent", "ANGIA FAX/MODEM", 0xb496e65e, 0xf31602a6), |
796 | PCMCIA_DEVICE_PROD_ID12("Intel", "MODEM 2400+", 0x816cc815, 0x412729fb), | 806 | PCMCIA_DEVICE_PROD_ID12("Intel", "MODEM 2400+", 0x816cc815, 0x412729fb), |
807 | PCMCIA_DEVICE_PROD_ID12("Intertex", "IX34-PCMCIA", 0xf8a097e3, 0x97880447), | ||
797 | PCMCIA_DEVICE_PROD_ID12("IOTech Inc ", "PCMCIA Dual RS-232 Serial Port Card", 0x3bd2d898, 0x92abc92f), | 808 | PCMCIA_DEVICE_PROD_ID12("IOTech Inc ", "PCMCIA Dual RS-232 Serial Port Card", 0x3bd2d898, 0x92abc92f), |
798 | PCMCIA_DEVICE_PROD_ID12("MACRONIX", "FAX/MODEM", 0x668388b3, 0x3f9bdf2f), | 809 | PCMCIA_DEVICE_PROD_ID12("MACRONIX", "FAX/MODEM", 0x668388b3, 0x3f9bdf2f), |
799 | PCMCIA_DEVICE_PROD_ID12("Multi-Tech", "MT1432LT", 0x5f73be51, 0x0b3e2383), | 810 | PCMCIA_DEVICE_PROD_ID12("Multi-Tech", "MT1432LT", 0x5f73be51, 0x0b3e2383), |
800 | PCMCIA_DEVICE_PROD_ID12("Multi-Tech", "MT2834LT", 0x5f73be51, 0x4cd7c09e), | 811 | PCMCIA_DEVICE_PROD_ID12("Multi-Tech", "MT2834LT", 0x5f73be51, 0x4cd7c09e), |
801 | PCMCIA_DEVICE_PROD_ID12("OEM ", "C288MX ", 0xb572d360, 0xd2385b7a), | 812 | PCMCIA_DEVICE_PROD_ID12("OEM ", "C288MX ", 0xb572d360, 0xd2385b7a), |
813 | PCMCIA_DEVICE_PROD_ID12("Option International", "V34bis GSM/PSTN Data/Fax Modem", 0x9d7cd6f5, 0x5cb8bf41), | ||
802 | PCMCIA_DEVICE_PROD_ID12("PCMCIA ", "C336MX ", 0x99bcafe9, 0xaa25bcab), | 814 | PCMCIA_DEVICE_PROD_ID12("PCMCIA ", "C336MX ", 0x99bcafe9, 0xaa25bcab), |
803 | PCMCIA_DEVICE_PROD_ID12("Quatech Inc", "PCMCIA Dual RS-232 Serial Port Card", 0xc4420b35, 0x92abc92f), | 815 | PCMCIA_DEVICE_PROD_ID12("Quatech Inc", "PCMCIA Dual RS-232 Serial Port Card", 0xc4420b35, 0x92abc92f), |
804 | PCMCIA_DEVICE_PROD_ID12("Quatech Inc", "Dual RS-232 Serial Port PC Card", 0xc4420b35, 0x031a380d), | 816 | PCMCIA_DEVICE_PROD_ID12("Quatech Inc", "Dual RS-232 Serial Port PC Card", 0xc4420b35, 0x031a380d), |
817 | PCMCIA_DEVICE_PROD_ID12("Telia", "SurfinBird 560P/A+", 0xe2cdd5e, 0xc9314b38), | ||
818 | PCMCIA_DEVICE_PROD_ID1("Smart Serial Port", 0x2d8ce292), | ||
805 | PCMCIA_PFC_DEVICE_CIS_PROD_ID12(1, "PCMCIA", "EN2218-LAN/MODEM", 0x281f1c5d, 0x570f348e, "cis/PCMLM28.cis"), | 819 | PCMCIA_PFC_DEVICE_CIS_PROD_ID12(1, "PCMCIA", "EN2218-LAN/MODEM", 0x281f1c5d, 0x570f348e, "cis/PCMLM28.cis"), |
806 | PCMCIA_PFC_DEVICE_CIS_PROD_ID12(1, "PCMCIA", "UE2218-LAN/MODEM", 0x281f1c5d, 0x6fdcacee, "cis/PCMLM28.cis"), | 820 | PCMCIA_PFC_DEVICE_CIS_PROD_ID12(1, "PCMCIA", "UE2218-LAN/MODEM", 0x281f1c5d, 0x6fdcacee, "cis/PCMLM28.cis"), |
807 | PCMCIA_PFC_DEVICE_CIS_PROD_ID12(1, "Psion Dacom", "Gold Card V34 Ethernet", 0xf5f025c2, 0x338e8155, "cis/PCMLM28.cis"), | 821 | PCMCIA_PFC_DEVICE_CIS_PROD_ID12(1, "Psion Dacom", "Gold Card V34 Ethernet", 0xf5f025c2, 0x338e8155, "cis/PCMLM28.cis"), |
diff --git a/drivers/serial/sh-sci.c b/drivers/serial/sh-sci.c index f250a610a26..5f90fcd7d10 100644 --- a/drivers/serial/sh-sci.c +++ b/drivers/serial/sh-sci.c | |||
@@ -1004,8 +1004,9 @@ static void sci_rx_dma_release(struct sci_port *s, bool enable_pio) | |||
1004 | s->chan_rx = NULL; | 1004 | s->chan_rx = NULL; |
1005 | s->cookie_rx[0] = s->cookie_rx[1] = -EINVAL; | 1005 | s->cookie_rx[0] = s->cookie_rx[1] = -EINVAL; |
1006 | dma_release_channel(chan); | 1006 | dma_release_channel(chan); |
1007 | dma_free_coherent(port->dev, s->buf_len_rx * 2, | 1007 | if (sg_dma_address(&s->sg_rx[0])) |
1008 | sg_virt(&s->sg_rx[0]), sg_dma_address(&s->sg_rx[0])); | 1008 | dma_free_coherent(port->dev, s->buf_len_rx * 2, |
1009 | sg_virt(&s->sg_rx[0]), sg_dma_address(&s->sg_rx[0])); | ||
1009 | if (enable_pio) | 1010 | if (enable_pio) |
1010 | sci_start_rx(port); | 1011 | sci_start_rx(port); |
1011 | } | 1012 | } |
@@ -1091,7 +1092,7 @@ static void work_fn_rx(struct work_struct *work) | |||
1091 | unsigned long flags; | 1092 | unsigned long flags; |
1092 | int count; | 1093 | int count; |
1093 | 1094 | ||
1094 | chan->device->device_terminate_all(chan); | 1095 | chan->device->device_control(chan, DMA_TERMINATE_ALL, 0); |
1095 | dev_dbg(port->dev, "Read %u bytes with cookie %d\n", | 1096 | dev_dbg(port->dev, "Read %u bytes with cookie %d\n", |
1096 | sh_desc->partial, sh_desc->cookie); | 1097 | sh_desc->partial, sh_desc->cookie); |
1097 | 1098 | ||
diff --git a/drivers/serial/sunhv.c b/drivers/serial/sunhv.c index d14cca7fb88..890f9174296 100644 --- a/drivers/serial/sunhv.c +++ b/drivers/serial/sunhv.c | |||
@@ -565,7 +565,7 @@ static int __devinit hv_probe(struct of_device *op, const struct of_device_id *m | |||
565 | if (err) | 565 | if (err) |
566 | goto out_free_con_read_page; | 566 | goto out_free_con_read_page; |
567 | 567 | ||
568 | sunserial_console_match(&sunhv_console, op->node, | 568 | sunserial_console_match(&sunhv_console, op->dev.of_node, |
569 | &sunhv_reg, port->line, false); | 569 | &sunhv_reg, port->line, false); |
570 | 570 | ||
571 | err = uart_add_one_port(&sunhv_reg, port); | 571 | err = uart_add_one_port(&sunhv_reg, port); |
@@ -630,8 +630,11 @@ static const struct of_device_id hv_match[] = { | |||
630 | MODULE_DEVICE_TABLE(of, hv_match); | 630 | MODULE_DEVICE_TABLE(of, hv_match); |
631 | 631 | ||
632 | static struct of_platform_driver hv_driver = { | 632 | static struct of_platform_driver hv_driver = { |
633 | .name = "hv", | 633 | .driver = { |
634 | .match_table = hv_match, | 634 | .name = "hv", |
635 | .owner = THIS_MODULE, | ||
636 | .of_match_table = hv_match, | ||
637 | }, | ||
635 | .probe = hv_probe, | 638 | .probe = hv_probe, |
636 | .remove = __devexit_p(hv_remove), | 639 | .remove = __devexit_p(hv_remove), |
637 | }; | 640 | }; |
diff --git a/drivers/serial/sunsab.c b/drivers/serial/sunsab.c index d2e0321049e..5e81bc6b48b 100644 --- a/drivers/serial/sunsab.c +++ b/drivers/serial/sunsab.c | |||
@@ -883,7 +883,7 @@ static int sunsab_console_setup(struct console *con, char *options) | |||
883 | printk("Console: ttyS%d (SAB82532)\n", | 883 | printk("Console: ttyS%d (SAB82532)\n", |
884 | (sunsab_reg.minor - 64) + con->index); | 884 | (sunsab_reg.minor - 64) + con->index); |
885 | 885 | ||
886 | sunserial_console_termios(con, to_of_device(up->port.dev)->node); | 886 | sunserial_console_termios(con, to_of_device(up->port.dev)->dev.of_node); |
887 | 887 | ||
888 | switch (con->cflag & CBAUD) { | 888 | switch (con->cflag & CBAUD) { |
889 | case B150: baud = 150; break; | 889 | case B150: baud = 150; break; |
@@ -1026,11 +1026,11 @@ static int __devinit sab_probe(struct of_device *op, const struct of_device_id * | |||
1026 | if (err) | 1026 | if (err) |
1027 | goto out1; | 1027 | goto out1; |
1028 | 1028 | ||
1029 | sunserial_console_match(SUNSAB_CONSOLE(), op->node, | 1029 | sunserial_console_match(SUNSAB_CONSOLE(), op->dev.of_node, |
1030 | &sunsab_reg, up[0].port.line, | 1030 | &sunsab_reg, up[0].port.line, |
1031 | false); | 1031 | false); |
1032 | 1032 | ||
1033 | sunserial_console_match(SUNSAB_CONSOLE(), op->node, | 1033 | sunserial_console_match(SUNSAB_CONSOLE(), op->dev.of_node, |
1034 | &sunsab_reg, up[1].port.line, | 1034 | &sunsab_reg, up[1].port.line, |
1035 | false); | 1035 | false); |
1036 | 1036 | ||
@@ -1093,8 +1093,11 @@ static const struct of_device_id sab_match[] = { | |||
1093 | MODULE_DEVICE_TABLE(of, sab_match); | 1093 | MODULE_DEVICE_TABLE(of, sab_match); |
1094 | 1094 | ||
1095 | static struct of_platform_driver sab_driver = { | 1095 | static struct of_platform_driver sab_driver = { |
1096 | .name = "sab", | 1096 | .driver = { |
1097 | .match_table = sab_match, | 1097 | .name = "sab", |
1098 | .owner = THIS_MODULE, | ||
1099 | .of_match_table = sab_match, | ||
1100 | }, | ||
1098 | .probe = sab_probe, | 1101 | .probe = sab_probe, |
1099 | .remove = __devexit_p(sab_remove), | 1102 | .remove = __devexit_p(sab_remove), |
1100 | }; | 1103 | }; |
diff --git a/drivers/serial/sunsu.c b/drivers/serial/sunsu.c index 01f7731e59b..234459c2f01 100644 --- a/drivers/serial/sunsu.c +++ b/drivers/serial/sunsu.c | |||
@@ -1200,7 +1200,7 @@ static int __devinit sunsu_kbd_ms_init(struct uart_sunsu_port *up) | |||
1200 | return -ENODEV; | 1200 | return -ENODEV; |
1201 | 1201 | ||
1202 | printk("%s: %s port at %llx, irq %u\n", | 1202 | printk("%s: %s port at %llx, irq %u\n", |
1203 | to_of_device(up->port.dev)->node->full_name, | 1203 | to_of_device(up->port.dev)->dev.of_node->full_name, |
1204 | (up->su_type == SU_PORT_KBD) ? "Keyboard" : "Mouse", | 1204 | (up->su_type == SU_PORT_KBD) ? "Keyboard" : "Mouse", |
1205 | (unsigned long long) up->port.mapbase, | 1205 | (unsigned long long) up->port.mapbase, |
1206 | up->port.irq); | 1206 | up->port.irq); |
@@ -1352,7 +1352,7 @@ static int __init sunsu_console_setup(struct console *co, char *options) | |||
1352 | spin_lock_init(&port->lock); | 1352 | spin_lock_init(&port->lock); |
1353 | 1353 | ||
1354 | /* Get firmware console settings. */ | 1354 | /* Get firmware console settings. */ |
1355 | sunserial_console_termios(co, to_of_device(port->dev)->node); | 1355 | sunserial_console_termios(co, to_of_device(port->dev)->dev.of_node); |
1356 | 1356 | ||
1357 | memset(&termios, 0, sizeof(struct ktermios)); | 1357 | memset(&termios, 0, sizeof(struct ktermios)); |
1358 | termios.c_cflag = co->cflag; | 1358 | termios.c_cflag = co->cflag; |
@@ -1409,7 +1409,7 @@ static enum su_type __devinit su_get_type(struct device_node *dp) | |||
1409 | static int __devinit su_probe(struct of_device *op, const struct of_device_id *match) | 1409 | static int __devinit su_probe(struct of_device *op, const struct of_device_id *match) |
1410 | { | 1410 | { |
1411 | static int inst; | 1411 | static int inst; |
1412 | struct device_node *dp = op->node; | 1412 | struct device_node *dp = op->dev.of_node; |
1413 | struct uart_sunsu_port *up; | 1413 | struct uart_sunsu_port *up; |
1414 | struct resource *rp; | 1414 | struct resource *rp; |
1415 | enum su_type type; | 1415 | enum su_type type; |
@@ -1539,8 +1539,11 @@ static const struct of_device_id su_match[] = { | |||
1539 | MODULE_DEVICE_TABLE(of, su_match); | 1539 | MODULE_DEVICE_TABLE(of, su_match); |
1540 | 1540 | ||
1541 | static struct of_platform_driver su_driver = { | 1541 | static struct of_platform_driver su_driver = { |
1542 | .name = "su", | 1542 | .driver = { |
1543 | .match_table = su_match, | 1543 | .name = "su", |
1544 | .owner = THIS_MODULE, | ||
1545 | .of_match_table = su_match, | ||
1546 | }, | ||
1544 | .probe = su_probe, | 1547 | .probe = su_probe, |
1545 | .remove = __devexit_p(su_remove), | 1548 | .remove = __devexit_p(su_remove), |
1546 | }; | 1549 | }; |
diff --git a/drivers/serial/sunzilog.c b/drivers/serial/sunzilog.c index 978b3cee02d..f9a24f4ebb3 100644 --- a/drivers/serial/sunzilog.c +++ b/drivers/serial/sunzilog.c | |||
@@ -1230,7 +1230,7 @@ static int __init sunzilog_console_setup(struct console *con, char *options) | |||
1230 | (sunzilog_reg.minor - 64) + con->index, con->index); | 1230 | (sunzilog_reg.minor - 64) + con->index, con->index); |
1231 | 1231 | ||
1232 | /* Get firmware console settings. */ | 1232 | /* Get firmware console settings. */ |
1233 | sunserial_console_termios(con, to_of_device(up->port.dev)->node); | 1233 | sunserial_console_termios(con, to_of_device(up->port.dev)->dev.of_node); |
1234 | 1234 | ||
1235 | /* Firmware console speed is limited to 150-->38400 baud so | 1235 | /* Firmware console speed is limited to 150-->38400 baud so |
1236 | * this hackish cflag thing is OK. | 1236 | * this hackish cflag thing is OK. |
@@ -1408,7 +1408,7 @@ static int __devinit zs_probe(struct of_device *op, const struct of_device_id *m | |||
1408 | int keyboard_mouse = 0; | 1408 | int keyboard_mouse = 0; |
1409 | int err; | 1409 | int err; |
1410 | 1410 | ||
1411 | if (of_find_property(op->node, "keyboard", NULL)) | 1411 | if (of_find_property(op->dev.of_node, "keyboard", NULL)) |
1412 | keyboard_mouse = 1; | 1412 | keyboard_mouse = 1; |
1413 | 1413 | ||
1414 | /* uarts must come before keyboards/mice */ | 1414 | /* uarts must come before keyboards/mice */ |
@@ -1465,7 +1465,7 @@ static int __devinit zs_probe(struct of_device *op, const struct of_device_id *m | |||
1465 | sunzilog_init_hw(&up[1]); | 1465 | sunzilog_init_hw(&up[1]); |
1466 | 1466 | ||
1467 | if (!keyboard_mouse) { | 1467 | if (!keyboard_mouse) { |
1468 | if (sunserial_console_match(SUNZILOG_CONSOLE(), op->node, | 1468 | if (sunserial_console_match(SUNZILOG_CONSOLE(), op->dev.of_node, |
1469 | &sunzilog_reg, up[0].port.line, | 1469 | &sunzilog_reg, up[0].port.line, |
1470 | false)) | 1470 | false)) |
1471 | up->flags |= SUNZILOG_FLAG_IS_CONS; | 1471 | up->flags |= SUNZILOG_FLAG_IS_CONS; |
@@ -1475,7 +1475,7 @@ static int __devinit zs_probe(struct of_device *op, const struct of_device_id *m | |||
1475 | rp, sizeof(struct zilog_layout)); | 1475 | rp, sizeof(struct zilog_layout)); |
1476 | return err; | 1476 | return err; |
1477 | } | 1477 | } |
1478 | if (sunserial_console_match(SUNZILOG_CONSOLE(), op->node, | 1478 | if (sunserial_console_match(SUNZILOG_CONSOLE(), op->dev.of_node, |
1479 | &sunzilog_reg, up[1].port.line, | 1479 | &sunzilog_reg, up[1].port.line, |
1480 | false)) | 1480 | false)) |
1481 | up->flags |= SUNZILOG_FLAG_IS_CONS; | 1481 | up->flags |= SUNZILOG_FLAG_IS_CONS; |
@@ -1541,8 +1541,11 @@ static const struct of_device_id zs_match[] = { | |||
1541 | MODULE_DEVICE_TABLE(of, zs_match); | 1541 | MODULE_DEVICE_TABLE(of, zs_match); |
1542 | 1542 | ||
1543 | static struct of_platform_driver zs_driver = { | 1543 | static struct of_platform_driver zs_driver = { |
1544 | .name = "zs", | 1544 | .driver = { |
1545 | .match_table = zs_match, | 1545 | .name = "zs", |
1546 | .owner = THIS_MODULE, | ||
1547 | .of_match_table = zs_match, | ||
1548 | }, | ||
1546 | .probe = zs_probe, | 1549 | .probe = zs_probe, |
1547 | .remove = __devexit_p(zs_remove), | 1550 | .remove = __devexit_p(zs_remove), |
1548 | }; | 1551 | }; |
diff --git a/drivers/serial/uartlite.c b/drivers/serial/uartlite.c index e6639a95d27..8acccd56437 100644 --- a/drivers/serial/uartlite.c +++ b/drivers/serial/uartlite.c | |||
@@ -591,15 +591,15 @@ ulite_of_probe(struct of_device *op, const struct of_device_id *match) | |||
591 | 591 | ||
592 | dev_dbg(&op->dev, "%s(%p, %p)\n", __func__, op, match); | 592 | dev_dbg(&op->dev, "%s(%p, %p)\n", __func__, op, match); |
593 | 593 | ||
594 | rc = of_address_to_resource(op->node, 0, &res); | 594 | rc = of_address_to_resource(op->dev.of_node, 0, &res); |
595 | if (rc) { | 595 | if (rc) { |
596 | dev_err(&op->dev, "invalid address\n"); | 596 | dev_err(&op->dev, "invalid address\n"); |
597 | return rc; | 597 | return rc; |
598 | } | 598 | } |
599 | 599 | ||
600 | irq = irq_of_parse_and_map(op->node, 0); | 600 | irq = irq_of_parse_and_map(op->dev.of_node, 0); |
601 | 601 | ||
602 | id = of_get_property(op->node, "port-number", NULL); | 602 | id = of_get_property(op->dev.of_node, "port-number", NULL); |
603 | 603 | ||
604 | return ulite_assign(&op->dev, id ? *id : -1, res.start, irq); | 604 | return ulite_assign(&op->dev, id ? *id : -1, res.start, irq); |
605 | } | 605 | } |
@@ -610,13 +610,12 @@ static int __devexit ulite_of_remove(struct of_device *op) | |||
610 | } | 610 | } |
611 | 611 | ||
612 | static struct of_platform_driver ulite_of_driver = { | 612 | static struct of_platform_driver ulite_of_driver = { |
613 | .owner = THIS_MODULE, | ||
614 | .name = "uartlite", | ||
615 | .match_table = ulite_of_match, | ||
616 | .probe = ulite_of_probe, | 613 | .probe = ulite_of_probe, |
617 | .remove = __devexit_p(ulite_of_remove), | 614 | .remove = __devexit_p(ulite_of_remove), |
618 | .driver = { | 615 | .driver = { |
619 | .name = "uartlite", | 616 | .name = "uartlite", |
617 | .owner = THIS_MODULE, | ||
618 | .of_match_table = ulite_of_match, | ||
620 | }, | 619 | }, |
621 | }; | 620 | }; |
622 | 621 | ||
diff --git a/drivers/serial/ucc_uart.c b/drivers/serial/ucc_uart.c index 074904912f6..907b06f5c44 100644 --- a/drivers/serial/ucc_uart.c +++ b/drivers/serial/ucc_uart.c | |||
@@ -1197,7 +1197,7 @@ static void uart_firmware_cont(const struct firmware *fw, void *context) | |||
1197 | static int ucc_uart_probe(struct of_device *ofdev, | 1197 | static int ucc_uart_probe(struct of_device *ofdev, |
1198 | const struct of_device_id *match) | 1198 | const struct of_device_id *match) |
1199 | { | 1199 | { |
1200 | struct device_node *np = ofdev->node; | 1200 | struct device_node *np = ofdev->dev.of_node; |
1201 | const unsigned int *iprop; /* Integer OF properties */ | 1201 | const unsigned int *iprop; /* Integer OF properties */ |
1202 | const char *sprop; /* String OF properties */ | 1202 | const char *sprop; /* String OF properties */ |
1203 | struct uart_qe_port *qe_port = NULL; | 1203 | struct uart_qe_port *qe_port = NULL; |
@@ -1486,9 +1486,11 @@ static struct of_device_id ucc_uart_match[] = { | |||
1486 | MODULE_DEVICE_TABLE(of, ucc_uart_match); | 1486 | MODULE_DEVICE_TABLE(of, ucc_uart_match); |
1487 | 1487 | ||
1488 | static struct of_platform_driver ucc_uart_of_driver = { | 1488 | static struct of_platform_driver ucc_uart_of_driver = { |
1489 | .owner = THIS_MODULE, | 1489 | .driver = { |
1490 | .name = "ucc_uart", | 1490 | .name = "ucc_uart", |
1491 | .match_table = ucc_uart_match, | 1491 | .owner = THIS_MODULE, |
1492 | .of_match_table = ucc_uart_match, | ||
1493 | }, | ||
1492 | .probe = ucc_uart_probe, | 1494 | .probe = ucc_uart_probe, |
1493 | .remove = ucc_uart_remove, | 1495 | .remove = ucc_uart_remove, |
1494 | }; | 1496 | }; |