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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxx>
> ---
> 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



[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux