Thread (5 messages) 5 messages, 3 authors, 2020-06-17

RE: [RFC PATCH] serial: samsung: Re-factors UART IRQ resource for various Samsung SoC

From: M Tamseel Shams <hidden>
Date: 2020-06-17 17:08:19
Also in: linux-samsung-soc, linux-serial, lkml

Hi Robin,
-----Original Message-----
From: Robin Murphy <robin.murphy@arm.com>
Sent: Monday, June 15, 2020 6:43 PM
To: Tamseel Shams <redacted>; kgene@kernel.org;
krzk@kernel.org; gregkh@linuxfoundation.org; jslaby@suse.com
Cc: linux-samsung-soc@vger.kernel.org; linux-serial@vger.kernel.org; linux-
kernel@vger.kernel.org; alim.akhtar@samsung.com; linux-arm-
kernel@lists.infradead.org
Subject: Re: [RFC PATCH] serial: samsung: Re-factors UART IRQ resource for
various Samsung SoC

On 2020-06-15 13:26, Tamseel Shams wrote:
quoted
  	else {
  		port->irq = ret;
  		ourport->rx_irq = ret;
-		ourport->tx_irq = ret + 1;
+		if (ourport->info->irq_cnt == 1)
+			ourport->tx_irq = ret;
+		else
+			ourport->tx_irq = ret + 1;
  	}

-	ret = platform_get_irq(platdev, 1);
-	if (ret > 0)
-		ourport->tx_irq = ret;
+	if (ourport->info->irq_cnt != 1) {
+		ret = platform_get_irq(platdev, 1);
+		if (ret > 0)
+			ourport->tx_irq = ret;
FWIW, if you're not going to do anything in the error case then you may as well
just call platform_get_irq_optional() unconditionally.

Robin.
My intention behind not using 'platform_get_irq_optional' was that it does not prints the error when the 2nd interrupt resource is missing for the older UART's. I am just using it to give information to the user in error case. I can use 'platform_get_irq_optional' too.

Thanks & Regards
Tamseel
quoted
+	}
  	/*
  	 * DMA is currently supported only on DT platforms, if DMA properties
  	 * are specified.
@@ -2387,6 +2393,7 @@ static struct s3c24xx_serial_drv_data
s3c2410_serial_drv_data = {
quoted
  		.name		= "Samsung S3C2410 UART",
  		.type		= PORT_S3C2410,
  		.fifosize	= 16,
+		.irq_cnt	= 2,
  		.rx_fifomask	= S3C2410_UFSTAT_RXMASK,
  		.rx_fifoshift	= S3C2410_UFSTAT_RXSHIFT,
  		.rx_fifofull	= S3C2410_UFSTAT_RXFULL,

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help