Message ID | 20160711033858.16172-2-sam@mendozajonas.com (mailing list archive) |
---|---|
State | Accepted |
Headers | show |
Samuel Mendoza-Jonas <sam@mendozajonas.com> writes: > 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> > Cc: <stable@vger.kernel.org> # 4.1.x- > --- > v2: Always try irq_of_parse_and_map before falling back LGTM. Acked-by: Michael Ellerman <mpe@ellerman.id.au> cheers > diff --git a/drivers/tty/hvc/hvc_opal.c b/drivers/tty/hvc/hvc_opal.c > index b7cd0ae..5107993 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); > -- > 2.9.0
On Mon, 2016-11-07 at 03:38:58 UTC, Sam Mendoza-Jonas wrote: > 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> > Acked-by: Michael Ellerman <mpe@ellerman.id.au> Applied to powerpc next, thanks. https://git.kernel.org/powerpc/c/00dab8187e182da41122f66c20 cheers
diff --git a/drivers/tty/hvc/hvc_opal.c b/drivers/tty/hvc/hvc_opal.c index b7cd0ae..5107993 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);
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> Cc: <stable@vger.kernel.org> # 4.1.x- --- v2: Always try irq_of_parse_and_map before falling back drivers/tty/hvc/hvc_opal.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)