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

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

 



Hi Robin,

> -----Original Message-----
> From: Robin Murphy <robin.murphy@xxxxxxx>
> Sent: Monday, June 15, 2020 6:43 PM
> To: Tamseel Shams <m.shams@xxxxxxxxxxx>; kgene@xxxxxxxxxx;
> krzk@xxxxxxxxxx; gregkh@xxxxxxxxxxxxxxxxxxx; jslaby@xxxxxxxx
> Cc: linux-samsung-soc@xxxxxxxxxxxxxxx; linux-serial@xxxxxxxxxxxxxxx; linux-
> kernel@xxxxxxxxxxxxxxx; alim.akhtar@xxxxxxxxxxx; linux-arm-
> kernel@xxxxxxxxxxxxxxxxxxx
> 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,





[Index of Archives]     [Linux SoC Development]     [Linux Rockchip Development]     [Linux for Synopsys ARC Processors]    
  • [Linux on Unisoc (RDA Micro) SoCs]     [Linux Actions SoC]     [Linux USB Development]     [Video for Linux]     [Linux Audio Users]     [Linux SCSI]     [Yosemite News]

  •   Powered by Linux