Re: [PATCHv2] dma: cppi41: add missing bitfields

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

 



On Wed, Apr 08, 2015 at 11:45:42AM -0500, Felipe Balbi wrote:
> Add missing directions, residue_granularity,
> srd_addr_widths and dst_addr_widths bitfields.
> 
> Without those we will see a kernel WARN()
> when loading musb on am335x devices.
I have applied this and will send to Linus as well

-- 
~Vinod

> 
> Signed-off-by: Felipe Balbi <balbi@xxxxxx>
> ---
> 
> retested with AM335x BeagleBone Black
> 
>  drivers/dma/cppi41.c | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/drivers/dma/cppi41.c b/drivers/dma/cppi41.c
> index 512cb8e2805e..ceedafbd23e0 100644
> --- a/drivers/dma/cppi41.c
> +++ b/drivers/dma/cppi41.c
> @@ -903,6 +903,11 @@ static const struct cppi_glue_infos *get_glue_info(struct device *dev)
>  	return of_id->data;
>  }
>  
> +#define CPPI41_DMA_BUSWIDTHS	(BIT(DMA_SLAVE_BUSWIDTH_1_BYTE) | \
> +				BIT(DMA_SLAVE_BUSWIDTH_2_BYTES) | \
> +				BIT(DMA_SLAVE_BUSWIDTH_3_BYTES) | \
> +				BIT(DMA_SLAVE_BUSWIDTH_4_BYTES))
> +
>  static int cppi41_dma_probe(struct platform_device *pdev)
>  {
>  	struct cppi41_dd *cdd;
> @@ -926,6 +931,10 @@ static int cppi41_dma_probe(struct platform_device *pdev)
>  	cdd->ddev.device_issue_pending = cppi41_dma_issue_pending;
>  	cdd->ddev.device_prep_slave_sg = cppi41_dma_prep_slave_sg;
>  	cdd->ddev.device_terminate_all = cppi41_stop_chan;
> +	cdd->ddev.directions = BIT(DMA_DEV_TO_MEM) | BIT(DMA_MEM_TO_DEV);
> +	cdd->ddev.src_addr_widths = CPPI41_DMA_BUSWIDTHS;
> +	cdd->ddev.dst_addr_widths = CPPI41_DMA_BUSWIDTHS;
> +	cdd->ddev.residue_granularity = DMA_RESIDUE_GRANULARITY_BURST;
>  	cdd->ddev.dev = dev;
>  	INIT_LIST_HEAD(&cdd->ddev.channels);
>  	cpp41_dma_info.dma_cap = cdd->ddev.cap_mask;
> -- 
> 2.3.0
> 

-- 
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux