ACK: [SRU][Xenial][PATCH 1/1] tty/hvc: Use opal irqchip interface if available

Stefan Bader stefan.bader at canonical.com
Wed Nov 15 10:49:20 UTC 2017


On 08.11.2017 22:02, Joseph Salisbury wrote:
> From: Sam Mendoza-Jonas <sam at mendozajonas.com>
> 
> BugLink: http://bugs.launchpad.net/bugs/1728098
> 
> 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 at mendozajonas.com>
> Signed-off-by: Michael Ellerman <mpe at ellerman.id.au>
> (cherry picked from commit 00dab8187e182da41122f66c207707b192509df4)
> Signed-off-by: Joseph Salisbury <joseph.salisbury at canonical.com>
Acked-by: Stefan Bader <stefan.bader at canonical.com>

> ---
>  drivers/tty/hvc/hvc_opal.c | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
> 
> 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);
> 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <https://lists.ubuntu.com/archives/kernel-team/attachments/20171115/4c267ae5/attachment.sig>


More information about the kernel-team mailing list