mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
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 <[email protected]> Signed-off-by: Michael Ellerman <[email protected]>
This commit is contained in:
parent
bbc3dfe880
commit
00dab8187e
1 changed files with 7 additions and 1 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue