From: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
To: Serge Semin <fancer.lancer@gmail.com>
Cc: Frank Li <Frank.Li@nxp.com>,
Serge Semin <Sergey.Semin@baikalelectronics.ru>,
gustavo.pimentel@synopsys.com, hongxing.zhu@nxp.com,
l.stach@pengutronix.de, linux-imx@nxp.com,
linux-pci@vger.kernel.org, dmaengine@vger.kernel.org,
lznuaa@gmail.com, vkoul@kernel.org, lorenzo.pieralisi@arm.com,
robh@kernel.org, kw@linux.com, bhelgaas@google.com,
shawnguo@kernel.org
Subject: Re: [PATCH v3 1/6] dmaengine: dw-edma: fix dw_edma_probe() can't be call globally
Date: Thu, 10 Mar 2022 11:52:42 +0530 [thread overview]
Message-ID: <20220310062242.GB4869@thinkpad> (raw)
In-Reply-To: <20220309190123.dnivojpqhl52o5vc@mobilestation>
On Wed, Mar 09, 2022 at 10:01:23PM +0300, Serge Semin wrote:
[...]
> > I'm afraid that this will not work for all cases (unless I miss something). As
> > Zhi Li pointed out, there are places where only chip pointer will be passed and
> > we'd need to extract the private data (dw_edma) from it.
> >
> > Tbh I also considered your idea but because of the above mentioned issue and
> > also referring to other implementations like gpiochip, I settled with Frank's
> > idea of copying the fields.
>
> What places are these? I see the only obstacle is the dw_edma_remove()
> method. But it's easily fixable.
Yeah, right. I overlooked that part.
> Except that, everything else is more
> or less straightforward (just a few methods need to have prototypes
> converted to accepting dw_edma instead dw_edma_chip).
>
> In order to make the code design more coherent, we need to split up
> private data and device/platform info. As I see it dw_edma_chip is
> nothing but a chip info data. The eDMA driver is supposed to mainly
> use and pass it's private data, not the platform info. It will greatly
> improve the code readability and maintainability. Such approach will
> also prevent a temptation of adding new private data fields into the
> dw_edma_chip structure since reaching the pointer to dw_edma will be
> much easier that getting the dw_edma_chip data. In this case
> dw_edma_chip will be something like i2c_board_info in i2c.
>
> Ideally dw_edma_chip could be a temporarily defined device info, which
> memory after the dw_edma_probe() method invocation could be freed. But
> in order to implement that we'd need a bit more modifications
> introduced.
>
While at it, we should also consider adding an ops structure for passing the
callbacks from controller drivers. Currently the eDMA driver has the callbacks
defined in v0-core.c but it is used directly instead of as a callback.
This should anyway needs to be fixed when another version of the IP get's added.
Thanks,
Mani
next prev parent reply other threads:[~2022-03-10 6:22 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-07 22:47 [PATCH v3 1/6] dmaengine: dw-edma: fix dw_edma_probe() can't be call globally Frank Li
2022-03-07 22:47 ` [PATCH v3 2/6] dmaengine: dw-edma-pcie: don't touch internal struct dw_edma Frank Li
2022-03-09 17:25 ` Serge Semin
2022-03-09 17:33 ` Zhi Li
2022-03-07 22:47 ` [PATCH v3 3/6] dmaengine: dw-edma: Fix programming the source & dest addresses for ep Frank Li
2022-03-07 22:47 ` [PATCH v3 4/6] dmaengine: dw-edma: Don't rely on the deprecated "direction" member Frank Li
2022-03-07 22:47 ` [PATCH v3 5/6] dmaengine: dw-edma: add flags at struct dw_edma_chip Frank Li
2022-03-10 7:44 ` Manivannan Sadhasivam
2022-03-10 17:00 ` Zhi Li
2022-03-18 18:40 ` Zhi Li
2022-03-18 19:28 ` Manivannan Sadhasivam
2022-03-10 7:55 ` Manivannan Sadhasivam
2022-03-07 22:47 ` [PATCH v3 6/6] PCI: endpoint: functions/pci-epf-test: Support PCI controller DMA Frank Li
2022-03-09 11:44 ` Manivannan Sadhasivam
2022-03-09 20:44 ` Zhi Li
2022-03-09 13:39 ` [PATCH v3 1/6] dmaengine: dw-edma: fix dw_edma_probe() can't be call globally Serge Semin
2022-03-09 16:37 ` Zhi Li
2022-03-09 18:09 ` Serge Semin
2022-03-09 18:12 ` Manivannan Sadhasivam
2022-03-09 19:01 ` Serge Semin
2022-03-10 6:22 ` Manivannan Sadhasivam [this message]
2022-03-10 8:41 ` Serge Semin
2022-03-10 8:56 ` Manivannan Sadhasivam
2022-03-10 10:51 ` Serge Semin
-- strict thread matches above, loose matches on Subject: below --
2022-03-07 16:24 Frank Li
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=20220310062242.GB4869@thinkpad \
--to=manivannan.sadhasivam@linaro.org \
--cc=Frank.Li@nxp.com \
--cc=Sergey.Semin@baikalelectronics.ru \
--cc=bhelgaas@google.com \
--cc=dmaengine@vger.kernel.org \
--cc=fancer.lancer@gmail.com \
--cc=gustavo.pimentel@synopsys.com \
--cc=hongxing.zhu@nxp.com \
--cc=kw@linux.com \
--cc=l.stach@pengutronix.de \
--cc=linux-imx@nxp.com \
--cc=linux-pci@vger.kernel.org \
--cc=lorenzo.pieralisi@arm.com \
--cc=lznuaa@gmail.com \
--cc=robh@kernel.org \
--cc=shawnguo@kernel.org \
--cc=vkoul@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.