Skip to contentSkip to conversation

serial: samsung: Removes the IRQ not found warning

PATCH In review Tamseel Shams 4 participants 4 messages Aug 10, 2020 – Aug 11, 2020 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): CGME20200810032514epcas5p1140fe0e44f3727953480ff0531c76b0c@epcas5p1.samsung.com

#1 lore raw

PATCH v5 1/1 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.

---
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(-)
drivers/tty/serial/samsung_tty.c +5 -3
index 6ef614d8648c..b923683e6a25 100644
@@ -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.
Signature · 1 line
2.17.1
maintainer Reviewed-by on v5 1/1
#2 lore raw
Quoted 15 lines · Tamseel Shams

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.

---
Commit message is changed.

Quoted 8 lines

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(-)

Best regards,
Krzysztof

reviewer Tested-by Reviewed-by on v5 1/1
#3 lore raw
In reply to Tamseel Shams

Hi Tamseel,

Quoted 17 lines

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

Quoted 5 lines

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

---

Tested on exynos7 platform, don’t see " IRQ index 1 not found" with this patch applied Fill free to added

Quoted 32 lines

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(-)
drivers/tty/serial/samsung_tty.c +5 -3
index 6ef614d8648c..b923683e6a25 100644
@@ -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

Tested-by on v5 1/1
#4 lore raw
In reply to Tamseel Shams

Hi

Quoted 8 lines · Tamseel Shams

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.

Quoted 4 lines

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

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

Quoted 1 line
Quoted 1 line

...

Best regards

Signature · 2 lines
Marek Szyprowski, PhD
Samsung R&D Institute Poland