Re: [PATCH 5/7] serial: 8250_dw: Add a dma_capable bit to the platform data

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

 



Hi Andy,

andriy.shevchenko@xxxxxxxxxxxxxxx wrote on Thu, 10 Mar 2022 20:06:25
+0200:

> On Thu, Mar 10, 2022 at 05:16:48PM +0100, Miquel Raynal wrote:
> > From: Phil Edworthy <phil.edworthy@xxxxxxxxxxx>
> > 
> > The CPR register can give the information whether the IP is DMA capable
> > or not. Let's extract this information and use it to discriminate when
> > the DMA can be hooked up or not.  
> 
> ...
> 
> > +	/* If we have a valid fifosize and DMA support, try hooking up DMA */
> > +	if (p->fifosize && data->dma_capable) {  
> 
> > +	if (reg & DW_UART_CPR_DMA_EXTRA)
> > +		data->dma_capable = 1;  
> 
> How many designs will be broken by this change?

My understanding was that CPR registers where always synthesized until
now even though it was not mandatory and that the RZN1 SoC was the
first one to not embed it. My hope was that people using this driver
would have brought "external" CPR support earlier if they needed it,
but I understand this assumption might be wrong.

Anyway, I also hesitated to do something more custom for the RZN1 I'll
try something else.

> 
> ...
> 
> > +	unsigned int		dma_capable:1;  
> 
> Note, we use up->dma == NULL for no-DMA, no additional flag is needed.
> Just make sure that for your platform you enable DMA by filling that.

dma_capable is just a capability the SoC has. It was discovered at
probe time and should be saved to know, later, if DMA can be hooked up
or not. At the time we look at the CPR register we don't yet have DMA
fields populated so its too early to set up->dma to NULL.

Thanks,
Miquèl




[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux