|
64 | 64 | #define RXSTAT_DUMMY_READ (0x10000000) |
65 | 65 |
|
66 | 66 | enum s3c24xx_port_type { |
67 | | - TYPE_S3C24XX, |
68 | 67 | TYPE_S3C6400, |
69 | 68 | TYPE_APPLE_S5L, |
70 | 69 | }; |
@@ -128,8 +127,6 @@ struct s3c24xx_uart_dma { |
128 | 127 | }; |
129 | 128 |
|
130 | 129 | struct s3c24xx_uart_port { |
131 | | - unsigned char rx_claimed; |
132 | | - unsigned char tx_claimed; |
133 | 130 | unsigned char rx_enabled; |
134 | 131 | unsigned char tx_enabled; |
135 | 132 | unsigned int pm_level; |
@@ -1166,29 +1163,6 @@ static void s3c24xx_serial_release_dma(struct s3c24xx_uart_port *p) |
1166 | 1163 | } |
1167 | 1164 | } |
1168 | 1165 |
|
1169 | | -static void s3c24xx_serial_shutdown(struct uart_port *port) |
1170 | | -{ |
1171 | | - struct s3c24xx_uart_port *ourport = to_ourport(port); |
1172 | | - |
1173 | | - if (ourport->tx_claimed) { |
1174 | | - free_irq(ourport->tx_irq, ourport); |
1175 | | - ourport->tx_enabled = 0; |
1176 | | - ourport->tx_claimed = 0; |
1177 | | - ourport->tx_mode = 0; |
1178 | | - } |
1179 | | - |
1180 | | - if (ourport->rx_claimed) { |
1181 | | - free_irq(ourport->rx_irq, ourport); |
1182 | | - ourport->rx_claimed = 0; |
1183 | | - ourport->rx_enabled = 0; |
1184 | | - } |
1185 | | - |
1186 | | - if (ourport->dma) |
1187 | | - s3c24xx_serial_release_dma(ourport); |
1188 | | - |
1189 | | - ourport->tx_in_progress = 0; |
1190 | | -} |
1191 | | - |
1192 | 1166 | static void s3c64xx_serial_shutdown(struct uart_port *port) |
1193 | 1167 | { |
1194 | 1168 | struct s3c24xx_uart_port *ourport = to_ourport(port); |
@@ -1234,48 +1208,6 @@ static void apple_s5l_serial_shutdown(struct uart_port *port) |
1234 | 1208 | ourport->tx_in_progress = 0; |
1235 | 1209 | } |
1236 | 1210 |
|
1237 | | -static int s3c24xx_serial_startup(struct uart_port *port) |
1238 | | -{ |
1239 | | - struct s3c24xx_uart_port *ourport = to_ourport(port); |
1240 | | - int ret; |
1241 | | - |
1242 | | - ourport->rx_enabled = 1; |
1243 | | - |
1244 | | - ret = request_irq(ourport->rx_irq, s3c24xx_serial_rx_irq, 0, |
1245 | | - s3c24xx_serial_portname(port), ourport); |
1246 | | - |
1247 | | - if (ret != 0) { |
1248 | | - dev_err(port->dev, "cannot get irq %d\n", ourport->rx_irq); |
1249 | | - return ret; |
1250 | | - } |
1251 | | - |
1252 | | - ourport->rx_claimed = 1; |
1253 | | - |
1254 | | - dev_dbg(port->dev, "requesting tx irq...\n"); |
1255 | | - |
1256 | | - ourport->tx_enabled = 1; |
1257 | | - |
1258 | | - ret = request_irq(ourport->tx_irq, s3c24xx_serial_tx_irq, 0, |
1259 | | - s3c24xx_serial_portname(port), ourport); |
1260 | | - |
1261 | | - if (ret) { |
1262 | | - dev_err(port->dev, "cannot get irq %d\n", ourport->tx_irq); |
1263 | | - goto err; |
1264 | | - } |
1265 | | - |
1266 | | - ourport->tx_claimed = 1; |
1267 | | - |
1268 | | - /* the port reset code should have done the correct |
1269 | | - * register setup for the port controls |
1270 | | - */ |
1271 | | - |
1272 | | - return ret; |
1273 | | - |
1274 | | -err: |
1275 | | - s3c24xx_serial_shutdown(port); |
1276 | | - return ret; |
1277 | | -} |
1278 | | - |
1279 | 1211 | static int s3c64xx_serial_startup(struct uart_port *port) |
1280 | 1212 | { |
1281 | 1213 | struct s3c24xx_uart_port *ourport = to_ourport(port); |
@@ -1692,8 +1624,6 @@ static const char *s3c24xx_serial_type(struct uart_port *port) |
1692 | 1624 | const struct s3c24xx_uart_port *ourport = to_ourport(port); |
1693 | 1625 |
|
1694 | 1626 | switch (ourport->info->type) { |
1695 | | - case TYPE_S3C24XX: |
1696 | | - return "S3C24XX"; |
1697 | 1627 | case TYPE_S3C6400: |
1698 | 1628 | return "S3C6400/10"; |
1699 | 1629 | case TYPE_APPLE_S5L: |
@@ -1753,27 +1683,6 @@ static void s3c24xx_serial_put_poll_char(struct uart_port *port, |
1753 | 1683 | unsigned char c); |
1754 | 1684 | #endif |
1755 | 1685 |
|
1756 | | -static const struct uart_ops s3c24xx_serial_ops = { |
1757 | | - .pm = s3c24xx_serial_pm, |
1758 | | - .tx_empty = s3c24xx_serial_tx_empty, |
1759 | | - .get_mctrl = s3c24xx_serial_get_mctrl, |
1760 | | - .set_mctrl = s3c24xx_serial_set_mctrl, |
1761 | | - .stop_tx = s3c24xx_serial_stop_tx, |
1762 | | - .start_tx = s3c24xx_serial_start_tx, |
1763 | | - .stop_rx = s3c24xx_serial_stop_rx, |
1764 | | - .break_ctl = s3c24xx_serial_break_ctl, |
1765 | | - .startup = s3c24xx_serial_startup, |
1766 | | - .shutdown = s3c24xx_serial_shutdown, |
1767 | | - .set_termios = s3c24xx_serial_set_termios, |
1768 | | - .type = s3c24xx_serial_type, |
1769 | | - .config_port = s3c24xx_serial_config_port, |
1770 | | - .verify_port = s3c24xx_serial_verify_port, |
1771 | | -#if defined(CONFIG_SERIAL_SAMSUNG_CONSOLE) && defined(CONFIG_CONSOLE_POLL) |
1772 | | - .poll_get_char = s3c24xx_serial_get_poll_char, |
1773 | | - .poll_put_char = s3c24xx_serial_put_poll_char, |
1774 | | -#endif |
1775 | | -}; |
1776 | | - |
1777 | 1686 | static const struct uart_ops s3c64xx_serial_ops = { |
1778 | 1687 | .pm = s3c24xx_serial_pm, |
1779 | 1688 | .tx_empty = s3c24xx_serial_tx_empty, |
@@ -1836,7 +1745,6 @@ static void s3c24xx_serial_init_port_default(int index) { |
1836 | 1745 | port->iotype = UPIO_MEM; |
1837 | 1746 | port->uartclk = 0; |
1838 | 1747 | port->fifosize = 16; |
1839 | | - port->ops = &s3c24xx_serial_ops; |
1840 | 1748 | port->flags = UPF_BOOT_AUTOCONF; |
1841 | 1749 | port->line = index; |
1842 | 1750 | } |
@@ -1954,16 +1862,6 @@ static int s3c24xx_serial_init_port(struct s3c24xx_uart_port *ourport, |
1954 | 1862 | ourport->tx_irq = ret + 1; |
1955 | 1863 | } |
1956 | 1864 |
|
1957 | | - switch (ourport->info->type) { |
1958 | | - case TYPE_S3C24XX: |
1959 | | - ret = platform_get_irq(platdev, 1); |
1960 | | - if (ret > 0) |
1961 | | - ourport->tx_irq = ret; |
1962 | | - break; |
1963 | | - default: |
1964 | | - break; |
1965 | | - } |
1966 | | - |
1967 | 1865 | /* |
1968 | 1866 | * DMA is currently supported only on DT platforms, if DMA properties |
1969 | 1867 | * are specified. |
@@ -2083,9 +1981,6 @@ static int s3c24xx_serial_probe(struct platform_device *pdev) |
2083 | 1981 | &ourport->drv_data->def_cfg; |
2084 | 1982 |
|
2085 | 1983 | switch (ourport->info->type) { |
2086 | | - case TYPE_S3C24XX: |
2087 | | - ourport->port.ops = &s3c24xx_serial_ops; |
2088 | | - break; |
2089 | 1984 | case TYPE_S3C6400: |
2090 | 1985 | ourport->port.ops = &s3c64xx_serial_ops; |
2091 | 1986 | break; |
|
0 commit comments