Skip to content

Commit

Permalink
tty/hvc: Use opal irqchip interface if available
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Sam Mendoza-Jonas authored and Michael Ellerman committed Jul 27, 2016
1 parent bbc3dfe commit 00dab81
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion drivers/tty/hvc/hvc_opal.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 00dab81

Please sign in to comment.