diff options
Diffstat (limited to 'drivers/serial')
| -rw-r--r-- | drivers/serial/68328serial.c | 9 | ||||
| -rw-r--r-- | drivers/serial/68360serial.c | 9 | ||||
| -rw-r--r-- | drivers/serial/icom.h | 2 | ||||
| -rw-r--r-- | drivers/serial/mpsc.c | 8 | ||||
| -rw-r--r-- | drivers/serial/sunzilog.c | 8 |
5 files changed, 16 insertions, 20 deletions
diff --git a/drivers/serial/68328serial.c b/drivers/serial/68328serial.c index db92a0ceda79..feb8e73fc1c9 100644 --- a/drivers/serial/68328serial.c +++ b/drivers/serial/68328serial.c | |||
| @@ -992,18 +992,17 @@ static int get_lsr_info(struct m68k_serial * info, unsigned int *value) | |||
| 992 | /* | 992 | /* |
| 993 | * This routine sends a break character out the serial port. | 993 | * This routine sends a break character out the serial port. |
| 994 | */ | 994 | */ |
| 995 | static void send_break( struct m68k_serial * info, int duration) | 995 | static void send_break(struct m68k_serial * info, unsigned int duration) |
| 996 | { | 996 | { |
| 997 | m68328_uart *uart = &uart_addr[info->line]; | 997 | m68328_uart *uart = &uart_addr[info->line]; |
| 998 | unsigned long flags; | 998 | unsigned long flags; |
| 999 | if (!info->port) | 999 | if (!info->port) |
| 1000 | return; | 1000 | return; |
| 1001 | set_current_state(TASK_INTERRUPTIBLE); | ||
| 1002 | save_flags(flags); | 1001 | save_flags(flags); |
| 1003 | cli(); | 1002 | cli(); |
| 1004 | #ifdef USE_INTS | 1003 | #ifdef USE_INTS |
| 1005 | uart->utx.w |= UTX_SEND_BREAK; | 1004 | uart->utx.w |= UTX_SEND_BREAK; |
| 1006 | schedule_timeout(duration); | 1005 | msleep_interruptible(duration); |
| 1007 | uart->utx.w &= ~UTX_SEND_BREAK; | 1006 | uart->utx.w &= ~UTX_SEND_BREAK; |
| 1008 | #endif | 1007 | #endif |
| 1009 | restore_flags(flags); | 1008 | restore_flags(flags); |
| @@ -1033,14 +1032,14 @@ static int rs_ioctl(struct tty_struct *tty, struct file * file, | |||
| 1033 | return retval; | 1032 | return retval; |
| 1034 | tty_wait_until_sent(tty, 0); | 1033 | tty_wait_until_sent(tty, 0); |
| 1035 | if (!arg) | 1034 | if (!arg) |
| 1036 | send_break(info, HZ/4); /* 1/4 second */ | 1035 | send_break(info, 250); /* 1/4 second */ |
| 1037 | return 0; | 1036 | return 0; |
| 1038 | case TCSBRKP: /* support for POSIX tcsendbreak() */ | 1037 | case TCSBRKP: /* support for POSIX tcsendbreak() */ |
| 1039 | retval = tty_check_change(tty); | 1038 | retval = tty_check_change(tty); |
| 1040 | if (retval) | 1039 | if (retval) |
| 1041 | return retval; | 1040 | return retval; |
| 1042 | tty_wait_until_sent(tty, 0); | 1041 | tty_wait_until_sent(tty, 0); |
| 1043 | send_break(info, arg ? arg*(HZ/10) : HZ/4); | 1042 | send_break(info, arg ? arg*(100) : 250); |
| 1044 | return 0; | 1043 | return 0; |
| 1045 | case TIOCGSOFTCAR: | 1044 | case TIOCGSOFTCAR: |
| 1046 | error = put_user(C_CLOCAL(tty) ? 1 : 0, | 1045 | error = put_user(C_CLOCAL(tty) ? 1 : 0, |
diff --git a/drivers/serial/68360serial.c b/drivers/serial/68360serial.c index f148022b6b4e..b116122e569a 100644 --- a/drivers/serial/68360serial.c +++ b/drivers/serial/68360serial.c | |||
| @@ -1394,14 +1394,13 @@ static void end_break(ser_info_t *info) | |||
| 1394 | /* | 1394 | /* |
| 1395 | * This routine sends a break character out the serial port. | 1395 | * This routine sends a break character out the serial port. |
| 1396 | */ | 1396 | */ |
| 1397 | static void send_break(ser_info_t *info, int duration) | 1397 | static void send_break(ser_info_t *info, unsigned int duration) |
| 1398 | { | 1398 | { |
| 1399 | set_current_state(TASK_INTERRUPTIBLE); | ||
| 1400 | #ifdef SERIAL_DEBUG_SEND_BREAK | 1399 | #ifdef SERIAL_DEBUG_SEND_BREAK |
| 1401 | printk("rs_send_break(%d) jiff=%lu...", duration, jiffies); | 1400 | printk("rs_send_break(%d) jiff=%lu...", duration, jiffies); |
| 1402 | #endif | 1401 | #endif |
| 1403 | begin_break(info); | 1402 | begin_break(info); |
| 1404 | schedule_timeout(duration); | 1403 | msleep_interruptible(duration); |
| 1405 | end_break(info); | 1404 | end_break(info); |
| 1406 | #ifdef SERIAL_DEBUG_SEND_BREAK | 1405 | #ifdef SERIAL_DEBUG_SEND_BREAK |
| 1407 | printk("done jiffies=%lu\n", jiffies); | 1406 | printk("done jiffies=%lu\n", jiffies); |
| @@ -1436,7 +1435,7 @@ static int rs_360_ioctl(struct tty_struct *tty, struct file * file, | |||
| 1436 | if (signal_pending(current)) | 1435 | if (signal_pending(current)) |
| 1437 | return -EINTR; | 1436 | return -EINTR; |
| 1438 | if (!arg) { | 1437 | if (!arg) { |
| 1439 | send_break(info, HZ/4); /* 1/4 second */ | 1438 | send_break(info, 250); /* 1/4 second */ |
| 1440 | if (signal_pending(current)) | 1439 | if (signal_pending(current)) |
| 1441 | return -EINTR; | 1440 | return -EINTR; |
| 1442 | } | 1441 | } |
| @@ -1448,7 +1447,7 @@ static int rs_360_ioctl(struct tty_struct *tty, struct file * file, | |||
| 1448 | tty_wait_until_sent(tty, 0); | 1447 | tty_wait_until_sent(tty, 0); |
| 1449 | if (signal_pending(current)) | 1448 | if (signal_pending(current)) |
| 1450 | return -EINTR; | 1449 | return -EINTR; |
| 1451 | send_break(info, arg ? arg*(HZ/10) : HZ/4); | 1450 | send_break(info, arg ? arg*100 : 250); |
| 1452 | if (signal_pending(current)) | 1451 | if (signal_pending(current)) |
| 1453 | return -EINTR; | 1452 | return -EINTR; |
| 1454 | return 0; | 1453 | return 0; |
diff --git a/drivers/serial/icom.h b/drivers/serial/icom.h index 23dc0f7ddf8b..798f1ef23712 100644 --- a/drivers/serial/icom.h +++ b/drivers/serial/icom.h | |||
| @@ -286,5 +286,3 @@ struct lookup_int_table { | |||
| 286 | u32 __iomem *global_int_mask; | 286 | u32 __iomem *global_int_mask; |
| 287 | unsigned long processor_id; | 287 | unsigned long processor_id; |
| 288 | }; | 288 | }; |
| 289 | |||
| 290 | #define MSECS_TO_JIFFIES(ms) (((ms)*HZ+999)/1000) | ||
diff --git a/drivers/serial/mpsc.c b/drivers/serial/mpsc.c index a8314aee2ab8..a2a643318002 100644 --- a/drivers/serial/mpsc.c +++ b/drivers/serial/mpsc.c | |||
| @@ -67,7 +67,11 @@ | |||
| 67 | 67 | ||
| 68 | static struct mpsc_port_info mpsc_ports[MPSC_NUM_CTLRS]; | 68 | static struct mpsc_port_info mpsc_ports[MPSC_NUM_CTLRS]; |
| 69 | static struct mpsc_shared_regs mpsc_shared_regs; | 69 | static struct mpsc_shared_regs mpsc_shared_regs; |
| 70 | static struct uart_driver mpsc_reg; | ||
| 70 | 71 | ||
| 72 | static void mpsc_start_rx(struct mpsc_port_info *pi); | ||
| 73 | static void mpsc_free_ring_mem(struct mpsc_port_info *pi); | ||
| 74 | static void mpsc_release_port(struct uart_port *port); | ||
| 71 | /* | 75 | /* |
| 72 | ****************************************************************************** | 76 | ****************************************************************************** |
| 73 | * | 77 | * |
| @@ -546,7 +550,6 @@ static int | |||
| 546 | mpsc_alloc_ring_mem(struct mpsc_port_info *pi) | 550 | mpsc_alloc_ring_mem(struct mpsc_port_info *pi) |
| 547 | { | 551 | { |
| 548 | int rc = 0; | 552 | int rc = 0; |
| 549 | static void mpsc_free_ring_mem(struct mpsc_port_info *pi); | ||
| 550 | 553 | ||
| 551 | pr_debug("mpsc_alloc_ring_mem[%d]: Allocating ring mem\n", | 554 | pr_debug("mpsc_alloc_ring_mem[%d]: Allocating ring mem\n", |
| 552 | pi->port.line); | 555 | pi->port.line); |
| @@ -745,7 +748,6 @@ mpsc_rx_intr(struct mpsc_port_info *pi, struct pt_regs *regs) | |||
| 745 | int rc = 0; | 748 | int rc = 0; |
| 746 | u8 *bp; | 749 | u8 *bp; |
| 747 | char flag = TTY_NORMAL; | 750 | char flag = TTY_NORMAL; |
| 748 | static void mpsc_start_rx(struct mpsc_port_info *pi); | ||
| 749 | 751 | ||
| 750 | pr_debug("mpsc_rx_intr[%d]: Handling Rx intr\n", pi->port.line); | 752 | pr_debug("mpsc_rx_intr[%d]: Handling Rx intr\n", pi->port.line); |
| 751 | 753 | ||
| @@ -1178,7 +1180,6 @@ static void | |||
| 1178 | mpsc_shutdown(struct uart_port *port) | 1180 | mpsc_shutdown(struct uart_port *port) |
| 1179 | { | 1181 | { |
| 1180 | struct mpsc_port_info *pi = (struct mpsc_port_info *)port; | 1182 | struct mpsc_port_info *pi = (struct mpsc_port_info *)port; |
| 1181 | static void mpsc_release_port(struct uart_port *port); | ||
| 1182 | 1183 | ||
| 1183 | pr_debug("mpsc_shutdown[%d]: Shutting down MPSC\n", port->line); | 1184 | pr_debug("mpsc_shutdown[%d]: Shutting down MPSC\n", port->line); |
| 1184 | 1185 | ||
| @@ -1448,7 +1449,6 @@ mpsc_console_setup(struct console *co, char *options) | |||
| 1448 | return uart_set_options(&pi->port, co, baud, parity, bits, flow); | 1449 | return uart_set_options(&pi->port, co, baud, parity, bits, flow); |
| 1449 | } | 1450 | } |
| 1450 | 1451 | ||
| 1451 | extern struct uart_driver mpsc_reg; | ||
| 1452 | static struct console mpsc_console = { | 1452 | static struct console mpsc_console = { |
| 1453 | .name = MPSC_DEV_NAME, | 1453 | .name = MPSC_DEV_NAME, |
| 1454 | .write = mpsc_console_write, | 1454 | .write = mpsc_console_write, |
diff --git a/drivers/serial/sunzilog.c b/drivers/serial/sunzilog.c index 5c4231ae295b..8e65206d3d76 100644 --- a/drivers/serial/sunzilog.c +++ b/drivers/serial/sunzilog.c | |||
| @@ -1071,7 +1071,7 @@ static void __init sunzilog_alloc_tables(void) | |||
| 1071 | */ | 1071 | */ |
| 1072 | static struct zilog_layout __iomem * __init get_zs_sun4u(int chip, int zsnode) | 1072 | static struct zilog_layout __iomem * __init get_zs_sun4u(int chip, int zsnode) |
| 1073 | { | 1073 | { |
| 1074 | unsigned long mapped_addr; | 1074 | void __iomem *mapped_addr; |
| 1075 | unsigned int sun4u_ino; | 1075 | unsigned int sun4u_ino; |
| 1076 | struct sbus_bus *sbus = NULL; | 1076 | struct sbus_bus *sbus = NULL; |
| 1077 | struct sbus_dev *sdev = NULL; | 1077 | struct sbus_dev *sdev = NULL; |
| @@ -1111,9 +1111,9 @@ static struct zilog_layout __iomem * __init get_zs_sun4u(int chip, int zsnode) | |||
| 1111 | apply_fhc_ranges(central_bus->child, | 1111 | apply_fhc_ranges(central_bus->child, |
| 1112 | &zsregs[0], 1); | 1112 | &zsregs[0], 1); |
| 1113 | apply_central_ranges(central_bus, &zsregs[0], 1); | 1113 | apply_central_ranges(central_bus, &zsregs[0], 1); |
| 1114 | mapped_addr = | 1114 | mapped_addr = (void __iomem *) |
| 1115 | (((u64)zsregs[0].which_io)<<32UL) | | 1115 | ((((u64)zsregs[0].which_io)<<32UL) | |
| 1116 | ((u64)zsregs[0].phys_addr); | 1116 | ((u64)zsregs[0].phys_addr)); |
| 1117 | } | 1117 | } |
| 1118 | 1118 | ||
| 1119 | if (zilog_irq == -1) { | 1119 | if (zilog_irq == -1) { |
