summaryrefslogtreecommitdiffstats
path: root/drivers/tty/hvc/hvc_opal.c
diff options
context:
space:
mode:
authorSam Mendoza-Jonas <sam@mendozajonas.com>2016-07-11 05:38:58 +0200
committerMichael Ellerman <mpe@ellerman.id.au>2016-07-27 04:38:20 +0200
commit00dab8187e182da41122f66c207707b192509df4 (patch)
treea2fc023057f89199570a4247651c3fa6359bb769 /drivers/tty/hvc/hvc_opal.c
parenttty/hvc: Use IRQF_SHARED for OPAL hvc consoles (diff)
downloadlinux-00dab8187e182da41122f66c207707b192509df4.tar.xz
linux-00dab8187e182da41122f66c207707b192509df4.zip
tty/hvc: Use opal irqchip interface if available
Update the hvc driver to use the OPAL irqchip if made available by the running firmware. If it is not present, the driver falls back to the existing OPAL event number. Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'drivers/tty/hvc/hvc_opal.c')
-rw-r--r--drivers/tty/hvc/hvc_opal.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/tty/hvc/hvc_opal.c b/drivers/tty/hvc/hvc_opal.c
index b7cd0ae7d927..510799311099 100644
--- a/drivers/tty/hvc/hvc_opal.c
+++ b/drivers/tty/hvc/hvc_opal.c
@@ -214,7 +214,13 @@ static int hvc_opal_probe(struct platform_device *dev)
dev->dev.of_node->full_name,
boot ? " (boot console)" : "");
- irq = opal_event_request(ilog2(OPAL_EVENT_CONSOLE_INPUT));
+ irq = irq_of_parse_and_map(dev->dev.of_node, 0);
+ if (!irq) {
+ pr_info("hvc%d: No interrupts property, using OPAL event\n",
+ termno);
+ irq = opal_event_request(ilog2(OPAL_EVENT_CONSOLE_INPUT));
+ }
+
if (!irq) {
pr_err("hvc_opal: Unable to map interrupt for device %s\n",
dev->dev.of_node->full_name);