From: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
To: linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 1/2] ARM: shmobile: sdhi: pass DMA filter from platform code
Date: Fri, 07 Jun 2013 10:25:11 +0000 [thread overview]
Message-ID: <Pine.LNX.4.64.1306071222250.11277@axis700.grange> (raw)
In-Reply-To: <1370008605-3745603-1-git-send-email-arnd@arndb.de>
Hi Arnd
On Fri, 31 May 2013, Arnd Bergmann wrote:
> Since eec95ee2261 "mmc: sdhi/tmio: switch to using
> dmaengine_slave_config()", we are getting a link error with
> a number of shmobile configurations that turn on the sdhi
> driver but the not the SH_DMAE_BASE driver.
>
> The reason is that the driver now incorrectly refers to
> a global filter function that should be referenced only
> by platform code:
>
> drivers/built-in.o: In function `sh_mobile_sdhi_probe':
> drivers/mmc/host/sh_mobile_sdhi.c:202: undefined reference to `shdma_chan_filter'
> drivers/mmc/host/sh_mobile_sdhi.c:202: undefined reference to `shdma_chan_filter'
>
> The fix is to move the pointer to the filter function out
> of the driver, similar to how we do it for most other
> platforms. This makes the driver almost independent
> of the underlying dma engine, besides the fact that
> it tries to pass the same number both into the filter
> function and into slave config, which only works on
> some DMA engine drivers.
>
> Since the bug is only present on the mmc tree, I think
> the fix should be applied there as well.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Cc: Guennadi Liakhovetski <g.liakhovetski+renesas@gmail.com>
> Cc: Chris Ball <cjb@laptop.org>
> Cc: Samuel Ortiz <sameo@linux.intel.com>
> Cc: Simon Horman <horms+renesas@verge.net.au>
> ---
> arch/arm/mach-shmobile/board-ag5evm.c | 4 ++++
> arch/arm/mach-shmobile/board-ap4evb.c | 7 +++++++
> arch/arm/mach-shmobile/board-armadillo800eva.c | 7 +++++++
> arch/arm/mach-shmobile/board-kzm9g.c | 7 +++++++
> arch/arm/mach-shmobile/board-mackerel.c | 10 ++++++++++
> drivers/mmc/host/sh_mobile_sdhi.c | 9 ++++++++-
> include/linux/mmc/sh_mobile_sdhi.h | 1 +
> 7 files changed, 44 insertions(+), 1 deletion(-)
>
> diff --git a/arch/arm/mach-shmobile/board-ag5evm.c b/arch/arm/mach-shmobile/board-ag5evm.c
> index c754071..ad01651 100644
> --- a/arch/arm/mach-shmobile/board-ag5evm.c
> +++ b/arch/arm/mach-shmobile/board-ag5evm.c
> @@ -42,6 +42,7 @@
> #include <linux/mmc/sh_mobile_sdhi.h>
> #include <linux/mfd/tmio.h>
> #include <linux/sh_clk.h>
> +#include <linux/sh_dma.h>
> #include <linux/irqchip/arm-gic.h>
> #include <video/sh_mobile_lcdc.h>
> #include <video/sh_mipi_dsi.h>
> @@ -403,8 +404,11 @@ static struct regulator_consumer_supply fixed2v8_power_consumers[] >
> /* SDHI0 */
> static struct sh_mobile_sdhi_info sdhi0_info = {
> +#ifdef CONFIG_SH_DMAE_BASE
Right, that's the problem, I think. Don't think we want these #ifdefs in
all shdma users - under arch/arm and arch/sh. That's why I think we need
my fix in the first place to fix the compile breakage. After that we can
think about improving DMA slave driver decoupling from specific DMAC
drivers - if at all needed.
> .dma_slave_tx = SHDMA_SLAVE_SDHI0_TX,
> .dma_slave_rx = SHDMA_SLAVE_SDHI0_RX,
> + .dma_filter = shdma_chan_filter,
> +#endif
> .tmio_flags = TMIO_MMC_HAS_IDLE_WAIT | TMIO_MMC_USE_GPIO_CD,
> .tmio_caps = MMC_CAP_SD_HIGHSPEED,
> .tmio_ocr_mask = MMC_VDD_27_28 | MMC_VDD_28_29,
[snip]
Thanks
Guennadi
---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/
next prev parent reply other threads:[~2013-06-07 10:25 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-31 13:56 [PATCH 1/2] ARM: shmobile: sdhi: pass DMA filter from platform code Arnd Bergmann
2013-05-31 13:56 ` [PATCH 2/2] ARM: shmobile: sdhi: remove DMA hardware dependencies Arnd Bergmann
2013-05-31 13:58 ` Arnd Bergmann
2013-06-07 10:22 ` Guennadi Liakhovetski
2013-06-07 12:59 ` Arnd Bergmann
2013-06-07 13:12 ` Guennadi Liakhovetski
2013-06-07 14:53 ` Arnd Bergmann
2013-06-07 15:32 ` Guennadi Liakhovetski
2013-06-07 16:06 ` Arnd Bergmann
2013-06-19 19:51 ` Guennadi Liakhovetski
2013-06-19 21:51 ` Arnd Bergmann
2013-06-26 10:10 ` DMA channels (was Re: [PATCH 2/2] ARM: shmobile: sdhi: remove DMA hardware dependencies) Guennadi Liakhovetski
2013-06-26 14:35 ` Arnd Bergmann
2013-06-26 16:00 ` Vinod Koul
2013-05-31 14:52 ` [PATCH 1/2] ARM: shmobile: sdhi: pass DMA filter from platform code Guennadi Liakhovetski
2013-05-31 15:11 ` Arnd Bergmann
2013-05-31 15:30 ` Guennadi Liakhovetski
2013-05-31 16:02 ` Arnd Bergmann
2013-06-05 8:28 ` Guennadi Liakhovetski
2013-06-07 10:25 ` Guennadi Liakhovetski [this message]
2013-06-07 12:52 ` Arnd Bergmann
2013-06-07 13:01 ` Guennadi Liakhovetski
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=Pine.LNX.4.64.1306071222250.11277@axis700.grange \
--to=g.liakhovetski@gmx.de \
--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).