Re: [PATCH v3 2/5] dmaengine: sun6i: Add 4 as a possible burst value for the H3

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

 



On Fri, Mar 18, 2016 at 03:12:26PM +0100, Jean-Francois Moine wrote:
> The H3 accepts 4 as a burst value.
> 
> Signed-off-by: Jean-Francois Moine <moinejf@xxxxxxx>
> ---
>  drivers/dma/sun6i-dma.c | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/drivers/dma/sun6i-dma.c b/drivers/dma/sun6i-dma.c
> index ce1e4d6..9378fda 100644
> --- a/drivers/dma/sun6i-dma.c
> +++ b/drivers/dma/sun6i-dma.c
> @@ -101,6 +101,7 @@ struct sun6i_dma_config {
>  	u32 nr_max_channels;
>  	u32 nr_max_requests;
>  	u32 nr_max_vchans;
> +	u32 burst_4;
>  };
>  
>  /*
> @@ -238,6 +239,8 @@ static inline s8 convert_burst(u32 maxburst)
>  	switch (maxburst) {
>  	case 1:
>  		return 0;
> +	case 4:
> +		return 1;
>  	case 8:
>  		return 2;
>  	default:
> @@ -470,6 +473,10 @@ static int set_config(struct sun6i_dma_dev *sdev,
>  {
>  	s8 src_width, dst_width, src_burst, dst_burst;
>  
> +	if (!sdev->cfg->burst_4 &&
> +	    (sconfig->src_maxburst == 4 || sconfig->dst_maxburst == 4))
> +		return -EINVAL;
> +

I still believe this should be dealt with at the framework level.

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux PCI]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux