Re: [PATCH v2 4/4] serial: sh-sci: Improve support for separate TEI and DRI interrupts

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Chris,

On Mon, Jul 30, 2018 at 3:17 PM Chris Brandt <chris.brandt@xxxxxxxxxxx> wrote:
> Some SCIF versions mux error and break interrupts together and then provide
> a separate interrupt ID for just TEI/DRI.
>
> Allow all 6 types of interrupts to be specified via platform data (or DT)
> and for any signals that are muxed together (have the same interrupt
> number) simply register one handler.
>
> Signed-off-by: Chris Brandt <chris.brandt@xxxxxxxxxxx>
> Reviewed-by: Geert Uytterhoeven <geert+renesas@xxxxxxxxx>
> ---
> v2:
> * Removed - 1 from loop
> * Added Reviewed-by

> --- a/drivers/tty/serial/sh-sci.c
> +++ b/drivers/tty/serial/sh-sci.c

> @@ -1845,31 +1858,8 @@ static int sci_request_irq(struct sci_port *port)
>
>                 desc = sci_irq_desc + i;
>                 port->irqstr[j] = NULL;

The above line can be removed again, too.

> -               if (SCIx_TEIDRI_IRQ_EXISTS(port)) {
> -                       /*
> -                        * ERI and BRI are muxed, just register ERI and
> -                        * ignore BRI.
> -                        * TEI and DRI are muxed, but only DRI
> -                        * is enabled, so use RXI handler
> -                        */
> -                       if (i == SCIx_ERI_IRQ)
> -                               port->irqstr[j] = kasprintf(GFP_KERNEL,
> -                                                           "%s:err + break",
> -                                                           dev_name(up->dev));
> -                       if (i == SCIx_BRI_IRQ)
> -                               continue;
> -                       if (i == SCIx_TEIDRI_IRQ) {
> -                               port->irqstr[j] = kasprintf(GFP_KERNEL,
> -                                                           "%s:tx end + rx ready",
> -                                                           dev_name(up->dev));
> -                               desc = sci_irq_desc + SCIx_RXI_IRQ;
> -                       }
> -               }
> -
> -               if (!port->irqstr[j])
> -                       port->irqstr[j] = kasprintf(GFP_KERNEL, "%s:%s",
> -                                                   dev_name(up->dev),
> -                                                   desc->desc);
> +               port->irqstr[j] = kasprintf(GFP_KERNEL, "%s:%s",
> +                                           dev_name(up->dev), desc->desc);
>                 if (!port->irqstr[j]) {
>                         ret = -ENOMEM;
>                         goto out_nomem;

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux