Don't use ASYNC_* nor SERIAL_IO_* with serial_core
Subsystems (2)
The serial_core layer has its own definitions for these, and I'd appreciate it if folk would use them instead of the old ASYNC_* and SERIAL_IO_* definitions.
They're compatible _at the moment_ but I make no guarantees that they will stay that way. Hence, it's in your interest to ensure that you're using the correct definitions.
MIPS, PPC seem to be the architectures which are stuck in the past on this issue, as is the M32R SIO driver.
The ioc4_serial driver is worse. It assumes that it can set/clear ASYNC_CTS_FLOW in the uart_info flags field, which is private to serial_core. It also seems to set TTY_IO_ERROR followed by immediately clearing it (pointless), and then it writes to tty->alt_speed... which isn't used by the serial layer so is also pointless.
So, here's a patch to fix some of this crap up. Please test and enjoy - I certainly didn't.
arch/mips/cobalt/setup.c | 2 +- arch/mips/lasat/setup.c | 4 ++-- arch/mips/mips-boards/atlas/atlas_setup.c | 4 ++-- arch/mips/mips-boards/sead/sead_setup.c | 4 ++-- arch/mips/mips-boards/sim/sim_setup.c | 4 ++-- arch/mips/momentum/jaguar_atx/ja-console.c | 2 +- arch/mips/pmc-sierra/yosemite/setup.c | 2 +- arch/mips/sgi-ip32/ip32-setup.c | 13 ++++--------- arch/ppc/platforms/4xx/bamboo.c | 4 ++-- arch/ppc/platforms/4xx/bubinga.c | 4 ++-- arch/ppc/platforms/4xx/ebony.c | 4 ++-- arch/ppc/platforms/4xx/luan.c | 4 ++-- arch/ppc/platforms/4xx/ocotea.c | 4 ++-- arch/ppc/platforms/4xx/xilinx_ml300.c | 4 ++-- arch/ppc/platforms/4xx/yucca.c | 4 ++-- arch/ppc/platforms/spruce.c | 4 ++-- drivers/serial/ioc4_serial.c | 14 -------------- drivers/serial/m32r_sio.c | 2 +- 18 files changed, 32 insertions(+), 51 deletions(-)
arch/mips/cobalt/setup.c +1 -1
@@ -139,7 +139,7 @@ void __init plat_setup(void) uart.type =PORT_UNKNOWN ; uart.uartclk =18432000 ; uart.irq =COBALT_SERIAL_IRQ ; - uart.flags =STD_COM_FLAGS ; + uart.flags =UPF_BOOT_AUTOCONF |UPF_SKIP_TEST ; uart.iobase =0xc800000 ; uart.iotype =UPIO_PORT ;
arch/mips/lasat/setup.c +2 -2
@@ -134,8 +134,8 @@ void __init serial_init(void)memset (&s,0 ,sizeof (s)); - s.flags =STD_COM_FLAGS ; - s.iotype =SERIAL_IO_MEM ; + s.flags =UPF_BOOT_AUTOCONF |UPF_SKIP_TEST ; + s.iotype =UPIO_MEM ;if (mips_machtype ==MACH_LASAT_100 ) { s.uartclk =LASAT_BASE_BAUD_100 *16 ;
arch/mips/mips-boards/atlas/atlas_setup.c +2 -2
@@ -82,8 +82,8 @@ static void __init serial_init(void)#endif s.irq =ATLASINT_UART ; s.uartclk =ATLAS_BASE_BAUD *16 ; - s.flags =ASYNC_BOOT_AUTOCONF |ASYNC_SKIP_TEST |ASYNC_AUTO_IRQ ; - s.iotype =SERIAL_IO_PORT ; + s.flags =UPF_BOOT_AUTOCONF |UPF_SKIP_TEST |UPF_AUTO_IRQ ; + s.iotype =UPIO_PORT ; s.regshift =3 ;if (early_serial_setup (&s) !=0 ) {
arch/mips/mips-boards/sead/sead_setup.c +2 -2
@@ -71,8 +71,8 @@ static void __init serial_init(void)#endif s.irq =MIPSCPU_INT_BASE +MIPSCPU_INT_UART0 ; s.uartclk =SEAD_BASE_BAUD *16 ; - s.flags =ASYNC_BOOT_AUTOCONF |ASYNC_SKIP_TEST |ASYNC_AUTO_IRQ ; - s.iotype =0 ; + s.flags =UPF_BOOT_AUTOCONF |UPF_SKIP_TEST |UPF_AUTO_IRQ ; + s.iotype =UPIO_PORT ; s.regshift =3 ;if (early_serial_setup (&s) !=0 ) {
arch/mips/mips-boards/sim/sim_setup.c +2 -2
@@ -88,8 +88,8 @@ static void __init serial_init(void)but poll for now */ s.irq =0 ; s.uartclk =BASE_BAUD *16 ; - s.flags =ASYNC_BOOT_AUTOCONF |UPF_SKIP_TEST ; - s.iotype =SERIAL_IO_PORT |ASYNC_SKIP_TEST ; + s.flags =UPF_BOOT_AUTOCONF |UPF_SKIP_TEST ; + s.iotype =UPIO_PORT ; s.regshift =0 ; s.timeout =4 ;
arch/mips/momentum/jaguar_atx/ja-console.c +1 -1
@@ -93,7 +93,7 @@ static void inline ja_console_probe(void up.uartclk =JAGUAR_ATX_UART_CLK ; up.regshift =2 ; up.iotype =UPIO_MEM ; - up.flags =ASYNC_BOOT_AUTOCONF |ASYNC_SKIP_TEST ; + up.flags =UPF_BOOT_AUTOCONF |UPF_SKIP_TEST ; up.line =0 ;if (early_serial_setup (&up))
arch/mips/pmc-sierra/yosemite/setup.c +1 -1
@@ -185,7 +185,7 @@ static void __init py_uart_setup(void) up.uartclk =TITAN_UART_CLK ; up.regshift =0 ; up.iotype =UPIO_MEM ; - up.flags =ASYNC_BOOT_AUTOCONF |ASYNC_SKIP_TEST ; + up.flags =UPF_BOOT_AUTOCONF |UPF_SKIP_TEST ; up.line =0 ;if (early_serial_setup (&up))
arch/mips/sgi-ip32/ip32-setup.c +4 -9
@@ -66,11 +66,6 @@ static inline void str2eaddr(unsigned ch#include <linux/tty.h> #include <linux/serial.h> #include <linux/serial_core.h> -extern int early_serial_setup (struct uart_port *port); - -#define STD_COM_FLAGS (ASYNC_SKIP_TEST) -#define BASE_BAUD (1843200 / 16) -#endif /* CONFIG_SERIAL_8250 */ /* An arbitrary time; this can be decreased if reliability looks good */
@@ -110,8 +105,8 @@ void __init plat_setup(void) o2_serial[0 ].type =PORT_16550A ; o2_serial[0 ].line =0 ; o2_serial[0 ].irq =MACEISA_SERIAL1_IRQ ; - o2_serial[0 ].flags =STD_COM_FLAGS ; - o2_serial[0 ].uartclk =BASE_BAUD *16 ; + o2_serial[0 ].flags =UPF_SKIP_TEST ; + o2_serial[0 ].uartclk =1843200 ; o2_serial[0 ].iotype =UPIO_MEM ; o2_serial[0 ].membase = (char *)&mace->isa.serial1; o2_serial[0 ].fifosize =14 ;
@@ -121,8 +116,8 @@ void __init plat_setup(void) o2_serial[1 ].type =PORT_16550A ; o2_serial[1 ].line =1 ; o2_serial[1 ].irq =MACEISA_SERIAL2_IRQ ; - o2_serial[1 ].flags =STD_COM_FLAGS ; - o2_serial[1 ].uartclk =BASE_BAUD *16 ; + o2_serial[1 ].flags =UPF_SKIP_TEST ; + o2_serial[1 ].uartclk =1843200 ; o2_serial[1 ].iotype =UPIO_MEM ; o2_serial[1 ].membase = (char *)&mace->isa.serial2; o2_serial[1 ].fifosize =14 ;
arch/ppc/platforms/4xx/bamboo.c +2 -2
@@ -332,8 +332,8 @@ bamboo_early_serial_map(void) port.irq =0 ; port.uartclk = clocks.uart0; port.regshift =0 ; - port.iotype =SERIAL_IO_MEM ; - port.flags =ASYNC_BOOT_AUTOCONF |ASYNC_SKIP_TEST ; + port.iotype =UPIO_MEM ; + port.flags =UPF_BOOT_AUTOCONF |UPF_SKIP_TEST ; port.line =0 ;if (early_serial_setup (&port) !=0 ) {
arch/ppc/platforms/4xx/bubinga.c +2 -2
@@ -97,8 +97,8 @@ bubinga_early_serial_map(void) port.irq =ACTING_UART0_INT ; port.uartclk = uart_clock; port.regshift =0 ; - port.iotype =SERIAL_IO_MEM ; - port.flags =ASYNC_BOOT_AUTOCONF |ASYNC_SKIP_TEST ; + port.iotype =UPIO_MEM ; + port.flags =UPF_BOOT_AUTOCONF |UPF_SKIP_TEST ; port.line =0 ;if (early_serial_setup (&port) !=0 ) {
arch/ppc/platforms/4xx/ebony.c +2 -2
@@ -225,8 +225,8 @@ ebony_early_serial_map(void) port.irq =0 ; port.uartclk = clocks.uart0; port.regshift =0 ; - port.iotype =SERIAL_IO_MEM ; - port.flags =ASYNC_BOOT_AUTOCONF |ASYNC_SKIP_TEST ; + port.iotype =UPIO_MEM ; + port.flags =UPF_BOOT_AUTOCONF |UPF_SKIP_TEST ; port.line =0 ;if (early_serial_setup (&port) !=0 ) {
arch/ppc/platforms/4xx/luan.c +2 -2
@@ -279,8 +279,8 @@ luan_early_serial_map(void) port.irq =UART0_INT ; port.uartclk = clocks.uart0; port.regshift =0 ; - port.iotype =SERIAL_IO_MEM ; - port.flags =ASYNC_BOOT_AUTOCONF |ASYNC_SKIP_TEST ; + port.iotype =UPIO_MEM ; + port.flags =UPF_BOOT_AUTOCONF |UPF_SKIP_TEST ; port.line =0 ;if (early_serial_setup (&port) !=0 ) {
arch/ppc/platforms/4xx/ocotea.c +2 -2
@@ -248,8 +248,8 @@ ocotea_early_serial_map(void) port.irq =UART0_INT ; port.uartclk = clocks.uart0; port.regshift =0 ; - port.iotype =SERIAL_IO_MEM ; - port.flags =ASYNC_BOOT_AUTOCONF |ASYNC_SKIP_TEST ; + port.iotype =UPIO_MEM ; + port.flags =UPF_BOOT_AUTOCONF |UPF_SKIP_TEST ; port.line =0 ;if (early_serial_setup (&port) !=0 ) {
arch/ppc/platforms/4xx/xilinx_ml300.c +2 -2
@@ -95,8 +95,8 @@ ml300_early_serial_map(void) port.irq = old_ports[i].irq; port.uartclk = old_ports[i].baud_base *16 ; port.regshift = old_ports[i].iomem_reg_shift; - port.iotype =SERIAL_IO_MEM ; - port.flags =ASYNC_BOOT_AUTOCONF |ASYNC_SKIP_TEST ; + port.iotype =UPIO_MEM ; + port.flags =UPF_BOOT_AUTOCONF |UPF_SKIP_TEST ; port.line = i;if (early_serial_setup (&port) !=0 ) {
arch/ppc/platforms/4xx/yucca.c +2 -2
@@ -305,8 +305,8 @@ yucca_early_serial_map(void) port.irq =UART0_INT ; port.uartclk = clocks.uart0; port.regshift =0 ; - port.iotype =SERIAL_IO_MEM ; - port.flags =ASYNC_BOOT_AUTOCONF |ASYNC_SKIP_TEST ; + port.iotype =UPIO_MEM ; + port.flags =UPF_BOOT_AUTOCONF |UPF_SKIP_TEST ; port.line =0 ;if (early_serial_setup (&port) !=0 ) {
arch/ppc/platforms/spruce.c +2 -2
@@ -176,8 +176,8 @@ spruce_early_serial_map(void)memset (&serial_req,0 ,sizeof (serial_req)); serial_req.uartclk = uart_clk; serial_req.irq =UART0_INT ; - serial_req.flags =ASYNC_BOOT_AUTOCONF ; - serial_req.iotype =SERIAL_IO_MEM ; + serial_req.flags =UPF_BOOT_AUTOCONF ; + serial_req.iotype =UPIO_MEM ; serial_req.membase = (u_char *)UART0_IO_BASE ; serial_req.regshift =0 ;
drivers/serial/ioc4_serial.c +0 -14
@@ -1717,11 +1717,9 @@ ioc4_change_speed(struct uart_port *the_ }if (cflag &CRTSCTS ) { - info->flags |=ASYNC_CTS_FLOW ; port->ip_sscr |=IOC4_SSCR_HFC_EN ; }else { - info->flags &= ~ASYNC_CTS_FLOW ; port->ip_sscr &= ~IOC4_SSCR_HFC_EN ; }writel (port->ip_sscr, &port->ip_serial_regs->sscr);
@@ -1760,18 +1758,6 @@ static inline int ic4_startup_local(stru info = the_port->info; -if (info->tty) { -set_bit (TTY_IO_ERROR , &info->tty->flags); -clear_bit (TTY_IO_ERROR , &info->tty->flags); -if ((info->flags &ASYNC_SPD_MASK ) ==ASYNC_SPD_HI ) - info->tty->alt_speed =57600 ; -if ((info->flags &ASYNC_SPD_MASK ) ==ASYNC_SPD_VHI ) - info->tty->alt_speed =115200 ; -if ((info->flags &ASYNC_SPD_MASK ) ==ASYNC_SPD_SHI ) - info->tty->alt_speed =230400 ; -if ((info->flags &ASYNC_SPD_MASK ) ==ASYNC_SPD_WARP ) - info->tty->alt_speed =460800 ; - }local_open (port);/* set the speed of the serial port */
drivers/serial/m32r_sio.c +1 -1
@@ -80,7 +80,7 @@#include <asm/serial.h> /* Standard COM flags */ -#define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST) +#define STD_COM_FLAGS (UPF_BOOT_AUTOCONF | UPF_SKIP_TEST)/* * SERIAL_PORT_DFNS tells us about built-in ports that have no
arch/mips/cobalt/setup.c +1 -1
@@ -139,7 +139,7 @@ void __init plat_setup(void) uart.type =PORT_UNKNOWN ; uart.uartclk =18432000 ; uart.irq =COBALT_SERIAL_IRQ ; - uart.flags =STD_COM_FLAGS ; + uart.flags =UPF_BOOT_AUTOCONF |UPF_SKIP_TEST ; uart.iobase =0xc800000 ; uart.iotype =UPIO_PORT ;
arch/mips/lasat/setup.c +2 -2
@@ -134,8 +134,8 @@ void __init serial_init(void)memset (&s,0 ,sizeof (s)); - s.flags =STD_COM_FLAGS ; - s.iotype =SERIAL_IO_MEM ; + s.flags =UPF_BOOT_AUTOCONF |UPF_SKIP_TEST ; + s.iotype =UPIO_MEM ;if (mips_machtype ==MACH_LASAT_100 ) { s.uartclk =LASAT_BASE_BAUD_100 *16 ;
arch/mips/mips-boards/atlas/atlas_setup.c +2 -2
@@ -82,8 +82,8 @@ static void __init serial_init(void)#endif s.irq =ATLASINT_UART ; s.uartclk =ATLAS_BASE_BAUD *16 ; - s.flags =ASYNC_BOOT_AUTOCONF |ASYNC_SKIP_TEST |ASYNC_AUTO_IRQ ; - s.iotype =SERIAL_IO_PORT ; + s.flags =UPF_BOOT_AUTOCONF |UPF_SKIP_TEST |UPF_AUTO_IRQ ; + s.iotype =UPIO_PORT ; s.regshift =3 ;if (early_serial_setup (&s) !=0 ) {
arch/mips/mips-boards/sead/sead_setup.c +2 -2
@@ -71,8 +71,8 @@ static void __init serial_init(void)#endif s.irq =MIPSCPU_INT_BASE +MIPSCPU_INT_UART0 ; s.uartclk =SEAD_BASE_BAUD *16 ; - s.flags =ASYNC_BOOT_AUTOCONF |ASYNC_SKIP_TEST |ASYNC_AUTO_IRQ ; - s.iotype =0 ; + s.flags =UPF_BOOT_AUTOCONF |UPF_SKIP_TEST |UPF_AUTO_IRQ ; + s.iotype =UPIO_PORT ; s.regshift =3 ;if (early_serial_setup (&s) !=0 ) {
arch/mips/mips-boards/sim/sim_setup.c +2 -2
@@ -88,8 +88,8 @@ static void __init serial_init(void)but poll for now */ s.irq =0 ; s.uartclk =BASE_BAUD *16 ; - s.flags =ASYNC_BOOT_AUTOCONF |UPF_SKIP_TEST ; - s.iotype =SERIAL_IO_PORT |ASYNC_SKIP_TEST ; + s.flags =UPF_BOOT_AUTOCONF |UPF_SKIP_TEST ; + s.iotype =UPIO_PORT ; s.regshift =0 ; s.timeout =4 ;
arch/mips/momentum/jaguar_atx/ja-console.c +1 -1
@@ -93,7 +93,7 @@ static void inline ja_console_probe(void up.uartclk =JAGUAR_ATX_UART_CLK ; up.regshift =2 ; up.iotype =UPIO_MEM ; - up.flags =ASYNC_BOOT_AUTOCONF |ASYNC_SKIP_TEST ; + up.flags =UPF_BOOT_AUTOCONF |UPF_SKIP_TEST ; up.line =0 ;if (early_serial_setup (&up))
arch/mips/pmc-sierra/yosemite/setup.c +1 -1
@@ -185,7 +185,7 @@ static void __init py_uart_setup(void) up.uartclk =TITAN_UART_CLK ; up.regshift =0 ; up.iotype =UPIO_MEM ; - up.flags =ASYNC_BOOT_AUTOCONF |ASYNC_SKIP_TEST ; + up.flags =UPF_BOOT_AUTOCONF |UPF_SKIP_TEST ; up.line =0 ;if (early_serial_setup (&up))
arch/mips/sgi-ip32/ip32-setup.c +4 -9
@@ -66,11 +66,6 @@ static inline void str2eaddr(unsigned ch#include <linux/tty.h> #include <linux/serial.h> #include <linux/serial_core.h> -extern int early_serial_setup (struct uart_port *port); - -#define STD_COM_FLAGS (ASYNC_SKIP_TEST) -#define BASE_BAUD (1843200 / 16) -#endif /* CONFIG_SERIAL_8250 */ /* An arbitrary time; this can be decreased if reliability looks good */
@@ -110,8 +105,8 @@ void __init plat_setup(void) o2_serial[0 ].type =PORT_16550A ; o2_serial[0 ].line =0 ; o2_serial[0 ].irq =MACEISA_SERIAL1_IRQ ; - o2_serial[0 ].flags =STD_COM_FLAGS ; - o2_serial[0 ].uartclk =BASE_BAUD *16 ; + o2_serial[0 ].flags =UPF_SKIP_TEST ; + o2_serial[0 ].uartclk =1843200 ; o2_serial[0 ].iotype =UPIO_MEM ; o2_serial[0 ].membase = (char *)&mace->isa.serial1; o2_serial[0 ].fifosize =14 ;
@@ -121,8 +116,8 @@ void __init plat_setup(void) o2_serial[1 ].type =PORT_16550A ; o2_serial[1 ].line =1 ; o2_serial[1 ].irq =MACEISA_SERIAL2_IRQ ; - o2_serial[1 ].flags =STD_COM_FLAGS ; - o2_serial[1 ].uartclk =BASE_BAUD *16 ; + o2_serial[1 ].flags =UPF_SKIP_TEST ; + o2_serial[1 ].uartclk =1843200 ; o2_serial[1 ].iotype =UPIO_MEM ; o2_serial[1 ].membase = (char *)&mace->isa.serial2; o2_serial[1 ].fifosize =14 ;
arch/ppc/platforms/4xx/bamboo.c +2 -2
@@ -332,8 +332,8 @@ bamboo_early_serial_map(void) port.irq =0 ; port.uartclk = clocks.uart0; port.regshift =0 ; - port.iotype =SERIAL_IO_MEM ; - port.flags =ASYNC_BOOT_AUTOCONF |ASYNC_SKIP_TEST ; + port.iotype =UPIO_MEM ; + port.flags =UPF_BOOT_AUTOCONF |UPF_SKIP_TEST ; port.line =0 ;if (early_serial_setup (&port) !=0 ) {
arch/ppc/platforms/4xx/bubinga.c +2 -2
@@ -97,8 +97,8 @@ bubinga_early_serial_map(void) port.irq =ACTING_UART0_INT ; port.uartclk = uart_clock; port.regshift =0 ; - port.iotype =SERIAL_IO_MEM ; - port.flags =ASYNC_BOOT_AUTOCONF |ASYNC_SKIP_TEST ; + port.iotype =UPIO_MEM ; + port.flags =UPF_BOOT_AUTOCONF |UPF_SKIP_TEST ; port.line =0 ;if (early_serial_setup (&port) !=0 ) {
arch/ppc/platforms/4xx/ebony.c +2 -2
@@ -225,8 +225,8 @@ ebony_early_serial_map(void) port.irq =0 ; port.uartclk = clocks.uart0; port.regshift =0 ; - port.iotype =SERIAL_IO_MEM ; - port.flags =ASYNC_BOOT_AUTOCONF |ASYNC_SKIP_TEST ; + port.iotype =UPIO_MEM ; + port.flags =UPF_BOOT_AUTOCONF |UPF_SKIP_TEST ; port.line =0 ;if (early_serial_setup (&port) !=0 ) {
arch/ppc/platforms/4xx/luan.c +2 -2
@@ -279,8 +279,8 @@ luan_early_serial_map(void) port.irq =UART0_INT ; port.uartclk = clocks.uart0; port.regshift =0 ; - port.iotype =SERIAL_IO_MEM ; - port.flags =ASYNC_BOOT_AUTOCONF |ASYNC_SKIP_TEST ; + port.iotype =UPIO_MEM ; + port.flags =UPF_BOOT_AUTOCONF |UPF_SKIP_TEST ; port.line =0 ;if (early_serial_setup (&port) !=0 ) {
arch/ppc/platforms/4xx/ocotea.c +2 -2
@@ -248,8 +248,8 @@ ocotea_early_serial_map(void) port.irq =UART0_INT ; port.uartclk = clocks.uart0; port.regshift =0 ; - port.iotype =SERIAL_IO_MEM ; - port.flags =ASYNC_BOOT_AUTOCONF |ASYNC_SKIP_TEST ; + port.iotype =UPIO_MEM ; + port.flags =UPF_BOOT_AUTOCONF |UPF_SKIP_TEST ; port.line =0 ;if (early_serial_setup (&port) !=0 ) {
arch/ppc/platforms/4xx/xilinx_ml300.c +2 -2
@@ -95,8 +95,8 @@ ml300_early_serial_map(void) port.irq = old_ports[i].irq; port.uartclk = old_ports[i].baud_base *16 ; port.regshift = old_ports[i].iomem_reg_shift; - port.iotype =SERIAL_IO_MEM ; - port.flags =ASYNC_BOOT_AUTOCONF |ASYNC_SKIP_TEST ; + port.iotype =UPIO_MEM ; + port.flags =UPF_BOOT_AUTOCONF |UPF_SKIP_TEST ; port.line = i;if (early_serial_setup (&port) !=0 ) {
arch/ppc/platforms/4xx/yucca.c +2 -2
@@ -305,8 +305,8 @@ yucca_early_serial_map(void) port.irq =UART0_INT ; port.uartclk = clocks.uart0; port.regshift =0 ; - port.iotype =SERIAL_IO_MEM ; - port.flags =ASYNC_BOOT_AUTOCONF |ASYNC_SKIP_TEST ; + port.iotype =UPIO_MEM ; + port.flags =UPF_BOOT_AUTOCONF |UPF_SKIP_TEST ; port.line =0 ;if (early_serial_setup (&port) !=0 ) {
arch/ppc/platforms/spruce.c +2 -2
@@ -176,8 +176,8 @@ spruce_early_serial_map(void)memset (&serial_req,0 ,sizeof (serial_req)); serial_req.uartclk = uart_clk; serial_req.irq =UART0_INT ; - serial_req.flags =ASYNC_BOOT_AUTOCONF ; - serial_req.iotype =SERIAL_IO_MEM ; + serial_req.flags =UPF_BOOT_AUTOCONF ; + serial_req.iotype =UPIO_MEM ; serial_req.membase = (u_char *)UART0_IO_BASE ; serial_req.regshift =0 ;
drivers/serial/ioc4_serial.c +0 -14
@@ -1717,11 +1717,9 @@ ioc4_change_speed(struct uart_port *the_ }if (cflag &CRTSCTS ) { - info->flags |=ASYNC_CTS_FLOW ; port->ip_sscr |=IOC4_SSCR_HFC_EN ; }else { - info->flags &= ~ASYNC_CTS_FLOW ; port->ip_sscr &= ~IOC4_SSCR_HFC_EN ; }writel (port->ip_sscr, &port->ip_serial_regs->sscr);
@@ -1760,18 +1758,6 @@ static inline int ic4_startup_local(stru info = the_port->info; -if (info->tty) { -set_bit (TTY_IO_ERROR , &info->tty->flags); -clear_bit (TTY_IO_ERROR , &info->tty->flags); -if ((info->flags &ASYNC_SPD_MASK ) ==ASYNC_SPD_HI ) - info->tty->alt_speed =57600 ; -if ((info->flags &ASYNC_SPD_MASK ) ==ASYNC_SPD_VHI ) - info->tty->alt_speed =115200 ; -if ((info->flags &ASYNC_SPD_MASK ) ==ASYNC_SPD_SHI ) - info->tty->alt_speed =230400 ; -if ((info->flags &ASYNC_SPD_MASK ) ==ASYNC_SPD_WARP ) - info->tty->alt_speed =460800 ; - }local_open (port);/* set the speed of the serial port */
drivers/serial/m32r_sio.c +1 -1
@@ -80,7 +80,7 @@#include <asm/serial.h> /* Standard COM flags */ -#define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST) +#define STD_COM_FLAGS (UPF_BOOT_AUTOCONF | UPF_SKIP_TEST)/* * SERIAL_PORT_DFNS tells us about built-in ports that have no
Ping?
Quoted 615 lines · Russell King
The
serial_corelayer has its own definitions for these, and I'd appreciate it if folk would use them instead of the old ASYNC_* and SERIAL_IO_* definitions.They're compatible
_atthemoment_but I make no guarantees that they will stay that way. Hence, it's in your interest to ensure that you're using the correct definitions.MIPS, PPC seem to be the architectures which are stuck in the past on this issue, as is the M32R SIO driver.
The
ioc4_serialdriver is worse. It assumes that it can set/clearASYNC_CTS_FLOWin theuart_infoflags field, which is private toserial_core. It also seems to setTTY_IO_ERRORfollowed by immediately clearing it (pointless), and then it writes totty->alt_speed... which isn't used by the serial layer so is also pointless.So, here's a patch to fix some of this crap up. Please test and enjoy - I certainly didn't.
arch/mips/cobalt/setup.c | 2 +- arch/mips/lasat/setup.c | 4 ++-- arch/mips/mips-boards/atlas/atlas_setup.c | 4 ++-- arch/mips/mips-boards/sead/sead_setup.c | 4 ++-- arch/mips/mips-boards/sim/sim_setup.c | 4 ++-- arch/mips/momentum/jaguar_atx/ja-console.c | 2 +- arch/mips/pmc-sierra/yosemite/setup.c | 2 +- arch/mips/sgi-ip32/ip32-setup.c | 13 ++++--------- arch/ppc/platforms/4xx/bamboo.c | 4 ++-- arch/ppc/platforms/4xx/bubinga.c | 4 ++-- arch/ppc/platforms/4xx/ebony.c | 4 ++-- arch/ppc/platforms/4xx/luan.c | 4 ++-- arch/ppc/platforms/4xx/ocotea.c | 4 ++-- arch/ppc/platforms/4xx/xilinx_ml300.c | 4 ++-- arch/ppc/platforms/4xx/yucca.c | 4 ++-- arch/ppc/platforms/spruce.c | 4 ++-- drivers/serial/ioc4_serial.c | 14 -------------- drivers/serial/m32r_sio.c | 2 +- 18 files changed, 32 insertions(+), 51 deletions(-)arch/mips/cobalt/setup.c +1
-1@@ -139,7 +139,7 @@ void __init plat_setup(void) uart.type =PORT_UNKNOWN ; uart.uartclk =18432000 ; uart.irq =COBALT_SERIAL_IRQ ; - uart.flags =STD_COM_FLAGS ; + uart.flags =UPF_BOOT_AUTOCONF |UPF_SKIP_TEST ; uart.iobase =0xc800000 ; uart.iotype =UPIO_PORT ;arch/mips/lasat/setup.c +2
-2@@ -134,8 +134,8 @@ void __init serial_init(void)memset (&s,0 ,sizeof (s)); - s.flags =STD_COM_FLAGS ; - s.iotype =SERIAL_IO_MEM ; + s.flags =UPF_BOOT_AUTOCONF |UPF_SKIP_TEST ; + s.iotype =UPIO_MEM ;if (mips_machtype ==MACH_LASAT_100 ) { s.uartclk =LASAT_BASE_BAUD_100 *16 ;arch/mips/mips-boards/atlas/atlas_setup.c +2
-2@@ -82,8 +82,8 @@ static void __init serial_init(void)#endif s.irq =ATLASINT_UART ; s.uartclk =ATLAS_BASE_BAUD *16 ; - s.flags =ASYNC_BOOT_AUTOCONF |ASYNC_SKIP_TEST |ASYNC_AUTO_IRQ ; - s.iotype =SERIAL_IO_PORT ; + s.flags =UPF_BOOT_AUTOCONF |UPF_SKIP_TEST |UPF_AUTO_IRQ ; + s.iotype =UPIO_PORT ; s.regshift =3 ;if (early_serial_setup (&s) !=0 ) {arch/mips/mips-boards/sead/sead_setup.c +2
-2@@ -71,8 +71,8 @@ static void __init serial_init(void)#endif s.irq =MIPSCPU_INT_BASE +MIPSCPU_INT_UART0 ; s.uartclk =SEAD_BASE_BAUD *16 ; - s.flags =ASYNC_BOOT_AUTOCONF |ASYNC_SKIP_TEST |ASYNC_AUTO_IRQ ; - s.iotype =0 ; + s.flags =UPF_BOOT_AUTOCONF |UPF_SKIP_TEST |UPF_AUTO_IRQ ; + s.iotype =UPIO_PORT ; s.regshift =3 ;if (early_serial_setup (&s) !=0 ) {arch/mips/mips-boards/sim/sim_setup.c +2
-2@@ -88,8 +88,8 @@ static void __init serial_init(void)but poll for now */ s.irq =0 ; s.uartclk =BASE_BAUD *16 ; - s.flags =ASYNC_BOOT_AUTOCONF |UPF_SKIP_TEST ; - s.iotype =SERIAL_IO_PORT |ASYNC_SKIP_TEST ; + s.flags =UPF_BOOT_AUTOCONF |UPF_SKIP_TEST ; + s.iotype =UPIO_PORT ; s.regshift =0 ; s.timeout =4 ;arch/mips/momentum/jaguar_atx/ja-console.c +1
-1@@ -93,7 +93,7 @@ static void inline ja_console_probe(void up.uartclk =JAGUAR_ATX_UART_CLK ; up.regshift =2 ; up.iotype =UPIO_MEM ; - up.flags =ASYNC_BOOT_AUTOCONF |ASYNC_SKIP_TEST ; + up.flags =UPF_BOOT_AUTOCONF |UPF_SKIP_TEST ; up.line =0 ;if (early_serial_setup (&up))arch/mips/pmc-sierra/yosemite/setup.c +1
-1@@ -185,7 +185,7 @@ static void __init py_uart_setup(void) up.uartclk =TITAN_UART_CLK ; up.regshift =0 ; up.iotype =UPIO_MEM ; - up.flags =ASYNC_BOOT_AUTOCONF |ASYNC_SKIP_TEST ; + up.flags =UPF_BOOT_AUTOCONF |UPF_SKIP_TEST ; up.line =0 ;if (early_serial_setup (&up))arch/mips/sgi-ip32/ip32-setup.c +4
-9@@ -66,11 +66,6 @@ static inline void str2eaddr(unsigned ch#include <linux/tty.h> #include <linux/serial.h> #include <linux/serial_core.h> -extern int early_serial_setup (struct uart_port *port); - -#define STD_COM_FLAGS (ASYNC_SKIP_TEST) -#define BASE_BAUD (1843200 / 16) -#endif /* CONFIG_SERIAL_8250 */ /* An arbitrary time; this can be decreased if reliability looks good */ @@ -110,8 +105,8 @@ void __init plat_setup(void) o2_serial[0 ].type =PORT_16550A ; o2_serial[0 ].line =0 ; o2_serial[0 ].irq =MACEISA_SERIAL1_IRQ ; - o2_serial[0 ].flags =STD_COM_FLAGS ; - o2_serial[0 ].uartclk =BASE_BAUD *16 ; + o2_serial[0 ].flags =UPF_SKIP_TEST ; + o2_serial[0 ].uartclk =1843200 ; o2_serial[0 ].iotype =UPIO_MEM ; o2_serial[0 ].membase = (char *)&mace->isa.serial1; o2_serial[0 ].fifosize =14 ;@@ -121,8 +116,8 @@ void __init plat_setup(void) o2_serial[1 ].type =PORT_16550A ; o2_serial[1 ].line =1 ; o2_serial[1 ].irq =MACEISA_SERIAL2_IRQ ; - o2_serial[1 ].flags =STD_COM_FLAGS ; - o2_serial[1 ].uartclk =BASE_BAUD *16 ; + o2_serial[1 ].flags =UPF_SKIP_TEST ; + o2_serial[1 ].uartclk =1843200 ; o2_serial[1 ].iotype =UPIO_MEM ; o2_serial[1 ].membase = (char *)&mace->isa.serial2; o2_serial[1 ].fifosize =14 ;arch/ppc/platforms/4xx/bamboo.c +2
-2@@ -332,8 +332,8 @@ bamboo_early_serial_map(void) port.irq =0 ; port.uartclk = clocks.uart0; port.regshift =0 ; - port.iotype =SERIAL_IO_MEM ; - port.flags =ASYNC_BOOT_AUTOCONF |ASYNC_SKIP_TEST ; + port.iotype =UPIO_MEM ; + port.flags =UPF_BOOT_AUTOCONF |UPF_SKIP_TEST ; port.line =0 ;if (early_serial_setup (&port) !=0 ) {arch/ppc/platforms/4xx/bubinga.c +2
-2@@ -97,8 +97,8 @@ bubinga_early_serial_map(void) port.irq =ACTING_UART0_INT ; port.uartclk = uart_clock; port.regshift =0 ; - port.iotype =SERIAL_IO_MEM ; - port.flags =ASYNC_BOOT_AUTOCONF |ASYNC_SKIP_TEST ; + port.iotype =UPIO_MEM ; + port.flags =UPF_BOOT_AUTOCONF |UPF_SKIP_TEST ; port.line =0 ;if (early_serial_setup (&port) !=0 ) {arch/ppc/platforms/4xx/ebony.c +2
-2@@ -225,8 +225,8 @@ ebony_early_serial_map(void) port.irq =0 ; port.uartclk = clocks.uart0; port.regshift =0 ; - port.iotype =SERIAL_IO_MEM ; - port.flags =ASYNC_BOOT_AUTOCONF |ASYNC_SKIP_TEST ; + port.iotype =UPIO_MEM ; + port.flags =UPF_BOOT_AUTOCONF |UPF_SKIP_TEST ; port.line =0 ;if (early_serial_setup (&port) !=0 ) {arch/ppc/platforms/4xx/luan.c +2
-2@@ -279,8 +279,8 @@ luan_early_serial_map(void) port.irq =UART0_INT ; port.uartclk = clocks.uart0; port.regshift =0 ; - port.iotype =SERIAL_IO_MEM ; - port.flags =ASYNC_BOOT_AUTOCONF |ASYNC_SKIP_TEST ; + port.iotype =UPIO_MEM ; + port.flags =UPF_BOOT_AUTOCONF |UPF_SKIP_TEST ; port.line =0 ;if (early_serial_setup (&port) !=0 ) {arch/ppc/platforms/4xx/ocotea.c +2
-2@@ -248,8 +248,8 @@ ocotea_early_serial_map(void) port.irq =UART0_INT ; port.uartclk = clocks.uart0; port.regshift =0 ; - port.iotype =SERIAL_IO_MEM ; - port.flags =ASYNC_BOOT_AUTOCONF |ASYNC_SKIP_TEST ; + port.iotype =UPIO_MEM ; + port.flags =UPF_BOOT_AUTOCONF |UPF_SKIP_TEST ; port.line =0 ;if (early_serial_setup (&port) !=0 ) {arch/ppc/platforms/4xx/xilinx_ml300.c +2
-2@@ -95,8 +95,8 @@ ml300_early_serial_map(void) port.irq = old_ports[i].irq; port.uartclk = old_ports[i].baud_base *16 ; port.regshift = old_ports[i].iomem_reg_shift; - port.iotype =SERIAL_IO_MEM ; - port.flags =ASYNC_BOOT_AUTOCONF |ASYNC_SKIP_TEST ; + port.iotype =UPIO_MEM ; + port.flags =UPF_BOOT_AUTOCONF |UPF_SKIP_TEST ; port.line = i;if (early_serial_setup (&port) !=0 ) {arch/ppc/platforms/4xx/yucca.c +2
-2@@ -305,8 +305,8 @@ yucca_early_serial_map(void) port.irq =UART0_INT ; port.uartclk = clocks.uart0; port.regshift =0 ; - port.iotype =SERIAL_IO_MEM ; - port.flags =ASYNC_BOOT_AUTOCONF |ASYNC_SKIP_TEST ; + port.iotype =UPIO_MEM ; + port.flags =UPF_BOOT_AUTOCONF |UPF_SKIP_TEST ; port.line =0 ;if (early_serial_setup (&port) !=0 ) {arch/ppc/platforms/spruce.c +2
-2@@ -176,8 +176,8 @@ spruce_early_serial_map(void)memset (&serial_req,0 ,sizeof (serial_req)); serial_req.uartclk = uart_clk; serial_req.irq =UART0_INT ; - serial_req.flags =ASYNC_BOOT_AUTOCONF ; - serial_req.iotype =SERIAL_IO_MEM ; + serial_req.flags =UPF_BOOT_AUTOCONF ; + serial_req.iotype =UPIO_MEM ; serial_req.membase = (u_char *)UART0_IO_BASE ; serial_req.regshift =0 ;drivers/serial/ioc4_serial.c +0
-14@@ -1717,11 +1717,9 @@ ioc4_change_speed(struct uart_port *the_ }if (cflag &CRTSCTS ) { - info->flags |=ASYNC_CTS_FLOW ; port->ip_sscr |=IOC4_SSCR_HFC_EN ; }else { - info->flags &= ~ASYNC_CTS_FLOW ; port->ip_sscr &= ~IOC4_SSCR_HFC_EN ; }writel (port->ip_sscr, &port->ip_serial_regs->sscr);@@ -1760,18 +1758,6 @@ static inline int ic4_startup_local(stru info = the_port->info; -if (info->tty) { -set_bit (TTY_IO_ERROR , &info->tty->flags); -clear_bit (TTY_IO_ERROR , &info->tty->flags); -if ((info->flags &ASYNC_SPD_MASK ) ==ASYNC_SPD_HI ) - info->tty->alt_speed =57600 ; -if ((info->flags &ASYNC_SPD_MASK ) ==ASYNC_SPD_VHI ) - info->tty->alt_speed =115200 ; -if ((info->flags &ASYNC_SPD_MASK ) ==ASYNC_SPD_SHI ) - info->tty->alt_speed =230400 ; -if ((info->flags &ASYNC_SPD_MASK ) ==ASYNC_SPD_WARP ) - info->tty->alt_speed =460800 ; - }local_open (port);/* set the speed of the serial port */ drivers/serial/m32r_sio.c +1
-1@@ -80,7 +80,7 @@#include <asm/serial.h> /* Standard COM flags */ -#define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST) +#define STD_COM_FLAGS (UPF_BOOT_AUTOCONF | UPF_SKIP_TEST)/* * SERIAL_PORT_DFNS tells us about built-in ports that have no arch/mips/cobalt/setup.c +1
-1@@ -139,7 +139,7 @@ void __init plat_setup(void) uart.type =PORT_UNKNOWN ; uart.uartclk =18432000 ; uart.irq =COBALT_SERIAL_IRQ ; - uart.flags =STD_COM_FLAGS ; + uart.flags =UPF_BOOT_AUTOCONF |UPF_SKIP_TEST ; uart.iobase =0xc800000 ; uart.iotype =UPIO_PORT ;arch/mips/lasat/setup.c +2
-2@@ -134,8 +134,8 @@ void __init serial_init(void)memset (&s,0 ,sizeof (s)); - s.flags =STD_COM_FLAGS ; - s.iotype =SERIAL_IO_MEM ; + s.flags =UPF_BOOT_AUTOCONF |UPF_SKIP_TEST ; + s.iotype =UPIO_MEM ;if (mips_machtype ==MACH_LASAT_100 ) { s.uartclk =LASAT_BASE_BAUD_100 *16 ;arch/mips/mips-boards/atlas/atlas_setup.c +2
-2@@ -82,8 +82,8 @@ static void __init serial_init(void)#endif s.irq =ATLASINT_UART ; s.uartclk =ATLAS_BASE_BAUD *16 ; - s.flags =ASYNC_BOOT_AUTOCONF |ASYNC_SKIP_TEST |ASYNC_AUTO_IRQ ; - s.iotype =SERIAL_IO_PORT ; + s.flags =UPF_BOOT_AUTOCONF |UPF_SKIP_TEST |UPF_AUTO_IRQ ; + s.iotype =UPIO_PORT ; s.regshift =3 ;if (early_serial_setup (&s) !=0 ) {arch/mips/mips-boards/sead/sead_setup.c +2
-2@@ -71,8 +71,8 @@ static void __init serial_init(void)#endif s.irq =MIPSCPU_INT_BASE +MIPSCPU_INT_UART0 ; s.uartclk =SEAD_BASE_BAUD *16 ; - s.flags =ASYNC_BOOT_AUTOCONF |ASYNC_SKIP_TEST |ASYNC_AUTO_IRQ ; - s.iotype =0 ; + s.flags =UPF_BOOT_AUTOCONF |UPF_SKIP_TEST |UPF_AUTO_IRQ ; + s.iotype =UPIO_PORT ; s.regshift =3 ;if (early_serial_setup (&s) !=0 ) {arch/mips/mips-boards/sim/sim_setup.c +2
-2@@ -88,8 +88,8 @@ static void __init serial_init(void)but poll for now */ s.irq =0 ; s.uartclk =BASE_BAUD *16 ; - s.flags =ASYNC_BOOT_AUTOCONF |UPF_SKIP_TEST ; - s.iotype =SERIAL_IO_PORT |ASYNC_SKIP_TEST ; + s.flags =UPF_BOOT_AUTOCONF |UPF_SKIP_TEST ; + s.iotype =UPIO_PORT ; s.regshift =0 ; s.timeout =4 ;arch/mips/momentum/jaguar_atx/ja-console.c +1
-1@@ -93,7 +93,7 @@ static void inline ja_console_probe(void up.uartclk =JAGUAR_ATX_UART_CLK ; up.regshift =2 ; up.iotype =UPIO_MEM ; - up.flags =ASYNC_BOOT_AUTOCONF |ASYNC_SKIP_TEST ; + up.flags =UPF_BOOT_AUTOCONF |UPF_SKIP_TEST ; up.line =0 ;if (early_serial_setup (&up))arch/mips/pmc-sierra/yosemite/setup.c +1
-1@@ -185,7 +185,7 @@ static void __init py_uart_setup(void) up.uartclk =TITAN_UART_CLK ; up.regshift =0 ; up.iotype =UPIO_MEM ; - up.flags =ASYNC_BOOT_AUTOCONF |ASYNC_SKIP_TEST ; + up.flags =UPF_BOOT_AUTOCONF |UPF_SKIP_TEST ; up.line =0 ;if (early_serial_setup (&up))arch/mips/sgi-ip32/ip32-setup.c +4
-9@@ -66,11 +66,6 @@ static inline void str2eaddr(unsigned ch#include <linux/tty.h> #include <linux/serial.h> #include <linux/serial_core.h> -extern int early_serial_setup (struct uart_port *port); - -#define STD_COM_FLAGS (ASYNC_SKIP_TEST) -#define BASE_BAUD (1843200 / 16) -#endif /* CONFIG_SERIAL_8250 */ /* An arbitrary time; this can be decreased if reliability looks good */ @@ -110,8 +105,8 @@ void __init plat_setup(void) o2_serial[0 ].type =PORT_16550A ; o2_serial[0 ].line =0 ; o2_serial[0 ].irq =MACEISA_SERIAL1_IRQ ; - o2_serial[0 ].flags =STD_COM_FLAGS ; - o2_serial[0 ].uartclk =BASE_BAUD *16 ; + o2_serial[0 ].flags =UPF_SKIP_TEST ; + o2_serial[0 ].uartclk =1843200 ; o2_serial[0 ].iotype =UPIO_MEM ; o2_serial[0 ].membase = (char *)&mace->isa.serial1; o2_serial[0 ].fifosize =14 ;@@ -121,8 +116,8 @@ void __init plat_setup(void) o2_serial[1 ].type =PORT_16550A ; o2_serial[1 ].line =1 ; o2_serial[1 ].irq =MACEISA_SERIAL2_IRQ ; - o2_serial[1 ].flags =STD_COM_FLAGS ; - o2_serial[1 ].uartclk =BASE_BAUD *16 ; + o2_serial[1 ].flags =UPF_SKIP_TEST ; + o2_serial[1 ].uartclk =1843200 ; o2_serial[1 ].iotype =UPIO_MEM ; o2_serial[1 ].membase = (char *)&mace->isa.serial2; o2_serial[1 ].fifosize =14 ;arch/ppc/platforms/4xx/bamboo.c +2
-2@@ -332,8 +332,8 @@ bamboo_early_serial_map(void) port.irq =0 ; port.uartclk = clocks.uart0; port.regshift =0 ; - port.iotype =SERIAL_IO_MEM ; - port.flags =ASYNC_BOOT_AUTOCONF |ASYNC_SKIP_TEST ; + port.iotype =UPIO_MEM ; + port.flags =UPF_BOOT_AUTOCONF |UPF_SKIP_TEST ; port.line =0 ;if (early_serial_setup (&port) !=0 ) {arch/ppc/platforms/4xx/bubinga.c +2
-2@@ -97,8 +97,8 @@ bubinga_early_serial_map(void) port.irq =ACTING_UART0_INT ; port.uartclk = uart_clock; port.regshift =0 ; - port.iotype =SERIAL_IO_MEM ; - port.flags =ASYNC_BOOT_AUTOCONF |ASYNC_SKIP_TEST ; + port.iotype =UPIO_MEM ; + port.flags =UPF_BOOT_AUTOCONF |UPF_SKIP_TEST ; port.line =0 ;if (early_serial_setup (&port) !=0 ) {arch/ppc/platforms/4xx/ebony.c +2
-2@@ -225,8 +225,8 @@ ebony_early_serial_map(void) port.irq =0 ; port.uartclk = clocks.uart0; port.regshift =0 ; - port.iotype =SERIAL_IO_MEM ; - port.flags =ASYNC_BOOT_AUTOCONF |ASYNC_SKIP_TEST ; + port.iotype =UPIO_MEM ; + port.flags =UPF_BOOT_AUTOCONF |UPF_SKIP_TEST ; port.line =0 ;if (early_serial_setup (&port) !=0 ) {arch/ppc/platforms/4xx/luan.c +2
-2@@ -279,8 +279,8 @@ luan_early_serial_map(void) port.irq =UART0_INT ; port.uartclk = clocks.uart0; port.regshift =0 ; - port.iotype =SERIAL_IO_MEM ; - port.flags =ASYNC_BOOT_AUTOCONF |ASYNC_SKIP_TEST ; + port.iotype =UPIO_MEM ; + port.flags =UPF_BOOT_AUTOCONF |UPF_SKIP_TEST ; port.line =0 ;if (early_serial_setup (&port) !=0 ) {arch/ppc/platforms/4xx/ocotea.c +2
-2@@ -248,8 +248,8 @@ ocotea_early_serial_map(void) port.irq =UART0_INT ; port.uartclk = clocks.uart0; port.regshift =0 ; - port.iotype =SERIAL_IO_MEM ; - port.flags =ASYNC_BOOT_AUTOCONF |ASYNC_SKIP_TEST ; + port.iotype =UPIO_MEM ; + port.flags =UPF_BOOT_AUTOCONF |UPF_SKIP_TEST ; port.line =0 ;if (early_serial_setup (&port) !=0 ) {arch/ppc/platforms/4xx/xilinx_ml300.c +2
-2@@ -95,8 +95,8 @@ ml300_early_serial_map(void) port.irq = old_ports[i].irq; port.uartclk = old_ports[i].baud_base *16 ; port.regshift = old_ports[i].iomem_reg_shift; - port.iotype =SERIAL_IO_MEM ; - port.flags =ASYNC_BOOT_AUTOCONF |ASYNC_SKIP_TEST ; + port.iotype =UPIO_MEM ; + port.flags =UPF_BOOT_AUTOCONF |UPF_SKIP_TEST ; port.line = i;if (early_serial_setup (&port) !=0 ) {arch/ppc/platforms/4xx/yucca.c +2
-2@@ -305,8 +305,8 @@ yucca_early_serial_map(void) port.irq =UART0_INT ; port.uartclk = clocks.uart0; port.regshift =0 ; - port.iotype =SERIAL_IO_MEM ; - port.flags =ASYNC_BOOT_AUTOCONF |ASYNC_SKIP_TEST ; + port.iotype =UPIO_MEM ; + port.flags =UPF_BOOT_AUTOCONF |UPF_SKIP_TEST ; port.line =0 ;if (early_serial_setup (&port) !=0 ) {arch/ppc/platforms/spruce.c +2
-2@@ -176,8 +176,8 @@ spruce_early_serial_map(void)memset (&serial_req,0 ,sizeof (serial_req)); serial_req.uartclk = uart_clk; serial_req.irq =UART0_INT ; - serial_req.flags =ASYNC_BOOT_AUTOCONF ; - serial_req.iotype =SERIAL_IO_MEM ; + serial_req.flags =UPF_BOOT_AUTOCONF ; + serial_req.iotype =UPIO_MEM ; serial_req.membase = (u_char *)UART0_IO_BASE ; serial_req.regshift =0 ;drivers/serial/ioc4_serial.c +0
-14@@ -1717,11 +1717,9 @@ ioc4_change_speed(struct uart_port *the_ }if (cflag &CRTSCTS ) { - info->flags |=ASYNC_CTS_FLOW ; port->ip_sscr |=IOC4_SSCR_HFC_EN ; }else { - info->flags &= ~ASYNC_CTS_FLOW ; port->ip_sscr &= ~IOC4_SSCR_HFC_EN ; }writel (port->ip_sscr, &port->ip_serial_regs->sscr);@@ -1760,18 +1758,6 @@ static inline int ic4_startup_local(stru info = the_port->info; -if (info->tty) { -set_bit (TTY_IO_ERROR , &info->tty->flags); -clear_bit (TTY_IO_ERROR , &info->tty->flags); -if ((info->flags &ASYNC_SPD_MASK ) ==ASYNC_SPD_HI ) - info->tty->alt_speed =57600 ; -if ((info->flags &ASYNC_SPD_MASK ) ==ASYNC_SPD_VHI ) - info->tty->alt_speed =115200 ; -if ((info->flags &ASYNC_SPD_MASK ) ==ASYNC_SPD_SHI ) - info->tty->alt_speed =230400 ; -if ((info->flags &ASYNC_SPD_MASK ) ==ASYNC_SPD_WARP ) - info->tty->alt_speed =460800 ; - }local_open (port);/* set the speed of the serial port */ drivers/serial/m32r_sio.c +1
-1@@ -80,7 +80,7 @@#include <asm/serial.h> /* Standard COM flags */ -#define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST) +#define STD_COM_FLAGS (UPF_BOOT_AUTOCONF | UPF_SKIP_TEST)/* * SERIAL_PORT_DFNS tells us about built-in ports that have no
Signature · 3 lines
Russell King Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/ maintainer of: 2.6 Serial core
On m32r,
compile and boot test: OK
Thank you.
-- Takata
From: Russell King <[email protected]>
Date: Thu, 02 Feb 2006 10:27:21 +0000
Quoted 22 lines
Ping?
Quoted 19 lines · Russell King
The
serial_corelayer has its own definitions for these, and I'd appreciate it if folk would use them instead of the old ASYNC_* and SERIAL_IO_* definitions.They're compatible
_atthemoment_but I make no guarantees that they will stay that way. Hence, it's in your interest to ensure that you're using the correct definitions.MIPS, PPC seem to be the architectures which are stuck in the past on this issue, as is the M32R SIO driver.
The
ioc4_serialdriver is worse. It assumes that it can set/clearASYNC_CTS_FLOWin theuart_infoflags field, which is private toserial_core. It also seems to setTTY_IO_ERRORfollowed by immediately clearing it (pointless), and then it writes totty->alt_speed... which isn't used by the serial layer so is also pointless.So, here's a patch to fix some of this crap up. Please test and enjoy - I certainly didn't.
...
Quoted 2 lines
Quoted 2 lines
drivers/serial/m32r_sio.c | 2 +- 18 files changed, 32 insertions(+), 51 deletions(-)
...
Quoted 19 lines
Quoted 13 lines
+++
b/arch/mips/cobalt/setup.cdrivers/serial/m32r_sio.c +1
-1@@ -80,7 +80,7 @@#include <asm/serial.h> /* Standard COM flags */ -#define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST) +#define STD_COM_FLAGS (UPF_BOOT_AUTOCONF | UPF_SKIP_TEST)/* * SERIAL_PORT_DFNS tells us about built-in ports that have no Signature · 3 lines
Russell King Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/ maintainer of: 2.6 Serial core
Quoted 2 lines · Hirokazu Takata
On m32r,
compile and boot test: OK
Is that an Acked-by ?
Signature · 3 lines
Russell King Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/ maintainer of: 2.6 Serial core
Hirokazu Takata
Acked-byFrom: Russell King <[email protected]>
Subject: Re: [CFT] Don't use ASYNC_* nor SERIAL_IO_* with serial_core
Date: Sun, 05 Feb 2006 00:01:36 +0000
Quoted 11 lines · Hirokazu Takata
Quoted 2 lines
On m32r,
compile and boot test: OKIs that an Acked-by ?
Signature · 3 lines
Russell King Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/ maintainer of: 2.6 Serial core
Yes.
Thanks,
--
Hirokazu Takata <[email protected]>
Linux/M32R Project: http://www.linux-m32r.org/
Quoted 5 lines · Russell King
The
ioc4_serialdriver is worse. It assumes that it can set/clearASYNC_CTS_FLOWin theuart_infoflags field, which is private toserial_core. It also seems to setTTY_IO_ERRORfollowed by immediately clearing it (pointless), and then it writes totty->alt_speed... which isn't used by the serial layer so is also pointless.
Okay, the only remaining part of this patch which hasn't been applied is this - can anyone ack it?
drivers/serial/ioc4_serial.c +0 -14
@@ -1717,11 +1717,9 @@ ioc4_change_speed(struct uart_port *the_ }if (cflag &CRTSCTS ) { - info->flags |=ASYNC_CTS_FLOW ; port->ip_sscr |=IOC4_SSCR_HFC_EN ; }else { - info->flags &= ~ASYNC_CTS_FLOW ; port->ip_sscr &= ~IOC4_SSCR_HFC_EN ; }writel (port->ip_sscr, &port->ip_serial_regs->sscr);
@@ -1760,18 +1758,6 @@ static inline int ic4_startup_local(stru info = the_port->info; -if (info->tty) { -set_bit (TTY_IO_ERROR , &info->tty->flags); -clear_bit (TTY_IO_ERROR , &info->tty->flags); -if ((info->flags &ASYNC_SPD_MASK ) ==ASYNC_SPD_HI ) - info->tty->alt_speed =57600 ; -if ((info->flags &ASYNC_SPD_MASK ) ==ASYNC_SPD_VHI ) - info->tty->alt_speed =115200 ; -if ((info->flags &ASYNC_SPD_MASK ) ==ASYNC_SPD_SHI ) - info->tty->alt_speed =230400 ; -if ((info->flags &ASYNC_SPD_MASK ) ==ASYNC_SPD_WARP ) - info->tty->alt_speed =460800 ; - }local_open (port);/* set the speed of the serial port */
Signature · 3 lines
Russell King Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/ maintainer of: 2.6 Serial core
Pat Gefre
Acked-byYeah this is something I should've fixed up... thanks
Quoted 44 lines · Russell King
Quoted 5 lines · Russell King
The
ioc4_serialdriver is worse. It assumes that it can set/clearASYNC_CTS_FLOWin theuart_infoflags field, which is private toserial_core. It also seems to setTTY_IO_ERRORfollowed by immediately clearing it (pointless), and then it writes totty->alt_speed... which isn't used by the serial layer so is also pointless.Okay, the only remaining part of this patch which hasn't been applied is this - can anyone ack it?
drivers/serial/ioc4_serial.c +0
-14@@ -1717,11 +1717,9 @@ ioc4_change_speed(struct uart_port *the_ }if (cflag &CRTSCTS ) { - info->flags |=ASYNC_CTS_FLOW ; port->ip_sscr |=IOC4_SSCR_HFC_EN ; }else { - info->flags &= ~ASYNC_CTS_FLOW ; port->ip_sscr &= ~IOC4_SSCR_HFC_EN ; }writel (port->ip_sscr, &port->ip_serial_regs->sscr);@@ -1760,18 +1758,6 @@ static inline int ic4_startup_local(stru info = the_port->info; -if (info->tty) { -set_bit (TTY_IO_ERROR , &info->tty->flags); -clear_bit (TTY_IO_ERROR , &info->tty->flags); -if ((info->flags &ASYNC_SPD_MASK ) ==ASYNC_SPD_HI ) - info->tty->alt_speed =57600 ; -if ((info->flags &ASYNC_SPD_MASK ) ==ASYNC_SPD_VHI ) - info->tty->alt_speed =115200 ; -if ((info->flags &ASYNC_SPD_MASK ) ==ASYNC_SPD_SHI ) - info->tty->alt_speed =230400 ; -if ((info->flags &ASYNC_SPD_MASK ) ==ASYNC_SPD_WARP ) - info->tty->alt_speed =460800 ; - }local_open (port);/* set the speed of the serial port */
Russell King
AppliedQuoted 3 lines · Pat Gefre
Yeah this is something I should've fixed up... thanks
Acked-by [email protected]
Thanks, applied.
Signature · 3 lines
Russell King Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/ maintainer of: 2.6 Serial core