All of lore.kernel.org
 help / color / mirror / Atom feed
From: "M Tamseel Shams" <m.shams@samsung.com>
To: "'Krzysztof Kozlowski'" <krzk@kernel.org>
Cc: <kgene@kernel.org>, <gregkh@linuxfoundation.org>,
	<jslaby@suse.com>, <linux-arm-kernel@lists.infradead.org>,
	<linux-samsung-soc@vger.kernel.org>,
	<linux-serial@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<alim.akhtar@samsung.com>
Subject: RE: [PATCH v2] serial: samsung: Re-factors UART IRQ resource for various Samsung SoC
Date: Sat, 4 Jul 2020 19:55:47 +0530	[thread overview]
Message-ID: <046901d6520f$0bd565d0$23803170$@samsung.com> (raw)
In-Reply-To: <20200629083553.GA14028@kozik-lap>

> 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@samsung.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


WARNING: multiple messages have this Message-ID (diff)
From: "M Tamseel Shams" <m.shams@samsung.com>
To: "'Krzysztof Kozlowski'" <krzk@kernel.org>
Cc: linux-samsung-soc@vger.kernel.org, alim.akhtar@samsung.com,
	gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org,
	kgene@kernel.org, linux-serial@vger.kernel.org, jslaby@suse.com,
	linux-arm-kernel@lists.infradead.org
Subject: RE: [PATCH v2] serial: samsung: Re-factors UART IRQ resource for various Samsung SoC
Date: Sat, 4 Jul 2020 19:55:47 +0530	[thread overview]
Message-ID: <046901d6520f$0bd565d0$23803170$@samsung.com> (raw)
In-Reply-To: <20200629083553.GA14028@kozik-lap>

> 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@samsung.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


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2020-07-04 14:26 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20200628071932epcas5p175059c085421a95de76202767bd132cf@epcas5p1.samsung.com>
2020-06-28  7:00 ` [PATCH v2] serial: samsung: Re-factors UART IRQ resource for various Samsung SoC Tamseel Shams
2020-06-28  7:00   ` Tamseel Shams
2020-06-29  8:35   ` Krzysztof Kozlowski
2020-06-29  8:35     ` Krzysztof Kozlowski
2020-07-04 14:25     ` M Tamseel Shams [this message]
2020-07-04 14:25       ` M Tamseel Shams

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='046901d6520f$0bd565d0$23803170$@samsung.com' \
    --to=m.shams@samsung.com \
    --cc=alim.akhtar@samsung.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jslaby@suse.com \
    --cc=kgene@kernel.org \
    --cc=krzk@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.