2020-08-10 04:12:07

by Tamseel Shams

[permalink] [raw]
Subject: [RFT PATCH v5] serial: samsung: Removes the IRQ not found warning

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 false-positive error:
"IRQ index 1 not found" on newer SoC's.

This patch adds the condition to check for Tx interrupt
only for the those SoC's which have 2 interrupt lines.

Signed-off-by: Tamseel Shams <[email protected]>
---
Commit message is changed.

Added RFT, for older platform.

Addressed Krzysztof's review comments [1]
[1] -> https://lkml.org/lkml/2020/7/21/150

drivers/tty/serial/samsung_tty.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/tty/serial/samsung_tty.c b/drivers/tty/serial/samsung_tty.c
index 6ef614d8648c..b923683e6a25 100644
--- a/drivers/tty/serial/samsung_tty.c
+++ b/drivers/tty/serial/samsung_tty.c
@@ -1911,9 +1911,11 @@ static int s3c24xx_serial_init_port(struct s3c24xx_uart_port *ourport,
ourport->tx_irq = ret + 1;
}

- ret = platform_get_irq(platdev, 1);
- if (ret > 0)
- ourport->tx_irq = ret;
+ if (!s3c24xx_serial_has_interrupt_mask(port)) {
+ ret = platform_get_irq(platdev, 1);
+ if (ret > 0)
+ ourport->tx_irq = ret;
+ }
/*
* DMA is currently supported only on DT platforms, if DMA properties
* are specified.
--
2.17.1


2020-08-10 14:16:34

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [RFT PATCH v5] serial: samsung: Removes the IRQ not found warning

On Mon, Aug 10, 2020 at 08:30:21AM +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 false-positive error:
> "IRQ index 1 not found" on newer SoC's.
>
> This patch adds the condition to check for Tx interrupt
> only for the those SoC's which have 2 interrupt lines.
>
> Signed-off-by: Tamseel Shams <[email protected]>
> ---
> Commit message is changed.
>
> Added RFT, for older platform.
>
> Addressed Krzysztof's review comments [1]
> [1] -> https://lkml.org/lkml/2020/7/21/150
>
> drivers/tty/serial/samsung_tty.c | 8 +++++---
> 1 file changed, 5 insertions(+), 3 deletions(-)
>

Reviewed-by: Krzysztof Kozlowski <[email protected]>

Best regards,
Krzysztof

2020-08-10 16:28:58

by Alim Akhtar

[permalink] [raw]
Subject: RE: [RFT PATCH v5] serial: samsung: Removes the IRQ not found warning

Hi Tamseel,

> -----Original Message-----
> From: Tamseel Shams <[email protected]>
> Sent: 10 August 2020 08:30
> To: [email protected]; [email protected]; [email protected];
> [email protected]
> Cc: [email protected]; [email protected];
> [email protected]; [email protected];
> [email protected]; Tamseel Shams <[email protected]>
> Subject: [RFT PATCH v5] serial: samsung: Removes the IRQ not found warning
>
> 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 false-positive error:
> "IRQ index 1 not found" on newer SoC's.
>
> This patch adds the condition to check for Tx interrupt only for the those SoC's
> which have 2 interrupt lines.
>
> Signed-off-by: Tamseel Shams <[email protected]>
> ---
Tested on exynos7 platform, don’t see " IRQ index 1 not found" with this patch applied
Fill free to added
Tested-by: Alim Akhtar <[email protected]>
Reviewed-by: Alim Akhtar <[email protected]>

> Commit message is changed.
>
> Added RFT, for older platform.
>
> Addressed Krzysztof's review comments [1] [1] ->
> https://lkml.org/lkml/2020/7/21/150
>
> drivers/tty/serial/samsung_tty.c | 8 +++++---
> 1 file changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/tty/serial/samsung_tty.c b/drivers/tty/serial/samsung_tty.c
> index 6ef614d8648c..b923683e6a25 100644
> --- a/drivers/tty/serial/samsung_tty.c
> +++ b/drivers/tty/serial/samsung_tty.c
> @@ -1911,9 +1911,11 @@ static int s3c24xx_serial_init_port(struct
> s3c24xx_uart_port *ourport,
> ourport->tx_irq = ret + 1;
> }
>
> - ret = platform_get_irq(platdev, 1);
> - if (ret > 0)
> - ourport->tx_irq = ret;
> + if (!s3c24xx_serial_has_interrupt_mask(port)) {
> + ret = platform_get_irq(platdev, 1);
> + if (ret > 0)
> + ourport->tx_irq = ret;
> + }
> /*
> * DMA is currently supported only on DT platforms, if DMA properties
> * are specified.
> --
> 2.17.1



2020-08-11 09:43:15

by Marek Szyprowski

[permalink] [raw]
Subject: Re: [RFT PATCH v5] serial: samsung: Removes the IRQ not found warning

Hi

On 10.08.2020 05:00, 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 false-positive error:
> "IRQ index 1 not found" on newer SoC's.
>
> This patch adds the condition to check for Tx interrupt
> only for the those SoC's which have 2 interrupt lines.
>
> Signed-off-by: Tamseel Shams <[email protected]>

Indeed, it removes the warning on various Exynos{3,4,5} based boards.

Tested-by: Marek Szyprowski <[email protected]>

> > ...

Best regards
--
Marek Szyprowski, PhD
Samsung R&D Institute Poland