From: Vinod Koul <vkoul@kernel.org>
To: Gustavo Pimentel <gustavo.pimentel@synopsys.com>
Cc: "linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>,
"dmaengine@vger.kernel.org" <dmaengine@vger.kernel.org>,
Eugeniy Paltsev <eugeniy.paltsev@synopsys.com>,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
Joao Pinto <joao.pinto@synopsys.com>
Subject: [RFC,1/6] dma: Add Synopsys eDMA IP core driver
Date: Tue, 18 Dec 2018 09:24:38 +0530 [thread overview]
Message-ID: <20181218035438.GO2472@vkoul-mobl> (raw)
On 17-12-18, 15:56, Gustavo Pimentel wrote:
> >> +
> >> +#define SET(reg, name, val) \
> >> + reg.name = val
> >> +
> >> +#define SET_BOTH_CH(name, value) \
> >> + do { \
> >> + SET(dw->wr_edma, name, value); \
> >> + SET(dw->rd_edma, name, value); \
> >> + } while (0)
> >
> > I am not sure how this helps, makes things not explicit..
>
> Since this driver has 2 channels (write and read) I'd like to simplify all the
> configurations that I've to make on both channels (avoiding any omission), that
> why I created this macro.
So in order to configure a channel you need to write to both?
> Should I add some comment on top of this macro or do you think that is better to
> replicate the code for each channel?
That will help to explain..
> >> +
> >> + err = ops->device_config(dchan);
> >
> > okay what does this callback do. You are already under and dmaengine fwk
> > so what is the need to add one more abstraction layer, can you explain
> > that in details please
>
> This callback just configures the eDMA HW block interrupt address (abort and
> done) and data for each channel. This callback could easily moved to the
> dw_edma_probe() where each channel is created at first.
> Should I do it in your opinion?
My question is about callbacks in this driver in general. You are
already under a dmaengine fwk, so this is adding one more layer on top
with callbacks implementing low level stiff. Why do we need another layer
is the question..
next reply other threads:[~2018-12-18 3:54 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-18 3:54 Vinod Koul [this message]
-- strict thread matches above, loose matches on Subject: below --
2019-01-03 14:53 [RFC,1/6] dma: Add Synopsys eDMA IP core driver Vinod Koul
2019-01-03 12:55 Gustavo Pimentel
2019-01-03 12:45 Vinod Koul
2019-01-03 9:53 Gustavo Pimentel
2018-12-18 10:58 Gustavo Pimentel
2018-12-17 15:56 Gustavo Pimentel
2018-12-17 7:23 Vinod Koul
2018-12-17 6:51 Vinod Koul
2018-12-13 11:03 Gustavo Pimentel
2018-12-12 23:00 Bjorn Helgaas
2018-12-12 11:13 Gustavo Pimentel
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=20181218035438.GO2472@vkoul-mobl \
--to=vkoul@kernel.org \
--cc=andriy.shevchenko@linux.intel.com \
--cc=dmaengine@vger.kernel.org \
--cc=eugeniy.paltsev@synopsys.com \
--cc=gustavo.pimentel@synopsys.com \
--cc=joao.pinto@synopsys.com \
--cc=linux-pci@vger.kernel.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