lkml.org 
[lkml]   [2020]   [Jun]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [RFC PATCH] serial: samsung: Re-factors UART IRQ resource for various Samsung SoC
Date
Hi Robin,

> -----Original Message-----
> From: Robin Murphy <robin.murphy@arm.com>
> Sent: Monday, June 15, 2020 6:43 PM
> To: Tamseel Shams <m.shams@samsung.com>; 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:
> > 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

> > + }
> > /*
> > * 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 = {
> > .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,

\
 
 \ /
  Last update: 2020-06-17 19:09    [W:1.307 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site