Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1736998
| Path | csiph.com!news.mixmin.net!feeds.phibee-telecom.net!news.panservice.it!bofh.it!news.nic.it!robomod |
|---|---|
| From | Peter Ujfalusi <peter.ujfalusi@ti.com> |
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] dmaengine: edma: Reject slave configs using a buswidth of 8 and larger |
| Date | Thu, 21 Sep 2017 20:30:01 +0200 |
| Message-ID | <useox-4rm-13@gated-at.bofh.it> (permalink) |
| References | <uqIK5-Ea-3@gated-at.bofh.it> <usdiQ-3Se-77@gated-at.bofh.it> |
| Dkim-Signature | v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1506018562; bh=hxOatLU0KAI31C1U1CsnrhzOTGMYg9UnPmEo5VUISGw=; h=Subject:To:References:CC:From:Date:In-Reply-To; b=Clq8GXcZcKvBGx+z3KeaizJGMo/fuqjmAsWBjvYc9E3StB2rzr7OCE4Eeb1w9p4AP PQRpbyYX52XlmuUgiOro2ldyzNats1KWd+b5aj4Ugzl0E9EhTt7X3TSDQhN3WkYrxh 5GOHSaueTB9pG2GK1KmUTu/3R3WWqdUIDSmn5dVo= |
| User-Agent | Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 |
| MIME-Version | 1.0 |
| Content-Type | text/plain; charset="utf-8" |
| Content-Transfer-Encoding | quoted-printable |
| X-Exclaimer-Md-Config | e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 56 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | <dmaengine@vger.kernel.org>, <linux-kernel@vger.kernel.org>, Dan Williams <dan.j.williams@intel.com> |
| X-Original-Date | Thu, 21 Sep 2017 21:29:27 +0300 |
| X-Original-Message-ID | <13ff5f5c-3872-4af5-1baf-205fe01bb0f2@ti.com> |
| X-Original-References | <20170917142510.3111-1-stefan.bruens@rwth-aachen.de> <20170921171743.GI30097@localhost> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1736998 |
Show key headers only | View raw
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
On 2017-09-21 20:17, Vinod Koul wrote:
> On Sun, Sep 17, 2017 at 04:25:10PM +0200, Stefan Brüns wrote:
>> The driver would happily accept buswidth of 16/32/64 bytes and program
>> garbage to its registers.
>
> Peter?
Well, eDMA as such has no limitation on the buswidth, the addr_width
become ACNT, counter for the inner loop - which we use to represent the
word length. In theory we could support 32K-1 long word with eDMA, which
we actually do in case of memcpy.
But the driver does state that it supports bus width of 1, 2, 3 and 4 bytes.
These are form the past and I never felt the need to check them.
I think it is fine to reject salve config when asking for longer dev
width. I might revisit later if the need comes..
Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
>
>>
>> Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
>> ---
>> drivers/dma/edma.c | 4 ++--
>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/dma/edma.c b/drivers/dma/edma.c
>> index 3879f80a4815..c944ea339425 100644
>> --- a/drivers/dma/edma.c
>> +++ b/drivers/dma/edma.c
>> @@ -887,8 +887,8 @@ static int edma_slave_config(struct dma_chan *chan,
>> {
>> struct edma_chan *echan = to_edma_chan(chan);
>>
>> - if (cfg->src_addr_width == DMA_SLAVE_BUSWIDTH_8_BYTES ||
>> - cfg->dst_addr_width == DMA_SLAVE_BUSWIDTH_8_BYTES)
>> + if (cfg->src_addr_width >= DMA_SLAVE_BUSWIDTH_8_BYTES ||
>> + cfg->dst_addr_width >= DMA_SLAVE_BUSWIDTH_8_BYTES)
>> return -EINVAL;
>>
>> memcpy(&echan->cfg, cfg, sizeof(echan->cfg));
>> --
>> 2.14.1
>>
>
- Péter
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] dmaengine: edma: Reject slave configs using a buswidth of 8 and larger Stefan Brüns <stefan.bruens@rwth-aachen.de> - 2017-09-17 16:30 +0200
Re: [PATCH] dmaengine: edma: Reject slave configs using a buswidth of 8 and larger Vinod Koul <vinod.koul@intel.com> - 2017-09-21 19:20 +0200
Re: [PATCH] dmaengine: edma: Reject slave configs using a buswidth of 8 and larger Peter Ujfalusi <peter.ujfalusi@ti.com> - 2017-09-21 20:30 +0200
Re: [PATCH] dmaengine: edma: Reject slave configs using a buswidth of 8 and larger Peter Ujfalusi <peter.ujfalusi@ti.com> - 2017-09-22 08:20 +0200
Re: [PATCH] dmaengine: edma: Reject slave configs using a buswidth of 8 and larger Vinod Koul <vinod.koul@intel.com> - 2017-09-22 10:40 +0200
csiph-web