[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <046901d6520f$0bd565d0$23803170$@samsung.com>
Date: Sat, 4 Jul 2020 19:55:47 +0530
From: "M Tamseel Shams" <m.shams@...sung.com>
To: "'Krzysztof Kozlowski'" <krzk@...nel.org>
Cc: <kgene@...nel.org>, <gregkh@...uxfoundation.org>,
<jslaby@...e.com>, <linux-arm-kernel@...ts.infradead.org>,
<linux-samsung-soc@...r.kernel.org>,
<linux-serial@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<alim.akhtar@...sung.com>
Subject: RE: [PATCH v2] serial: samsung: Re-factors UART IRQ resource for
various Samsung SoC
> On Sun, Jun 28, 2020 at 12:30:07PM +0530, Tamseel Shams wrote:
> > In few older Samsung SoCs like s3c2410, s3c2412 and s3c2440, UART IP
> > is having 2 interrupt lines.
> > However, in other SoCs like s3c6400, s5pv210, exynos5433, and
> > exynos4210 UART is having only 1 interrupt line. Due to this,
> > "platform_get_irq(platdev, 1)"
> > call in the driver gives the following warning:
> > "IRQ index 1 not found" on recent platforms.
> >
> > This patch re-factors the IRQ resources handling for each platform and
> > hence fixing the above warnings seen on some platforms.
> >
> > Signed-off-by: Tamseel Shams <m.shams@...sung.com>
> > ---
> > Removed the RFC tag and using 'platform_get_irq_optional'
> > instead of 'platform_get_irq' as per comment received from Robin
> > Murphy.
> >
> > drivers/tty/serial/samsung_tty.c | 14 ++++++++++++--
> > 1 file changed, 12 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/tty/serial/samsung_tty.c
> > b/drivers/tty/serial/samsung_tty.c
> > index 6ef614d8648c..60554f42e208 100644
> > --- a/drivers/tty/serial/samsung_tty.c
> > +++ b/drivers/tty/serial/samsung_tty.c
> > @@ -60,6 +60,7 @@ struct s3c24xx_uart_info {
> > char *name;
> > unsigned int type;
> > unsigned int fifosize;
> > + unsigned int irq_cnt;
>
> No, it's duplicating the logic.
>
> The driver already checks whether SoC has two or one interrupt line with
> s3c24xx_serial_has_interrupt_mask() so there is no point to have two of such
> methods.
>
> Instead unify it please. Probably entire
> s3c24xx_serial_has_interrupt_mask() and s3c24xx_serial_type() should be
> removed and switched into *serial_drv_data.
>
> Best regards,
> Krzysztof
Hi Krzysztof,
Thanks for letting me know about duplication of logic.
I will remove my logic of checking of number of interrupt line
and replace it with check using s3c24xx_serial_has_interrupt_mask().
I will come up with another patch regarding the suggestion of removal
of the two functions s3c24xx_serial_has_interrupt_mask() and
s3c24xx_serial_type() and moving it to *serial_drv_data.
Thanks & Regards,
Tamseel
Powered by blists - more mailing lists