Skip to contentSkip to conversation

iop: n2100: enable serial interrupt

PATCH New Aaro Koskinen 3 participants 4 messages Feb 14, 2010 – Feb 15, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 iop: n2100: enable serial interrupt

Thecus N2100 has a jumper (J3/J4) to select whether the XINT1 interrupt line is connected to the second UHCI controller (position J3) or to the serial port UART (position J4). Currently, the kernel is hardcoded to assume the J3 position, and the serial port is always being used in polling mode.

The patch adds the IRQ autodetection flag for the serial port interrupt, and also marks it as shared (as the driver for the second UHCI controller will request the interrupt in any case). Now, when the jumper is set to the J4 position, the serial port will have an interrupt line, resulting in less CPU overhead and faster throughput.

---
 arch/arm/mach-iop32x/n2100.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/mach-iop32x/n2100.c +1 -1
index d2e4278..001db59 100644
@@ -178,7 +178,7 @@ static struct plat_serial8250_port n2100_serial_port[] = {
 		.mapbase	= N2100_UART,
 		.membase	= (char *)N2100_UART,
 		.irq		= 0,
-		.flags		= UPF_SKIP_TEST,
+		.flags		= UPF_SKIP_TEST | UPF_AUTO_IRQ | UPF_SHARE_IRQ,
 		.iotype		= UPIO_MEM,
 		.regshift	= 0,
 		.uartclk	= 1843200,
Signature · 1 line
1.5.6.5
#1 lore raw

PATCH 1/1 iop: n2100: enable serial interrupt

Quoted 6 lines · Aaro Koskinen

Thecus N2100 has a jumper (J3/J4) to select whether the XINT1 interrupt line is connected to the second UHCI controller (position J3) or to the serial port UART (position J4). Currently, the kernel is hardcoded to assume the J3 position, and the serial port is always being used in polling mode.

Quoted 7 lines

The patch adds the IRQ autodetection flag for the serial port interrupt, and also marks it as shared (as the driver for the second UHCI controller will request the interrupt in any case). Now, when the jumper is set to the J4 position, the serial port will have an interrupt line, resulting in less CPU overhead and faster throughput.

Assuming that you've found this to actually work:

#2 lore raw

PATCH 1/1 iop: n2100: enable serial interrupt

Hi,

Quoted 21 lines · Lennert Buytenhek
Quoted 19 lines · Aaro Koskinen

Thecus N2100 has a jumper (J3/J4) to select whether the XINT1 interrupt
line is connected to the second UHCI controller (position J3) or to the serial port UART (position J4). Currently, the kernel is hardcoded
to assume the J3 position, and the serial port is always being used in
polling mode.

The patch adds the IRQ autodetection flag for the serial port interrupt,
and also marks it as shared (as the driver for the second UHCI controller
will request the interrupt in any case). Now, when the jumper is set to
the J4 position, the serial port will have an interrupt line, resulting
in less CPU overhead and faster throughput.

Quoted 5 lines
Quoted 1 line

Assuming that you've found this to actually work:

Yes, it works, I'm using 2.6.32.8 kernel with this patch. Both jumper positions
work as expected.

A.

#3 lore raw

PATCH 1/1 iop: n2100: enable serial interrupt

In reply to Aaro Koskinen
Quoted 22 lines · Aaro Koskinen

Thecus N2100 has a jumper (J3/J4) to select whether the XINT1 interrupt line is connected to the second UHCI controller (position J3) or to the serial port UART (position J4). Currently, the kernel is hardcoded to assume the J3 position, and the serial port is always being used in polling mode.

The patch adds the IRQ autodetection flag for the serial port interrupt, and also marks it as shared (as the driver for the second UHCI controller will request the interrupt in any case). Now, when the jumper is set to the J4 position, the serial port will have an interrupt line, resulting in less CPU overhead and faster throughput.

---
 arch/arm/mach-iop32x/n2100.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/mach-iop32x/n2100.c +0 -0
index d2e4278..001db59 100644

arch/arm/mach-iop32x/n2100.c static struct plat_serial8250_port n2100_serial_port[] = { · line 184

Quoted 8 lines
arch/arm/mach-iop32x/n2100.c +1 -1
@@ -178,7 +178,7 @@ static struct plat_serial8250_port n2100_serial_port[] = {
 		.mapbase	= N2100_UART,
 		.membase	= (char *)N2100_UART,
 		.irq		= 0,
-		.flags		= UPF_SKIP_TEST,
+		.flags		= UPF_SKIP_TEST | UPF_AUTO_IRQ | UPF_SHARE_IRQ,
 		.iotype		= UPIO_MEM,
 		.regshift	= 0,
 		.uartclk	= 1843200,

Nice. When I tried using irq auto-detection for this back in September I added UPF_AUTO_IRQ but missed the UPF_SHARE_IRQ thing, and that didn't work. This one does work (with the jumper in position J4).