projects
/
deliverable
/
linux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[PATCH] tty: switch to ktermios
[deliverable/linux.git]
/
drivers
/
serial
/
sunsab.c
diff --git
a/drivers/serial/sunsab.c
b/drivers/serial/sunsab.c
index 20a48697727c489bd68893fa74463ae7ba3c909a..493d5bbb661be7daacc3e3f11aca47c32932811f 100644
(file)
--- a/
drivers/serial/sunsab.c
+++ b/
drivers/serial/sunsab.c
@@
-108,8
+108,7
@@
static __inline__ void sunsab_cec_wait(struct uart_sunsab_port *up)
static struct tty_struct *
receive_chars(struct uart_sunsab_port *up,
static struct tty_struct *
receive_chars(struct uart_sunsab_port *up,
- union sab82532_irq_status *stat,
- struct pt_regs *regs)
+ union sab82532_irq_status *stat)
{
struct tty_struct *tty = NULL;
unsigned char buf[32];
{
struct tty_struct *tty = NULL;
unsigned char buf[32];
@@
-161,7
+160,7
@@
receive_chars(struct uart_sunsab_port *up,
unsigned char ch = buf[i], flag;
if (tty == NULL) {
unsigned char ch = buf[i], flag;
if (tty == NULL) {
- uart_handle_sysrq_char(&up->port, ch
, regs
);
+ uart_handle_sysrq_char(&up->port, ch);
continue;
}
continue;
}
@@
-208,7
+207,7
@@
receive_chars(struct uart_sunsab_port *up,
flag = TTY_FRAME;
}
flag = TTY_FRAME;
}
- if (uart_handle_sysrq_char(&up->port, ch
, regs
))
+ if (uart_handle_sysrq_char(&up->port, ch))
continue;
if ((stat->sreg.isr0 & (up->port.ignore_status_mask & 0xff)) == 0 &&
continue;
if ((stat->sreg.isr0 & (up->port.ignore_status_mask & 0xff)) == 0 &&
@@
-301,7
+300,7
@@
static void check_status(struct uart_sunsab_port *up,
wake_up_interruptible(&up->port.info->delta_msr_wait);
}
wake_up_interruptible(&up->port.info->delta_msr_wait);
}
-static irqreturn_t sunsab_interrupt(int irq, void *dev_id
, struct pt_regs *regs
)
+static irqreturn_t sunsab_interrupt(int irq, void *dev_id)
{
struct uart_sunsab_port *up = dev_id;
struct tty_struct *tty;
{
struct uart_sunsab_port *up = dev_id;
struct tty_struct *tty;
@@
-321,7
+320,7
@@
static irqreturn_t sunsab_interrupt(int irq, void *dev_id, struct pt_regs *regs)
if ((status.sreg.isr0 & (SAB82532_ISR0_TCD | SAB82532_ISR0_TIME |
SAB82532_ISR0_RFO | SAB82532_ISR0_RPF)) ||
(status.sreg.isr1 & SAB82532_ISR1_BRK))
if ((status.sreg.isr0 & (SAB82532_ISR0_TCD | SAB82532_ISR0_TIME |
SAB82532_ISR0_RFO | SAB82532_ISR0_RPF)) ||
(status.sreg.isr1 & SAB82532_ISR1_BRK))
- tty = receive_chars(up, &status
, regs
);
+ tty = receive_chars(up, &status);
if ((status.sreg.isr0 & SAB82532_ISR0_CDSC) ||
(status.sreg.isr1 & SAB82532_ISR1_CSC))
check_status(up, &status);
if ((status.sreg.isr0 & SAB82532_ISR0_CDSC) ||
(status.sreg.isr1 & SAB82532_ISR1_CSC))
check_status(up, &status);
@@
-350,7
+349,7
@@
static irqreturn_t sunsab_interrupt(int irq, void *dev_id, struct pt_regs *regs)
SAB82532_ISR0_RFO | SAB82532_ISR0_RPF)) ||
(status.sreg.isr1 & SAB82532_ISR1_BRK))
SAB82532_ISR0_RFO | SAB82532_ISR0_RPF)) ||
(status.sreg.isr1 & SAB82532_ISR1_BRK))
- tty = receive_chars(up, &status
, regs
);
+ tty = receive_chars(up, &status);
if ((status.sreg.isr0 & SAB82532_ISR0_CDSC) ||
(status.sreg.isr1 & (SAB82532_ISR1_BRK | SAB82532_ISR1_CSC)))
check_status(up, &status);
if ((status.sreg.isr0 & SAB82532_ISR0_CDSC) ||
(status.sreg.isr1 & (SAB82532_ISR1_BRK | SAB82532_ISR1_CSC)))
check_status(up, &status);
@@
-787,8
+786,8
@@
static void sunsab_convert_to_sab(struct uart_sunsab_port *up, unsigned int cfla
}
/* port->lock is not held. */
}
/* port->lock is not held. */
-static void sunsab_set_termios(struct uart_port *port, struct termios *termios,
- struct termios *old)
+static void sunsab_set_termios(struct uart_port *port, struct
k
termios *termios,
+ struct
k
termios *old)
{
struct uart_sunsab_port *up = (struct uart_sunsab_port *) port;
unsigned long flags;
{
struct uart_sunsab_port *up = (struct uart_sunsab_port *) port;
unsigned long flags;
@@
-886,6
+885,15
@@
static int sunsab_console_setup(struct console *con, char *options)
unsigned long flags;
unsigned int baud, quot;
unsigned long flags;
unsigned int baud, quot;
+ /*
+ * The console framework calls us for each and every port
+ * registered. Defer the console setup until the requested
+ * port has been properly discovered. A bit of a hack,
+ * though...
+ */
+ if (up->port.type != PORT_SUNSAB)
+ return -1;
+
printk("Console: ttyS%d (SAB82532)\n",
(sunsab_reg.minor - 64) + con->index);
printk("Console: ttyS%d (SAB82532)\n",
(sunsab_reg.minor - 64) + con->index);
@@
-1027,7
+1035,7
@@
static int __devinit sunsab_init_one(struct uart_sunsab_port *up,
int err;
err = request_irq(up->port.irq, sunsab_interrupt,
int err;
err = request_irq(up->port.irq, sunsab_interrupt,
-
SA_SHIRQ
, "sab", up);
+
IRQF_SHARED
, "sab", up);
if (err) {
of_iounmap(up->port.membase,
sizeof(union sab82532_async_regs));
if (err) {
of_iounmap(up->port.membase,
sizeof(union sab82532_async_regs));
@@
-1047,12
+1055,13
@@
static int __devinit sab_probe(struct of_device *op, const struct of_device_id *
up = &sunsab_ports[inst * 2];
err = sunsab_init_one(&up[0], op,
up = &sunsab_ports[inst * 2];
err = sunsab_init_one(&up[0], op,
-
sizeof(union sab82532_async_regs)
,
+
0
,
(inst * 2) + 0);
if (err)
return err;
(inst * 2) + 0);
if (err)
return err;
- err = sunsab_init_one(&up[0], op, 0,
+ err = sunsab_init_one(&up[1], op,
+ sizeof(union sab82532_async_regs),
(inst * 2) + 1);
if (err) {
of_iounmap(up[0].port.membase,
(inst * 2) + 1);
if (err) {
of_iounmap(up[0].port.membase,
@@
-1117,7
+1126,7
@@
static int __init sunsab_init(void)
int err;
num_channels = 0;
int err;
num_channels = 0;
- for_each_node_by_name(dp, "s
u
")
+ for_each_node_by_name(dp, "s
e
")
num_channels += 2;
for_each_node_by_name(dp, "serial") {
if (of_device_is_compatible(dp, "sab82532"))
num_channels += 2;
for_each_node_by_name(dp, "serial") {
if (of_device_is_compatible(dp, "sab82532"))
This page took
0.029474 seconds
and
5
git commands to generate.