Loading drivers/parport/parport_serial.c +18 −57 Original line number Diff line number Diff line Loading @@ -31,14 +31,8 @@ enum parport_pc_pci_cards { netmos_9xx5_combo, netmos_9855, avlab_1s1p, avlab_1s1p_650, avlab_1s1p_850, avlab_1s2p, avlab_1s2p_650, avlab_1s2p_850, avlab_2s1p, avlab_2s1p_650, avlab_2s1p_850, siig_1s1p_10x, siig_2s1p_10x, siig_2p1s_20x, Loading Loading @@ -85,14 +79,8 @@ static struct parport_pc_pci cards[] __devinitdata = { /* netmos_9xx5_combo */ { 1, { { 2, -1 }, }, netmos_parallel_init }, /* netmos_9855 */ { 1, { { 0, -1 }, }, netmos_parallel_init }, /* avlab_1s1p */ { 1, { { 1, 2}, } }, /* avlab_1s1p_650 */ { 1, { { 1, 2}, } }, /* avlab_1s1p_850 */ { 1, { { 1, 2}, } }, /* avlab_1s2p */ { 2, { { 1, 2}, { 3, 4 },} }, /* avlab_1s2p_650 */ { 2, { { 1, 2}, { 3, 4 },} }, /* avlab_1s2p_850 */ { 2, { { 1, 2}, { 3, 4 },} }, /* avlab_2s1p */ { 1, { { 2, 3}, } }, /* avlab_2s1p_650 */ { 1, { { 2, 3}, } }, /* avlab_2s1p_850 */ { 1, { { 2, 3}, } }, /* siig_1s1p_10x */ { 1, { { 3, 4 }, } }, /* siig_2s1p_10x */ { 1, { { 4, 5 }, } }, /* siig_2p1s_20x */ { 2, { { 1, 2 }, { 3, 4 }, } }, Loading @@ -119,15 +107,24 @@ static struct pci_device_id parport_serial_pci_tbl[] = { { PCI_VENDOR_ID_NETMOS, PCI_DEVICE_ID_NETMOS_9855, PCI_ANY_ID, PCI_ANY_ID, 0, 0, netmos_9855 }, /* PCI_VENDOR_ID_AVLAB/Intek21 has another bunch of cards ...*/ { 0x14db, 0x2110, PCI_ANY_ID, PCI_ANY_ID, 0, 0, avlab_1s1p}, { 0x14db, 0x2111, PCI_ANY_ID, PCI_ANY_ID, 0, 0, avlab_1s1p_650}, { 0x14db, 0x2112, PCI_ANY_ID, PCI_ANY_ID, 0, 0, avlab_1s1p_850}, { 0x14db, 0x2140, PCI_ANY_ID, PCI_ANY_ID, 0, 0, avlab_1s2p}, { 0x14db, 0x2141, PCI_ANY_ID, PCI_ANY_ID, 0, 0, avlab_1s2p_650}, { 0x14db, 0x2142, PCI_ANY_ID, PCI_ANY_ID, 0, 0, avlab_1s2p_850}, { 0x14db, 0x2160, PCI_ANY_ID, PCI_ANY_ID, 0, 0, avlab_2s1p}, { 0x14db, 0x2161, PCI_ANY_ID, PCI_ANY_ID, 0, 0, avlab_2s1p_650}, { 0x14db, 0x2162, PCI_ANY_ID, PCI_ANY_ID, 0, 0, avlab_2s1p_850}, { PCI_VENDOR_ID_AFAVLAB, 0x2110, PCI_ANY_ID, PCI_ANY_ID, 0, 0, avlab_1s1p }, { PCI_VENDOR_ID_AFAVLAB, 0x2111, PCI_ANY_ID, PCI_ANY_ID, 0, 0, avlab_1s1p }, { PCI_VENDOR_ID_AFAVLAB, 0x2112, PCI_ANY_ID, PCI_ANY_ID, 0, 0, avlab_1s1p }, { PCI_VENDOR_ID_AFAVLAB, 0x2140, PCI_ANY_ID, PCI_ANY_ID, 0, 0, avlab_1s2p }, { PCI_VENDOR_ID_AFAVLAB, 0x2141, PCI_ANY_ID, PCI_ANY_ID, 0, 0, avlab_1s2p }, { PCI_VENDOR_ID_AFAVLAB, 0x2142, PCI_ANY_ID, PCI_ANY_ID, 0, 0, avlab_1s2p }, { PCI_VENDOR_ID_AFAVLAB, 0x2160, PCI_ANY_ID, PCI_ANY_ID, 0, 0, avlab_2s1p }, { PCI_VENDOR_ID_AFAVLAB, 0x2161, PCI_ANY_ID, PCI_ANY_ID, 0, 0, avlab_2s1p }, { PCI_VENDOR_ID_AFAVLAB, 0x2162, PCI_ANY_ID, PCI_ANY_ID, 0, 0, avlab_2s1p }, { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_1S1P_10x_550, PCI_ANY_ID, PCI_ANY_ID, 0, 0, siig_1s1p_10x }, { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_1S1P_10x_650, Loading Loading @@ -201,54 +198,18 @@ static struct pciserial_board pci_parport_serial_boards[] __devinitdata = { .base_baud = 115200, .uart_offset = 8, }, [avlab_1s1p_650] = { /* nt */ .flags = FL_BASE0 | FL_BASE_BARS, .num_ports = 1, .base_baud = 115200, .uart_offset = 8, }, [avlab_1s1p_850] = { /* nt */ .flags = FL_BASE0 | FL_BASE_BARS, .num_ports = 1, .base_baud = 115200, .uart_offset = 8, }, [avlab_1s2p] = { /* n/t */ .flags = FL_BASE0 | FL_BASE_BARS, .num_ports = 1, .base_baud = 115200, .uart_offset = 8, }, [avlab_1s2p_650] = { /* nt */ .flags = FL_BASE0 | FL_BASE_BARS, .num_ports = 1, .base_baud = 115200, .uart_offset = 8, }, [avlab_1s2p_850] = { /* nt */ .flags = FL_BASE0 | FL_BASE_BARS, .num_ports = 1, .base_baud = 115200, .uart_offset = 8, }, [avlab_2s1p] = { /* n/t */ .flags = FL_BASE0 | FL_BASE_BARS, .num_ports = 2, .base_baud = 115200, .uart_offset = 8, }, [avlab_2s1p_650] = { /* nt */ .flags = FL_BASE0 | FL_BASE_BARS, .num_ports = 2, .base_baud = 115200, .uart_offset = 8, }, [avlab_2s1p_850] = { /* nt */ .flags = FL_BASE0 | FL_BASE_BARS, .num_ports = 2, .base_baud = 115200, .uart_offset = 8, }, [siig_1s1p_10x] = { .flags = FL_BASE2, .num_ports = 1, Loading drivers/serial/21285.c +7 −12 Original line number Diff line number Diff line Loading @@ -375,23 +375,18 @@ static void serial21285_setup_ports(void) } #ifdef CONFIG_SERIAL_21285_CONSOLE static void serial21285_console_putchar(struct uart_port *port, int ch) { while (*CSR_UARTFLG & 0x20) barrier(); *CSR_UARTDR = ch; } static void serial21285_console_write(struct console *co, const char *s, unsigned int count) { int i; for (i = 0; i < count; i++) { while (*CSR_UARTFLG & 0x20) barrier(); *CSR_UARTDR = s[i]; if (s[i] == '\n') { while (*CSR_UARTFLG & 0x20) barrier(); *CSR_UARTDR = '\r'; } } uart_console_write(&serial21285_port, s, count, serial21285_console_putchar); } static void __init Loading drivers/serial/8250.c +9 −17 Original line number Diff line number Diff line Loading @@ -2182,6 +2182,14 @@ static inline void wait_for_xmitr(struct uart_8250_port *up, int bits) } } static void serial8250_console_putchar(struct uart_port *port, int ch) { struct uart_8250_port *up = (struct uart_8250_port *)port; wait_for_xmitr(up, UART_LSR_THRE); serial_out(up, UART_TX, ch); } /* * Print a string to the serial port trying not to disturb * any possible real use of the port... Loading @@ -2193,7 +2201,6 @@ serial8250_console_write(struct console *co, const char *s, unsigned int count) { struct uart_8250_port *up = &serial8250_ports[co->index]; unsigned int ier; int i; touch_nmi_watchdog(); Loading @@ -2207,22 +2214,7 @@ serial8250_console_write(struct console *co, const char *s, unsigned int count) else serial_out(up, UART_IER, 0); /* * Now, do each character */ for (i = 0; i < count; i++, s++) { wait_for_xmitr(up, UART_LSR_THRE); /* * Send the character out. * If a LF, also do CR... */ serial_out(up, UART_TX, *s); if (*s == 10) { wait_for_xmitr(up, UART_LSR_THRE); serial_out(up, UART_TX, 13); } } uart_console_write(&up->port, s, count, serial8250_console_putchar); /* * Finally, wait for transmitter to become empty Loading drivers/serial/8250_early.c +2 −7 Original line number Diff line number Diff line Loading @@ -74,7 +74,7 @@ static void __init wait_for_xmitr(struct uart_port *port) } } static void __init putc(struct uart_port *port, unsigned char c) static void __init putc(struct uart_port *port, int c) { wait_for_xmitr(port); serial_out(port, UART_TX, c); Loading @@ -89,12 +89,7 @@ static void __init early_uart_write(struct console *console, const char *s, unsi ier = serial_in(port, UART_IER); serial_out(port, UART_IER, 0); while (*s && count-- > 0) { putc(port, *s); if (*s == '\n') putc(port, '\r'); s++; } uart_console_write(port, s, count, putc); /* Wait for transmitter to become empty and restore the IER */ wait_for_xmitr(port); Loading drivers/serial/amba-pl010.c +8 −16 Original line number Diff line number Diff line Loading @@ -591,12 +591,18 @@ static struct uart_amba_port amba_ports[UART_NR] = { #ifdef CONFIG_SERIAL_AMBA_PL010_CONSOLE static void pl010_console_putchar(struct uart_port *port, int ch) { while (!UART_TX_READY(UART_GET_FR(port))) barrier(); UART_PUT_CHAR(port, ch); } static void pl010_console_write(struct console *co, const char *s, unsigned int count) { struct uart_port *port = &amba_ports[co->index].port; unsigned int status, old_cr; int i; /* * First save the CR then disable the interrupts Loading @@ -604,21 +610,7 @@ pl010_console_write(struct console *co, const char *s, unsigned int count) old_cr = UART_GET_CR(port); UART_PUT_CR(port, UART01x_CR_UARTEN); /* * Now, do each character */ for (i = 0; i < count; i++) { do { status = UART_GET_FR(port); } while (!UART_TX_READY(status)); UART_PUT_CHAR(port, s[i]); if (s[i] == '\n') { do { status = UART_GET_FR(port); } while (!UART_TX_READY(status)); UART_PUT_CHAR(port, '\r'); } } uart_console_write(port, s, count, pl010_console_putchar); /* * Finally, wait for transmitter to become empty Loading Loading
drivers/parport/parport_serial.c +18 −57 Original line number Diff line number Diff line Loading @@ -31,14 +31,8 @@ enum parport_pc_pci_cards { netmos_9xx5_combo, netmos_9855, avlab_1s1p, avlab_1s1p_650, avlab_1s1p_850, avlab_1s2p, avlab_1s2p_650, avlab_1s2p_850, avlab_2s1p, avlab_2s1p_650, avlab_2s1p_850, siig_1s1p_10x, siig_2s1p_10x, siig_2p1s_20x, Loading Loading @@ -85,14 +79,8 @@ static struct parport_pc_pci cards[] __devinitdata = { /* netmos_9xx5_combo */ { 1, { { 2, -1 }, }, netmos_parallel_init }, /* netmos_9855 */ { 1, { { 0, -1 }, }, netmos_parallel_init }, /* avlab_1s1p */ { 1, { { 1, 2}, } }, /* avlab_1s1p_650 */ { 1, { { 1, 2}, } }, /* avlab_1s1p_850 */ { 1, { { 1, 2}, } }, /* avlab_1s2p */ { 2, { { 1, 2}, { 3, 4 },} }, /* avlab_1s2p_650 */ { 2, { { 1, 2}, { 3, 4 },} }, /* avlab_1s2p_850 */ { 2, { { 1, 2}, { 3, 4 },} }, /* avlab_2s1p */ { 1, { { 2, 3}, } }, /* avlab_2s1p_650 */ { 1, { { 2, 3}, } }, /* avlab_2s1p_850 */ { 1, { { 2, 3}, } }, /* siig_1s1p_10x */ { 1, { { 3, 4 }, } }, /* siig_2s1p_10x */ { 1, { { 4, 5 }, } }, /* siig_2p1s_20x */ { 2, { { 1, 2 }, { 3, 4 }, } }, Loading @@ -119,15 +107,24 @@ static struct pci_device_id parport_serial_pci_tbl[] = { { PCI_VENDOR_ID_NETMOS, PCI_DEVICE_ID_NETMOS_9855, PCI_ANY_ID, PCI_ANY_ID, 0, 0, netmos_9855 }, /* PCI_VENDOR_ID_AVLAB/Intek21 has another bunch of cards ...*/ { 0x14db, 0x2110, PCI_ANY_ID, PCI_ANY_ID, 0, 0, avlab_1s1p}, { 0x14db, 0x2111, PCI_ANY_ID, PCI_ANY_ID, 0, 0, avlab_1s1p_650}, { 0x14db, 0x2112, PCI_ANY_ID, PCI_ANY_ID, 0, 0, avlab_1s1p_850}, { 0x14db, 0x2140, PCI_ANY_ID, PCI_ANY_ID, 0, 0, avlab_1s2p}, { 0x14db, 0x2141, PCI_ANY_ID, PCI_ANY_ID, 0, 0, avlab_1s2p_650}, { 0x14db, 0x2142, PCI_ANY_ID, PCI_ANY_ID, 0, 0, avlab_1s2p_850}, { 0x14db, 0x2160, PCI_ANY_ID, PCI_ANY_ID, 0, 0, avlab_2s1p}, { 0x14db, 0x2161, PCI_ANY_ID, PCI_ANY_ID, 0, 0, avlab_2s1p_650}, { 0x14db, 0x2162, PCI_ANY_ID, PCI_ANY_ID, 0, 0, avlab_2s1p_850}, { PCI_VENDOR_ID_AFAVLAB, 0x2110, PCI_ANY_ID, PCI_ANY_ID, 0, 0, avlab_1s1p }, { PCI_VENDOR_ID_AFAVLAB, 0x2111, PCI_ANY_ID, PCI_ANY_ID, 0, 0, avlab_1s1p }, { PCI_VENDOR_ID_AFAVLAB, 0x2112, PCI_ANY_ID, PCI_ANY_ID, 0, 0, avlab_1s1p }, { PCI_VENDOR_ID_AFAVLAB, 0x2140, PCI_ANY_ID, PCI_ANY_ID, 0, 0, avlab_1s2p }, { PCI_VENDOR_ID_AFAVLAB, 0x2141, PCI_ANY_ID, PCI_ANY_ID, 0, 0, avlab_1s2p }, { PCI_VENDOR_ID_AFAVLAB, 0x2142, PCI_ANY_ID, PCI_ANY_ID, 0, 0, avlab_1s2p }, { PCI_VENDOR_ID_AFAVLAB, 0x2160, PCI_ANY_ID, PCI_ANY_ID, 0, 0, avlab_2s1p }, { PCI_VENDOR_ID_AFAVLAB, 0x2161, PCI_ANY_ID, PCI_ANY_ID, 0, 0, avlab_2s1p }, { PCI_VENDOR_ID_AFAVLAB, 0x2162, PCI_ANY_ID, PCI_ANY_ID, 0, 0, avlab_2s1p }, { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_1S1P_10x_550, PCI_ANY_ID, PCI_ANY_ID, 0, 0, siig_1s1p_10x }, { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_1S1P_10x_650, Loading Loading @@ -201,54 +198,18 @@ static struct pciserial_board pci_parport_serial_boards[] __devinitdata = { .base_baud = 115200, .uart_offset = 8, }, [avlab_1s1p_650] = { /* nt */ .flags = FL_BASE0 | FL_BASE_BARS, .num_ports = 1, .base_baud = 115200, .uart_offset = 8, }, [avlab_1s1p_850] = { /* nt */ .flags = FL_BASE0 | FL_BASE_BARS, .num_ports = 1, .base_baud = 115200, .uart_offset = 8, }, [avlab_1s2p] = { /* n/t */ .flags = FL_BASE0 | FL_BASE_BARS, .num_ports = 1, .base_baud = 115200, .uart_offset = 8, }, [avlab_1s2p_650] = { /* nt */ .flags = FL_BASE0 | FL_BASE_BARS, .num_ports = 1, .base_baud = 115200, .uart_offset = 8, }, [avlab_1s2p_850] = { /* nt */ .flags = FL_BASE0 | FL_BASE_BARS, .num_ports = 1, .base_baud = 115200, .uart_offset = 8, }, [avlab_2s1p] = { /* n/t */ .flags = FL_BASE0 | FL_BASE_BARS, .num_ports = 2, .base_baud = 115200, .uart_offset = 8, }, [avlab_2s1p_650] = { /* nt */ .flags = FL_BASE0 | FL_BASE_BARS, .num_ports = 2, .base_baud = 115200, .uart_offset = 8, }, [avlab_2s1p_850] = { /* nt */ .flags = FL_BASE0 | FL_BASE_BARS, .num_ports = 2, .base_baud = 115200, .uart_offset = 8, }, [siig_1s1p_10x] = { .flags = FL_BASE2, .num_ports = 1, Loading
drivers/serial/21285.c +7 −12 Original line number Diff line number Diff line Loading @@ -375,23 +375,18 @@ static void serial21285_setup_ports(void) } #ifdef CONFIG_SERIAL_21285_CONSOLE static void serial21285_console_putchar(struct uart_port *port, int ch) { while (*CSR_UARTFLG & 0x20) barrier(); *CSR_UARTDR = ch; } static void serial21285_console_write(struct console *co, const char *s, unsigned int count) { int i; for (i = 0; i < count; i++) { while (*CSR_UARTFLG & 0x20) barrier(); *CSR_UARTDR = s[i]; if (s[i] == '\n') { while (*CSR_UARTFLG & 0x20) barrier(); *CSR_UARTDR = '\r'; } } uart_console_write(&serial21285_port, s, count, serial21285_console_putchar); } static void __init Loading
drivers/serial/8250.c +9 −17 Original line number Diff line number Diff line Loading @@ -2182,6 +2182,14 @@ static inline void wait_for_xmitr(struct uart_8250_port *up, int bits) } } static void serial8250_console_putchar(struct uart_port *port, int ch) { struct uart_8250_port *up = (struct uart_8250_port *)port; wait_for_xmitr(up, UART_LSR_THRE); serial_out(up, UART_TX, ch); } /* * Print a string to the serial port trying not to disturb * any possible real use of the port... Loading @@ -2193,7 +2201,6 @@ serial8250_console_write(struct console *co, const char *s, unsigned int count) { struct uart_8250_port *up = &serial8250_ports[co->index]; unsigned int ier; int i; touch_nmi_watchdog(); Loading @@ -2207,22 +2214,7 @@ serial8250_console_write(struct console *co, const char *s, unsigned int count) else serial_out(up, UART_IER, 0); /* * Now, do each character */ for (i = 0; i < count; i++, s++) { wait_for_xmitr(up, UART_LSR_THRE); /* * Send the character out. * If a LF, also do CR... */ serial_out(up, UART_TX, *s); if (*s == 10) { wait_for_xmitr(up, UART_LSR_THRE); serial_out(up, UART_TX, 13); } } uart_console_write(&up->port, s, count, serial8250_console_putchar); /* * Finally, wait for transmitter to become empty Loading
drivers/serial/8250_early.c +2 −7 Original line number Diff line number Diff line Loading @@ -74,7 +74,7 @@ static void __init wait_for_xmitr(struct uart_port *port) } } static void __init putc(struct uart_port *port, unsigned char c) static void __init putc(struct uart_port *port, int c) { wait_for_xmitr(port); serial_out(port, UART_TX, c); Loading @@ -89,12 +89,7 @@ static void __init early_uart_write(struct console *console, const char *s, unsi ier = serial_in(port, UART_IER); serial_out(port, UART_IER, 0); while (*s && count-- > 0) { putc(port, *s); if (*s == '\n') putc(port, '\r'); s++; } uart_console_write(port, s, count, putc); /* Wait for transmitter to become empty and restore the IER */ wait_for_xmitr(port); Loading
drivers/serial/amba-pl010.c +8 −16 Original line number Diff line number Diff line Loading @@ -591,12 +591,18 @@ static struct uart_amba_port amba_ports[UART_NR] = { #ifdef CONFIG_SERIAL_AMBA_PL010_CONSOLE static void pl010_console_putchar(struct uart_port *port, int ch) { while (!UART_TX_READY(UART_GET_FR(port))) barrier(); UART_PUT_CHAR(port, ch); } static void pl010_console_write(struct console *co, const char *s, unsigned int count) { struct uart_port *port = &amba_ports[co->index].port; unsigned int status, old_cr; int i; /* * First save the CR then disable the interrupts Loading @@ -604,21 +610,7 @@ pl010_console_write(struct console *co, const char *s, unsigned int count) old_cr = UART_GET_CR(port); UART_PUT_CR(port, UART01x_CR_UARTEN); /* * Now, do each character */ for (i = 0; i < count; i++) { do { status = UART_GET_FR(port); } while (!UART_TX_READY(status)); UART_PUT_CHAR(port, s[i]); if (s[i] == '\n') { do { status = UART_GET_FR(port); } while (!UART_TX_READY(status)); UART_PUT_CHAR(port, '\r'); } } uart_console_write(port, s, count, pl010_console_putchar); /* * Finally, wait for transmitter to become empty Loading