v1: add multiple burst size support. remove previous fixed 32-byte setting.
Qiao Zhou (1):
dma: mmp_tdma: add multiple burst size support for 910-squ
drivers/dma/mmp_tdma.c | 25 ++++++++++++++++++++++++-
1 files changed, 24 insertions(+), 1 deletions(-)
add multiple burst size support for 910-squ.
Signed-off-by: Qiao Zhou <[email protected]>
---
drivers/dma/mmp_tdma.c | 25 ++++++++++++++++++++++++-
1 files changed, 24 insertions(+), 1 deletions(-)
diff --git a/drivers/dma/mmp_tdma.c b/drivers/dma/mmp_tdma.c
index 38cb517..d84354b 100644
--- a/drivers/dma/mmp_tdma.c
+++ b/drivers/dma/mmp_tdma.c
@@ -228,8 +228,31 @@ static int mmp_tdma_config_chan(struct mmp_tdma_chan *tdmac)
return -EINVAL;
}
} else if (tdmac->type == PXA910_SQU) {
- tdcr |= TDCR_BURSTSZ_SQU_32B;
tdcr |= TDCR_SSPMOD;
+
+ switch (tdmac->burst_sz) {
+ case 1:
+ tdcr |= TDCR_BURSTSZ_SQU_1B;
+ break;
+ case 2:
+ tdcr |= TDCR_BURSTSZ_SQU_2B;
+ break;
+ case 4:
+ tdcr |= TDCR_BURSTSZ_SQU_4B;
+ break;
+ case 8:
+ tdcr |= TDCR_BURSTSZ_SQU_8B;
+ break;
+ case 16:
+ tdcr |= TDCR_BURSTSZ_SQU_16B;
+ break;
+ case 32:
+ tdcr |= TDCR_BURSTSZ_SQU_32B;
+ break;
+ default:
+ dev_err(tdmac->dev, "mmp_tdma: unknown burst size.\n");
+ return -EINVAL;
+ }
}
writel(tdcr, tdmac->reg_base + TDCR);
--
1.7.0.4
On Wed, Oct 9, 2013 at 1:40 PM, Qiao Zhou <[email protected]> wrote:
> add multiple burst size support for 910-squ.
>
> Signed-off-by: Qiao Zhou <[email protected]>
> ---
> drivers/dma/mmp_tdma.c | 25 ++++++++++++++++++++++++-
> 1 files changed, 24 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/dma/mmp_tdma.c b/drivers/dma/mmp_tdma.c
> index 38cb517..d84354b 100644
> --- a/drivers/dma/mmp_tdma.c
> +++ b/drivers/dma/mmp_tdma.c
> @@ -228,8 +228,31 @@ static int mmp_tdma_config_chan(struct mmp_tdma_chan *tdmac)
> return -EINVAL;
> }
> } else if (tdmac->type == PXA910_SQU) {
> - tdcr |= TDCR_BURSTSZ_SQU_32B;
> tdcr |= TDCR_SSPMOD;
> +
> + switch (tdmac->burst_sz) {
> + case 1:
> + tdcr |= TDCR_BURSTSZ_SQU_1B;
> + break;
> + case 2:
> + tdcr |= TDCR_BURSTSZ_SQU_2B;
> + break;
> + case 4:
> + tdcr |= TDCR_BURSTSZ_SQU_4B;
> + break;
> + case 8:
> + tdcr |= TDCR_BURSTSZ_SQU_8B;
> + break;
> + case 16:
> + tdcr |= TDCR_BURSTSZ_SQU_16B;
> + break;
> + case 32:
> + tdcr |= TDCR_BURSTSZ_SQU_32B;
> + break;
> + default:
> + dev_err(tdmac->dev, "mmp_tdma: unknown burst size.\n");
> + return -EINVAL;
> + }
Sorry, do I make mistake,
Not find definition TDCR_BURSTSZ_SQU_16B ~
Only find
#define TDCR_BURSTSZ_SQU_32B (0x7 << 6)
Thanks
On 10/10/2013 09:54 PM, zhangfei gao wrote:
> On Wed, Oct 9, 2013 at 1:40 PM, Qiao Zhou <[email protected]> wrote:
>> add multiple burst size support for 910-squ.
>>
>> Signed-off-by: Qiao Zhou <[email protected]>
>> ---
>> drivers/dma/mmp_tdma.c | 25 ++++++++++++++++++++++++-
>> 1 files changed, 24 insertions(+), 1 deletions(-)
>>
>> diff --git a/drivers/dma/mmp_tdma.c b/drivers/dma/mmp_tdma.c
>> index 38cb517..d84354b 100644
>> --- a/drivers/dma/mmp_tdma.c
>> +++ b/drivers/dma/mmp_tdma.c
>> @@ -228,8 +228,31 @@ static int mmp_tdma_config_chan(struct mmp_tdma_chan *tdmac)
>> return -EINVAL;
>> }
>> } else if (tdmac->type == PXA910_SQU) {
>> - tdcr |= TDCR_BURSTSZ_SQU_32B;
>> tdcr |= TDCR_SSPMOD;
>> +
>> + switch (tdmac->burst_sz) {
>> + case 1:
>> + tdcr |= TDCR_BURSTSZ_SQU_1B;
>> + break;
>> + case 2:
>> + tdcr |= TDCR_BURSTSZ_SQU_2B;
>> + break;
>> + case 4:
>> + tdcr |= TDCR_BURSTSZ_SQU_4B;
>> + break;
>> + case 8:
>> + tdcr |= TDCR_BURSTSZ_SQU_8B;
>> + break;
>> + case 16:
>> + tdcr |= TDCR_BURSTSZ_SQU_16B;
>> + break;
>> + case 32:
>> + tdcr |= TDCR_BURSTSZ_SQU_32B;
>> + break;
>> + default:
>> + dev_err(tdmac->dev, "mmp_tdma: unknown burst size.\n");
>> + return -EINVAL;
>> + }
>
> Sorry, do I make mistake,
> Not find definition TDCR_BURSTSZ_SQU_16B ~
> Only find
> #define TDCR_BURSTSZ_SQU_32B (0x7 << 6)
uploaded the wrong version. sorry. I have already submitted the v2
patch. thanks.
>
> Thanks
>
--
Best Regards
Qiao