From: peter.ujfalusi@ti.com (Peter Ujfalusi)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3 01/10] platform_data: edma: Be precise with the paRAM struct
Date: Tue, 27 May 2014 13:22:49 +0300 [thread overview]
Message-ID: <53846779.4070204@ti.com> (raw)
In-Reply-To: <CAOesGMg43jT6D_ot2tKfRXXgAgwqs5Pu_tAFKc35yxLAczrzGQ@mail.gmail.com>
On 05/27/2014 12:32 AM, Olof Johansson wrote:
> Hi,
>
> On Mon, Apr 14, 2014 at 4:41 AM, Peter Ujfalusi <peter.ujfalusi@ti.com> wrote:
>> The edmacc_param struct should follow the layout of the paRAM area in the
>> HW. Be explicit on the size of the fields (u32) and also mark the struct
>> as packed to avoid any padding on non 32bit architectures.
>>
>> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
>> Acked-by: Joel Fernandes <joelf@ti.com>
>> ---
>> include/linux/platform_data/edma.h | 18 +++++++++---------
>> 1 file changed, 9 insertions(+), 9 deletions(-)
>>
>> diff --git a/include/linux/platform_data/edma.h b/include/linux/platform_data/edma.h
>> index f50821cb64be..923f8a3e4ce0 100644
>> --- a/include/linux/platform_data/edma.h
>> +++ b/include/linux/platform_data/edma.h
>> @@ -43,15 +43,15 @@
>>
>> /* PaRAM slots are laid out like this */
>> struct edmacc_param {
>> - unsigned int opt;
>> - unsigned int src;
>> - unsigned int a_b_cnt;
>> - unsigned int dst;
>> - unsigned int src_dst_bidx;
>> - unsigned int link_bcntrld;
>> - unsigned int src_dst_cidx;
>> - unsigned int ccnt;
>> -};
>> + u32 opt;
>> + u32 src;
>> + u32 a_b_cnt;
>> + u32 dst;
>> + u32 src_dst_bidx;
>> + u32 link_bcntrld;
>> + u32 src_dst_cidx;
>> + u32 ccnt;
>> +} __packed;
>>
>> /* fields in edmacc_param.opt */
>> #define SAM BIT(0)
>
> I came across this patch when I was looking at a pull request from
> Sekhar for EDMA cleanups, and it made me look closer at the contents
> of this file.
>
> The include/linux/platform_data/ directory is meant to hold
> platform_data definitions for drivers, and nothing more.
> platform_data/edma.h also contains a whole bunch of interface
> definitions for the driver. They do not belong there, and should be
> moved to a different include file.
>
> That also includes the above struct, because as far as I can tell it's
> a runtime state structure, not something that is passed in with
> platform data.
>
> Can someone please clean this up? Thanks.
I think Joel is working on to move/merge the code from arch/arm/common/edma.c
to drivers/dma/edma.c
I'm sure within this work he is going to clean up the header file as well.
As a first step I think the non platform_data content can be moved as
include/linux/edma.h or probably as ti-edma.h?
--
P?ter
next prev parent reply other threads:[~2014-05-27 10:22 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-14 11:41 [PATCH v3 00/10] dma: edma: Fixes for cyclic (audio) operation Peter Ujfalusi
2014-04-14 11:41 ` [PATCH v3 01/10] platform_data: edma: Be precise with the paRAM struct Peter Ujfalusi
2014-05-26 21:32 ` Olof Johansson
2014-05-27 10:22 ` Peter Ujfalusi [this message]
2014-05-27 15:03 ` Joel Fernandes
2014-05-28 10:31 ` Peter Ujfalusi
2014-04-14 11:41 ` [PATCH v3 02/10] arm: common: edma: Save the number of event queues/TCs Peter Ujfalusi
2014-04-14 11:41 ` [PATCH v3 03/10] dmaengine: edma: Correct the handling of src/dst_maxburst == 0 Peter Ujfalusi
2014-04-14 11:41 ` [PATCH v3 04/10] dmaengine: edma: Add support for DMA_PAUSE/RESUME operation Peter Ujfalusi
2014-04-14 11:42 ` [PATCH v3 05/10] dmaengine: edma: Set DMA_CYCLIC capability flag Peter Ujfalusi
2014-04-14 11:42 ` [PATCH v3 06/10] dmaengine: edma: Implement device_slave_caps callback Peter Ujfalusi
2014-04-14 11:42 ` [PATCH v3 07/10] dmaengine: edma: Reduce debug print verbosity for non verbose debugging Peter Ujfalusi
2014-04-14 11:42 ` [PATCH v3 08/10] dmaengine: edma: Prefix debug prints where the text were identical in prep callbacks Peter Ujfalusi
2014-04-14 11:42 ` [PATCH v3 09/10] dmaengine: edma: Add channel number to debug prints Peter Ujfalusi
2014-04-22 16:02 ` Vinod Koul
2014-04-14 11:42 ` [PATCH v3 10/10] dmaengine: edma: Print the direction value as well when it is not supported Peter Ujfalusi
2014-04-16 18:11 ` [PATCH v3 00/10] dma: edma: Fixes for cyclic (audio) operation Joel Fernandes
2014-04-21 16:54 ` Joel Fernandes
2014-04-22 16:03 ` Vinod Koul
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=53846779.4070204@ti.com \
--to=peter.ujfalusi@ti.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).