aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-05-23 12:00:40 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-05-23 12:00:40 -0400
commit1d767cae4dbd4116fc3b2cc3251a20760f98339f (patch)
tree79a1a48a67a9b4296ce062d61ee863fe7a46c77f /drivers/tty
parent6101167727932a929e37fb8a6eeb68bdbf54d58e (diff)
parent5f19f14fed7786652b9617c633db101d26a42251 (diff)
Merge tag 'sh-for-linus' of git://github.com/pmundt/linux-sh
Pull SuperH updates from Paul Mundt: - New CPUs: SH7734 (SH-4A), SH7264 and SH7269 (SH-2A) - New boards: RSK2+SH7264, RSK2+SH7269 - Unbreaking kgdb for SMP - Consolidation of _32/_64 page fault handling. - watchdog and legacy DMA chainsawing, part 1 - Conversion to evt2irq() hwirq lookup, to support relocation of vectored IRQs for irqdomains. * tag 'sh-for-linus' of git://github.com/pmundt/linux-sh: (98 commits) sh: intc: Kill off special reservation interface. sh: Enable PIO API for hp6xx and se770x. sh: Kill off machvec IRQ hinting. sh: dma: More legacy cpu dma chainsawing. sh: Kill off MAX_DMA_ADDRESS leftovers. sh: Tidy up some of the cpu legacy dma header mess. sh: Move sh4a dma header from cpu-sh4 to cpu-sh4a. sh64: Fix up vmalloc fault range check. Revert "sh: Ensure fixmap and store queue space can co-exist." serial: sh-sci: Fix for port types without BRI interrupts. sh: legacy PCI evt2irq migration. sh: cpu dma evt2irq migration. sh: sh7763rdp evt2irq migration. sh: sdk7780 evt2irq migration. sh: migor evt2irq migration. sh: landisk evt2irq migration. sh: kfr2r09 evt2irq migration. sh: ecovec24 evt2irq migration. sh: ap325rxa evt2irq migration. sh: urquell evt2irq migration. ...
Diffstat (limited to 'drivers/tty')
-rw-r--r--drivers/tty/serial/sh-sci.c49
1 files changed, 44 insertions, 5 deletions
diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c
index 3158e17b665c..4604153b7954 100644
--- a/drivers/tty/serial/sh-sci.c
+++ b/drivers/tty/serial/sh-sci.c
@@ -1052,9 +1052,17 @@ static int sci_request_irq(struct sci_port *port)
1052 if (SCIx_IRQ_IS_MUXED(port)) { 1052 if (SCIx_IRQ_IS_MUXED(port)) {
1053 i = SCIx_MUX_IRQ; 1053 i = SCIx_MUX_IRQ;
1054 irq = up->irq; 1054 irq = up->irq;
1055 } else 1055 } else {
1056 irq = port->cfg->irqs[i]; 1056 irq = port->cfg->irqs[i];
1057 1057
1058 /*
1059 * Certain port types won't support all of the
1060 * available interrupt sources.
1061 */
1062 if (unlikely(!irq))
1063 continue;
1064 }
1065
1058 desc = sci_irq_desc + i; 1066 desc = sci_irq_desc + i;
1059 port->irqstr[j] = kasprintf(GFP_KERNEL, "%s:%s", 1067 port->irqstr[j] = kasprintf(GFP_KERNEL, "%s:%s",
1060 dev_name(up->dev), desc->desc); 1068 dev_name(up->dev), desc->desc);
@@ -1094,6 +1102,15 @@ static void sci_free_irq(struct sci_port *port)
1094 * IRQ first. 1102 * IRQ first.
1095 */ 1103 */
1096 for (i = 0; i < SCIx_NR_IRQS; i++) { 1104 for (i = 0; i < SCIx_NR_IRQS; i++) {
1105 unsigned int irq = port->cfg->irqs[i];
1106
1107 /*
1108 * Certain port types won't support all of the available
1109 * interrupt sources.
1110 */
1111 if (unlikely(!irq))
1112 continue;
1113
1097 free_irq(port->cfg->irqs[i], port); 1114 free_irq(port->cfg->irqs[i], port);
1098 kfree(port->irqstr[i]); 1115 kfree(port->irqstr[i]);
1099 1116
@@ -1564,10 +1581,32 @@ static void sci_enable_ms(struct uart_port *port)
1564 1581
1565static void sci_break_ctl(struct uart_port *port, int break_state) 1582static void sci_break_ctl(struct uart_port *port, int break_state)
1566{ 1583{
1567 /* 1584 struct sci_port *s = to_sci_port(port);
1568 * Not supported by hardware. Most parts couple break and rx 1585 struct plat_sci_reg *reg = sci_regmap[s->cfg->regtype] + SCSPTR;
1569 * interrupts together, with break detection always enabled. 1586 unsigned short scscr, scsptr;
1570 */ 1587
1588 /* check wheter the port has SCSPTR */
1589 if (!reg->size) {
1590 /*
1591 * Not supported by hardware. Most parts couple break and rx
1592 * interrupts together, with break detection always enabled.
1593 */
1594 return;
1595 }
1596
1597 scsptr = serial_port_in(port, SCSPTR);
1598 scscr = serial_port_in(port, SCSCR);
1599
1600 if (break_state == -1) {
1601 scsptr = (scsptr | SCSPTR_SPB2IO) & ~SCSPTR_SPB2DT;
1602 scscr &= ~SCSCR_TE;
1603 } else {
1604 scsptr = (scsptr | SCSPTR_SPB2DT) & ~SCSPTR_SPB2IO;
1605 scscr |= SCSCR_TE;
1606 }
1607
1608 serial_port_out(port, SCSPTR, scsptr);
1609 serial_port_out(port, SCSCR, scscr);
1571} 1610}
1572 1611
1573#ifdef CONFIG_SERIAL_SH_SCI_DMA 1612#ifdef CONFIG_SERIAL_SH_SCI_DMA