diff options
Diffstat (limited to 'drivers/serial')
-rw-r--r-- | drivers/serial/atmel_serial.c | 8 | ||||
-rw-r--r-- | drivers/serial/imx.c | 12 | ||||
-rw-r--r-- | drivers/serial/of_serial.c | 4 | ||||
-rw-r--r-- | drivers/serial/serial_cs.c | 22 |
4 files changed, 31 insertions, 15 deletions
diff --git a/drivers/serial/atmel_serial.c b/drivers/serial/atmel_serial.c index b3497d7e5354..338b15c0a548 100644 --- a/drivers/serial/atmel_serial.c +++ b/drivers/serial/atmel_serial.c | |||
@@ -1104,11 +1104,13 @@ static void atmel_set_termios(struct uart_port *port, struct ktermios *termios, | |||
1104 | /* update the per-port timeout */ | 1104 | /* update the per-port timeout */ |
1105 | uart_update_timeout(port, termios->c_cflag, baud); | 1105 | uart_update_timeout(port, termios->c_cflag, baud); |
1106 | 1106 | ||
1107 | /* save/disable interrupts and drain transmitter */ | 1107 | /* |
1108 | * save/disable interrupts. The tty layer will ensure that the | ||
1109 | * transmitter is empty if requested by the caller, so there's | ||
1110 | * no need to wait for it here. | ||
1111 | */ | ||
1108 | imr = UART_GET_IMR(port); | 1112 | imr = UART_GET_IMR(port); |
1109 | UART_PUT_IDR(port, -1); | 1113 | UART_PUT_IDR(port, -1); |
1110 | while (!(UART_GET_CSR(port) & ATMEL_US_TXEMPTY)) | ||
1111 | cpu_relax(); | ||
1112 | 1114 | ||
1113 | /* disable receiver and transmitter */ | 1115 | /* disable receiver and transmitter */ |
1114 | UART_PUT_CR(port, ATMEL_US_TXDIS | ATMEL_US_RXDIS); | 1116 | UART_PUT_CR(port, ATMEL_US_TXDIS | ATMEL_US_RXDIS); |
diff --git a/drivers/serial/imx.c b/drivers/serial/imx.c index 285b414f3054..5d7b58f1fe42 100644 --- a/drivers/serial/imx.c +++ b/drivers/serial/imx.c | |||
@@ -924,11 +924,13 @@ imx_set_termios(struct uart_port *port, struct ktermios *termios, | |||
924 | rational_best_approximation(16 * div * baud, sport->port.uartclk, | 924 | rational_best_approximation(16 * div * baud, sport->port.uartclk, |
925 | 1 << 16, 1 << 16, &num, &denom); | 925 | 1 << 16, 1 << 16, &num, &denom); |
926 | 926 | ||
927 | tdiv64 = sport->port.uartclk; | 927 | if (port->info && port->info->port.tty) { |
928 | tdiv64 *= num; | 928 | tdiv64 = sport->port.uartclk; |
929 | do_div(tdiv64, denom * 16 * div); | 929 | tdiv64 *= num; |
930 | tty_encode_baud_rate(sport->port.info->port.tty, | 930 | do_div(tdiv64, denom * 16 * div); |
931 | (speed_t)tdiv64, (speed_t)tdiv64); | 931 | tty_encode_baud_rate(sport->port.info->port.tty, |
932 | (speed_t)tdiv64, (speed_t)tdiv64); | ||
933 | } | ||
932 | 934 | ||
933 | num -= 1; | 935 | num -= 1; |
934 | denom -= 1; | 936 | denom -= 1; |
diff --git a/drivers/serial/of_serial.c b/drivers/serial/of_serial.c index 3f2027c70e46..02406ba6da1c 100644 --- a/drivers/serial/of_serial.c +++ b/drivers/serial/of_serial.c | |||
@@ -122,7 +122,7 @@ static int __devinit of_platform_serial_probe(struct of_device *ofdev, | |||
122 | 122 | ||
123 | info->type = port_type; | 123 | info->type = port_type; |
124 | info->line = ret; | 124 | info->line = ret; |
125 | ofdev->dev.driver_data = info; | 125 | dev_set_drvdata(&ofdev->dev, info); |
126 | return 0; | 126 | return 0; |
127 | out: | 127 | out: |
128 | kfree(info); | 128 | kfree(info); |
@@ -135,7 +135,7 @@ out: | |||
135 | */ | 135 | */ |
136 | static int of_platform_serial_remove(struct of_device *ofdev) | 136 | static int of_platform_serial_remove(struct of_device *ofdev) |
137 | { | 137 | { |
138 | struct of_serial_info *info = ofdev->dev.driver_data; | 138 | struct of_serial_info *info = dev_get_drvdata(&ofdev->dev); |
139 | switch (info->type) { | 139 | switch (info->type) { |
140 | #ifdef CONFIG_SERIAL_8250 | 140 | #ifdef CONFIG_SERIAL_8250 |
141 | case PORT_8250 ... PORT_MAX_8250: | 141 | case PORT_8250 ... PORT_MAX_8250: |
diff --git a/drivers/serial/serial_cs.c b/drivers/serial/serial_cs.c index 7546aa887fa7..79c9c5f5cdba 100644 --- a/drivers/serial/serial_cs.c +++ b/drivers/serial/serial_cs.c | |||
@@ -681,7 +681,7 @@ static int serial_config(struct pcmcia_device * link) | |||
681 | u_char *buf; | 681 | u_char *buf; |
682 | cisparse_t *parse; | 682 | cisparse_t *parse; |
683 | cistpl_cftable_entry_t *cf; | 683 | cistpl_cftable_entry_t *cf; |
684 | int i; | 684 | int i, last_ret, last_fn; |
685 | 685 | ||
686 | DEBUG(0, "serial_config(0x%p)\n", link); | 686 | DEBUG(0, "serial_config(0x%p)\n", link); |
687 | 687 | ||
@@ -699,6 +699,16 @@ static int serial_config(struct pcmcia_device * link) | |||
699 | tuple->TupleDataMax = 255; | 699 | tuple->TupleDataMax = 255; |
700 | tuple->Attributes = 0; | 700 | tuple->Attributes = 0; |
701 | 701 | ||
702 | /* Get configuration register information */ | ||
703 | tuple->DesiredTuple = CISTPL_CONFIG; | ||
704 | last_ret = first_tuple(link, tuple, parse); | ||
705 | if (last_ret != 0) { | ||
706 | last_fn = ParseTuple; | ||
707 | goto cs_failed; | ||
708 | } | ||
709 | link->conf.ConfigBase = parse->config.base; | ||
710 | link->conf.Present = parse->config.rmask[0]; | ||
711 | |||
702 | /* Is this a compliant multifunction card? */ | 712 | /* Is this a compliant multifunction card? */ |
703 | tuple->DesiredTuple = CISTPL_LONGLINK_MFC; | 713 | tuple->DesiredTuple = CISTPL_LONGLINK_MFC; |
704 | tuple->Attributes = TUPLE_RETURN_COMMON | TUPLE_RETURN_LINK; | 714 | tuple->Attributes = TUPLE_RETURN_COMMON | TUPLE_RETURN_LINK; |
@@ -761,7 +771,9 @@ static int serial_config(struct pcmcia_device * link) | |||
761 | kfree(cfg_mem); | 771 | kfree(cfg_mem); |
762 | return 0; | 772 | return 0; |
763 | 773 | ||
764 | failed: | 774 | cs_failed: |
775 | cs_error(link, last_fn, last_ret); | ||
776 | failed: | ||
765 | serial_remove(link); | 777 | serial_remove(link); |
766 | kfree(cfg_mem); | 778 | kfree(cfg_mem); |
767 | return -ENODEV; | 779 | return -ENODEV; |
@@ -863,10 +875,10 @@ static struct pcmcia_device_id serial_ids[] = { | |||
863 | PCMCIA_PFC_DEVICE_CIS_PROD_ID12(1, "LINKSYS", "PCMLM28", 0xf7cb0b07, 0x66881874, "PCMLM28.cis"), | 875 | PCMCIA_PFC_DEVICE_CIS_PROD_ID12(1, "LINKSYS", "PCMLM28", 0xf7cb0b07, 0x66881874, "PCMLM28.cis"), |
864 | PCMCIA_MFC_DEVICE_CIS_PROD_ID12(1, "DAYNA COMMUNICATIONS", "LAN AND MODEM MULTIFUNCTION", 0x8fdf8f89, 0xdd5ed9e8, "DP83903.cis"), | 876 | PCMCIA_MFC_DEVICE_CIS_PROD_ID12(1, "DAYNA COMMUNICATIONS", "LAN AND MODEM MULTIFUNCTION", 0x8fdf8f89, 0xdd5ed9e8, "DP83903.cis"), |
865 | PCMCIA_MFC_DEVICE_CIS_PROD_ID4(1, "NSC MF LAN/Modem", 0x58fc6056, "DP83903.cis"), | 877 | PCMCIA_MFC_DEVICE_CIS_PROD_ID4(1, "NSC MF LAN/Modem", 0x58fc6056, "DP83903.cis"), |
866 | PCMCIA_MFC_DEVICE_CIS_MANF_CARD(1, 0x0101, 0x0556, "3CCFEM556.cis"), | 878 | PCMCIA_MFC_DEVICE_CIS_MANF_CARD(1, 0x0101, 0x0556, "cis/3CCFEM556.cis"), |
867 | PCMCIA_MFC_DEVICE_CIS_MANF_CARD(1, 0x0175, 0x0000, "DP83903.cis"), | 879 | PCMCIA_MFC_DEVICE_CIS_MANF_CARD(1, 0x0175, 0x0000, "DP83903.cis"), |
868 | PCMCIA_MFC_DEVICE_CIS_MANF_CARD(1, 0x0101, 0x0035, "3CXEM556.cis"), | 880 | PCMCIA_MFC_DEVICE_CIS_MANF_CARD(1, 0x0101, 0x0035, "cis/3CXEM556.cis"), |
869 | PCMCIA_MFC_DEVICE_CIS_MANF_CARD(1, 0x0101, 0x003d, "3CXEM556.cis"), | 881 | PCMCIA_MFC_DEVICE_CIS_MANF_CARD(1, 0x0101, 0x003d, "cis/3CXEM556.cis"), |
870 | PCMCIA_DEVICE_CIS_PROD_ID12("Sierra Wireless", "AC850", 0xd85f6206, 0x42a2c018, "SW_8xx_SER.cis"), /* Sierra Wireless AC850 3G Network Adapter R1 */ | 882 | PCMCIA_DEVICE_CIS_PROD_ID12("Sierra Wireless", "AC850", 0xd85f6206, 0x42a2c018, "SW_8xx_SER.cis"), /* Sierra Wireless AC850 3G Network Adapter R1 */ |
871 | PCMCIA_DEVICE_CIS_MANF_CARD(0x0192, 0x0710, "SW_7xx_SER.cis"), /* Sierra Wireless AC710/AC750 GPRS Network Adapter R1 */ | 883 | PCMCIA_DEVICE_CIS_MANF_CARD(0x0192, 0x0710, "SW_7xx_SER.cis"), /* Sierra Wireless AC710/AC750 GPRS Network Adapter R1 */ |
872 | PCMCIA_DEVICE_CIS_MANF_CARD(0x0192, 0xa555, "SW_555_SER.cis"), /* Sierra Aircard 555 CDMA 1xrtt Modem -- pre update */ | 884 | PCMCIA_DEVICE_CIS_MANF_CARD(0x0192, 0xa555, "SW_555_SER.cis"), /* Sierra Aircard 555 CDMA 1xrtt Modem -- pre update */ |