All of lore.kernel.org
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzk@kernel.org>
To: Tamseel Shams <m.shams@samsung.com>
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: Mon, 29 Jun 2020 10:35:53 +0200	[thread overview]
Message-ID: <20200629083553.GA14028@kozik-lap> (raw)
In-Reply-To: <20200628070007.36222-1-m.shams@samsung.com>

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

WARNING: multiple messages have this Message-ID (diff)
From: Krzysztof Kozlowski <krzk@kernel.org>
To: Tamseel Shams <m.shams@samsung.com>
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: Mon, 29 Jun 2020 10:35:53 +0200	[thread overview]
Message-ID: <20200629083553.GA14028@kozik-lap> (raw)
In-Reply-To: <20200628070007.36222-1-m.shams@samsung.com>

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

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

  reply	other threads:[~2020-06-29 20:52 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 [this message]
2020-06-29  8:35     ` Krzysztof Kozlowski
2020-07-04 14:25     ` M Tamseel Shams
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=20200629083553.GA14028@kozik-lap \
    --to=krzk@kernel.org \
    --cc=alim.akhtar@samsung.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jslaby@suse.com \
    --cc=kgene@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 \
    --cc=m.shams@samsung.com \
    /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.