drivers/pl011: ACPI: The interrupt should always be high level triggered
authorJulien Grall <julien.grall@arm.com>
Mon, 11 Apr 2016 13:33:33 +0000 (14:33 +0100)
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Tue, 12 Apr 2016 13:33:33 +0000 (09:33 -0400)
The SPCR does not specify if the interrupt is edge or level triggered.
So the configuration needs to be hardcoded in the code.

Based on the PL011 TRM (see 2.2.8 in ARM DDI 0183G), the interrupt generated
will be active high. Whilst the wording may be interpreted differently,
the SBSA (section 4.3.2 in ARM-DEN-0029 v2.3) states the PL011 is
implemented with a level triggered interrupt.

So the driver should configure the interrupt as high level triggered.

Signed-off-by: Julien Grall <julien.grall@arm.com>
Reviewed-by: Shannon Zhao <shannon.zhao@linaro.org>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
xen/drivers/char/pl011.c

index fa22edf4035c590678cfefca9568d815ae1a1db5..1212d5cdf31bc5b4dd16f590fca0e6bc7e21c37f 100644 (file)
@@ -327,7 +327,7 @@ static int __init pl011_acpi_uart_init(const void *data)
     }
 
     /* trigger/polarity information is not available in spcr */
-    irq_set_type(spcr->interrupt, IRQ_TYPE_EDGE_BOTH);
+    irq_set_type(spcr->interrupt, IRQ_TYPE_LEVEL_HIGH);
 
     res = pl011_uart_init(spcr->interrupt, spcr->serial_port.address,
                           PAGE_SIZE);