devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vinod Koul <vinod.koul-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
To: robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
	mark.rutland-5wv7dgnIgG8@public.gmane.org,
	dan.j.williams-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org,
	dmaengine-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
	baolin.wang-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org
Subject: Re: [PATCH 2/2] dma: Add Spreadtrum DMA controller driver
Date: Tue, 25 Jul 2017 09:08:58 +0530	[thread overview]
Message-ID: <20170725033856.GV3053@localhost> (raw)
In-Reply-To: <20170724064600.GB22149-lxIno14LUO0EEoCn2XhGlw@public.gmane.org>

On Mon, Jul 24, 2017 at 02:46:00PM +0800, Baolin Wang wrote:
> Hi,
> 
> On 六,  7月 22, 2017 at 01:27:31下午 +0530, Vinod Koul wrote:
> > On Tue, Jul 18, 2017 at 03:06:12PM +0800, Baolin Wang wrote:

> > > +static void sprd_dma_set_uid(struct sprd_dma_chn *mchan)
> > > +{
> > > +	struct sprd_dma_dev *sdev = to_sprd_dma_dev(&mchan->chan);
> > > +	u32 dev_id = mchan->dev_id;
> > > +
> > > +	if (dev_id != DMA_SOFTWARE_UID)
> > 
> > Whats a UID?
> 
> It is for users, every user was assigned one unique hardware ID.
> Then the user can trigger the DMA to transfer by the user ID.

sounds like a slave id to me (hint read again struct dma_slave_config)

> > > +	u32 fragmens_len;
> > > +	u32 block_len;
> > 
> > oh please, I think I will stop here now :(
> > 
> > > +	u32 transcation_len;
> > > +	u32 src_step;
> > > +	u32 des_step;
> > > +	u32 src_frag_step;
> > > +	u32 dst_frag_step;
> > > +	u32 src_blk_step;
> > > +	u32 dst_blk_step;
> > > +	u32 wrap_ptr;
> > > +	u32 wrap_to;
> > > +	u32 dev_id;
> > > +	enum dma_end_type is_end;
> > 
> > Looking at this I think these are overkill, many of them can be handled
> > properly by current dmaengine interfaces, so please use those before you
> > invent your own...
> > 
> > Also the code is bloated because you don't use virt-dma, pls use that. I
> > skipped many parts of the driver as I feel driver needs more work.
> 
> OK. I will check the virt-dma. Thanks for your commnets.

Ok, but the bigger concern is that people have defined generic interfaces
for everyone to use, so you should also use them, the hw doesn't seem
anything special which cannot be accommodated in the current fwk, if not do
tell me which parts don't fit before you invent your own interfaces...

-- 
~Vinod
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2017-07-25  3:38 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-18  7:06 [PATCH 1/2] dt-bindings: dma: Add Spreadtrum SC9860 DMA controller Baolin Wang
     [not found] ` <63f2b93b3e484862f736e37d6d422b5566637163.1500361078.git.baolin.wang-lxIno14LUO0EEoCn2XhGlw@public.gmane.org>
2017-07-18  7:06   ` [PATCH 2/2] dma: Add Spreadtrum DMA controller driver Baolin Wang
     [not found]     ` <4331ea088a26f515fe1f1912c568bfd07d539e9d.1500361078.git.baolin.wang-lxIno14LUO0EEoCn2XhGlw@public.gmane.org>
2017-07-21  2:50       ` Chunyan Zhang
     [not found]         ` <CAAfSe-sf=a_tAQm7rrnfUtOePRqvQrkmbN_M0hxSvLQ1KgocMA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-07-21  3:27           ` Baolin Wang
2017-07-22  7:57       ` Vinod Koul
2017-07-24  6:46         ` Baolin Wang
     [not found]           ` <20170724064600.GB22149-lxIno14LUO0EEoCn2XhGlw@public.gmane.org>
2017-07-25  3:38             ` Vinod Koul [this message]
2017-07-25  6:28               ` Baolin Wang
2017-07-24 17:52 ` [PATCH 1/2] dt-bindings: dma: Add Spreadtrum SC9860 DMA controller Rob Herring
2017-07-25  6:23   ` Baolin Wang

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=20170725033856.GV3053@localhost \
    --to=vinod.koul-ral2jqcrhueavxtiumwx3w@public.gmane.org \
    --cc=baolin.wang-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
    --cc=broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=dan.j.williams-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=dmaengine-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=mark.rutland-5wv7dgnIgG8@public.gmane.org \
    --cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.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).