From: "Noralf Trønnes" <noralf@tronnes.org>
To: linux-rpi-kernel@lists.infradead.org
Cc: Alexander Stein <alexanders83@web.de>,
Stefan Wahren <info@lategoodbye.de>,
dmaengine@vger.kernel.org, vinod.koul@intel.com,
dan.j.williams@intel.com, jonathan@raspberrypi.org,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Stephen Warren <swarren@wwwdotorg.org>
Subject: Re: [PATCH] dmaengine: bcm2835: Add slave dma support
Date: Fri, 17 Apr 2015 00:03:30 +0200 [thread overview]
Message-ID: <553031B2.1090103@tronnes.org> (raw)
In-Reply-To: <8408334.G8cbCZ65GO@kongar>
Den 16.04.2015 21:06, skrev Alexander Stein:
> Hi Stefan,
>
> On Wednesday 15 April 2015, 21:00:26 wrote Stefan Wahren:
>> Am 15.04.2015 um 11:56 schrieb Noralf Trønnes:
>>> Add slave transfer capability to BCM2835 dmaengine driver.
>>> This patch is pulled from the bcm2708-dmaengine driver in the
>>> Raspberry Pi repo. The work was done by Gellert Weisz.
>>>
>>> Tested with the bcm2835-mmc driver from the same repo.
>> why not with the upstream kernel?
> I also looked at slave dma support, especially for use in mmc. It turns our that bcm2835-mmc is written more or less completly new.
> Mainline linux uses sdhci "framework" which internally uses the SDMA and/or ADMA (both internal, to SD/MMC controller, DMA units) which can be supported by an SDHCI compatible controller.
> AFAIK the SD/MMC controller in bcm2835 lacks both that is why the driver only uses PIO. I dunno if external DMA usage can so easily be integrated into the sdhci, I have my doubts.
I asked Jonathan Bell (Raspberry Pi) about why a new driver was made
instead of extending sdhci-bcm2835.
On 10.04.2015 20:02, Jonathan Bell wrote:
> Basically, it's impossible to integrate platform DMA channel support
> within the SDHCI framework. The Arasan controller (and the Broadcom
> MMCI controller) both use platform DMA channels to pump data to/from
> the host FIFO. Our old "sdhci-bcm2708" driver basically hacked sdhci.c
> to allow platform DMA support in a way that was guaranteed to cause
> merge conflicts with every new kernel branch. The reasoning behind
> creating an MMC-level driver was to minimise disruption of incorporating
> platform DMA and to have additional control e.g. on sequencing of
commands
> that are known to have bugs/problems. There are drivers in the source
> tree that are "SDHCI compliant" but have their own various idiosyncrasies
> - e.g. :
http://lxr.free-electrons.com/source/drivers/mmc/host/davinci_mmc.c
> Implementing an MMC-level driver was the easiest way to incorporate all
> our various bits of baggage (random necessary delays here, busy-wait
there)
> without disrupting the rest of the codebase. I agree that some functions
> could just substitute the sdhci.c equivalents and deduplicate some of
the code.
Stephen Warren made this comment on a previous attempt to upstream the
bcm2835-mmc driver:
On Tue, 28 Oct 2014 19:55:20 -0600, Stephen Warren wrote:
> On 10/28/2014 06:00 PM, Piotr Król wrote:
> > This is driver for Arasan External Mass Media Controller provided in
> > Raspberry Pi single board computer.
>
> We should not have multiple drivers for the same HW. The correct
> approach would be to enhance the existing sdhci-bcm2835.c to support any
> new features or bug-fixes embodied within this driver. Presumably that
> way, you'd also end up with a lot of small feature patches, which would
> make patch review easier. Consequently I haven't reviewed this patch
much.
next prev parent reply other threads:[~2015-04-16 22:03 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-15 9:56 [PATCH] dmaengine: bcm2835: Add slave dma support Noralf Trønnes
2015-04-15 14:37 ` Martin Sperl
2015-04-15 18:53 ` Noralf Trønnes
2015-04-16 6:30 ` Rogier Wolff
2015-04-16 17:28 ` Noralf Trønnes
2015-04-15 19:00 ` Stefan Wahren
2015-04-16 19:06 ` Alexander Stein
2015-04-16 22:03 ` Noralf Trønnes [this message]
2015-04-16 22:09 ` Noralf Trønnes
2015-04-17 17:08 ` Stefan Wahren
2015-04-17 17:19 ` Martin Sperl
2015-04-17 17:20 ` Noralf Trønnes
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=553031B2.1090103@tronnes.org \
--to=noralf@tronnes.org \
--cc=alexanders83@web.de \
--cc=dan.j.williams@intel.com \
--cc=dmaengine@vger.kernel.org \
--cc=info@lategoodbye.de \
--cc=jonathan@raspberrypi.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rpi-kernel@lists.infradead.org \
--cc=swarren@wwwdotorg.org \
--cc=vinod.koul@intel.com \
/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.