From: jassisinghbrar@gmail.com (Jassi Brar)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/6] S3C: DMA: Add api driver for PL330
Date: Tue, 18 May 2010 10:59:27 +0900 [thread overview]
Message-ID: <AANLkTik76NKK3tOeFSDoRK5MrT8pd68yn78I0ZO4KTNd@mail.gmail.com> (raw)
In-Reply-To: <20100517084021.GC6684@trinity.fluff.org>
On Mon, May 17, 2010 at 5:40 PM, Ben Dooks <ben-linux@fluff.org> wrote:
> On Mon, May 17, 2010 at 10:35:39AM +0900, Jassi Brar wrote:
>> +/*
>> + * The platforms just need to provide this info
>> + * to the S3C DMA API driver for PL330.
>
> would be heklpful to describe what this information actually
> means, including how it helps to configure the hardware appropriately.
Ok
......
>> +struct s3c_pl330_dmac {
>> + ? ? struct pl330_info *pi;
>> + ? ? /* Number of channels currently busy */
>> + ? ? unsigned busy_chan;
>> + ? ? /* To attach to the global list of DMACs */
>> + ? ? struct list_head node;
>> + ? ? /* List of IDs of peripherals this DMAC can work with */
>> + ? ? enum dma_ch *peri;
>> + ? ? /* Pool to quickly allocate xfers for all channels in the dmac */
>> + ? ? struct kmem_cache *kmcache;
>> +};
>
> I would prefer to see kerneldoc style documentation for this
> if possible.
Ok.
......
>> + ? ? ch = kmalloc(sizeof(*ch), GFP_KERNEL);
>> + ? ? /* Return silently to work with other channels */
>> + ? ? if (!ch)
>> + ? ? ? ? ? ? return;
>> +
>> + ? ? ch->id = id;
>> + ? ? ch->dmac = NULL;
>> +
>
> should you init the list entry before adding it?
sorry, I am unable to see any problem with what I do.
Am I overlooking something?
.....
>> +/*
>> + * Measure of suitability of 'dmac' handling 'ch'
>> + *
>> + * 0 indicates 'dmac' can not handle 'ch' either
>> + * because it is not supported by the hardware or
>> + * because all dmac channels are currently busy.
>> + *
>> + * >0 vlaue indicates 'dmac' has the capability.
>> + * The bigger the value the more suitable the dmac.
>> + */
>> +typedef u8 suit;
>> +#define MAX_SUIT ? ? 255
>> +#define MIN_SUIT ? ? 0
>
> hmm, would oprfer to see this as a simple integer.
Ok.
......
>> + ? ? /* If there was only one node left */
>> + ? ? if (t == xfer)
>> + ? ? ? ? ? ? ch->xfer_head = NULL;
>> + ? ? else if (ch->xfer_head == xfer)
>> + ? ? ? ? ? ? ch->xfer_head = t;
>> +
>> + ? ? list_del(&xfer->node);
>> +}
>
> couldn't xfer_head be infered from the transfer list?
Not if we are to support S3C2410_DMAF_CIRCULAR.
thanks
next prev parent reply other threads:[~2010-05-18 1:59 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-17 1:35 [PATCHESv2] S3C: DMA: Support for PL330 Jassi Brar
2010-05-17 1:35 ` [PATCH 1/6] S3C: DMA: Change argument of s3c2410_dma_devconfig Jassi Brar
2010-05-17 1:35 ` [PATCH 2/6] S3C: DMA: Add api driver for PL330 Jassi Brar
2010-05-17 3:44 ` Kyungmin Park
2010-05-17 3:55 ` Jassi Brar
2010-05-17 8:25 ` Ben Dooks
2010-05-17 8:40 ` Ben Dooks
2010-05-18 1:59 ` Jassi Brar [this message]
2010-05-17 1:35 ` [PATCH 3/6] S5PC100: DMA: Add platform devices for PL330 DMACs Jassi Brar
2010-05-17 1:35 ` [PATCH 4/6] S5P6440: " Jassi Brar
2010-05-17 1:36 ` [PATCH 5/6] S5P6442: " Jassi Brar
2010-05-17 1:36 ` [PATCH 6/6] S5PV210: " Jassi Brar
-- strict thread matches above, loose matches on Subject: below --
2010-05-18 2:58 [PATCHESv3] S3C: DMA: Support for PL330 Jassi Brar
2010-05-18 2:59 ` [PATCH 2/6] S3C: DMA: Add api driver " Jassi Brar
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=AANLkTik76NKK3tOeFSDoRK5MrT8pd68yn78I0ZO4KTNd@mail.gmail.com \
--to=jassisinghbrar@gmail.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).