From patchwork Fri May 31 13:56:44 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 2644121 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) by patchwork2.kernel.org (Postfix) with ESMTP id E2828DFB79 for ; Fri, 31 May 2013 13:58:14 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UiPpw-0005YH-NG; Fri, 31 May 2013 13:57:45 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UiPpn-0002Yq-BR; Fri, 31 May 2013 13:57:35 +0000 Received: from moutng.kundenserver.de ([212.227.17.8]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UiPpc-0002XA-NV for linux-arm-kernel@lists.infradead.org; Fri, 31 May 2013 13:57:27 +0000 Received: from wuerfel.lan (HSI-KBW-095-208-002-043.hsi5.kabel-badenwuerttemberg.de [95.208.2.43]) by mrelayeu.kundenserver.de (node=mrbap0) with ESMTP (Nemesis) id 0LoKNd-1UBZ7L24q1-00gE1p; Fri, 31 May 2013 15:56:50 +0200 From: Arnd Bergmann To: linux-sh@vger.kernel.org Subject: [PATCH 1/2] ARM: shmobile: sdhi: pass DMA filter from platform code Date: Fri, 31 May 2013 15:56:44 +0200 Message-Id: <1370008605-3745603-1-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 1.8.1.2 X-Provags-ID: V02:K0:F8kZOlOx7+JelkgMRYx5YYe9j/Y4SKNFtx8ZOHNurAB NQAc48z4DvOOmAQ+e5xbX1wp7RUUo+Vdn0sYgBRgxIG7iLjr63 TBfI7TokHX0k/8bN2sozeMVrN1RGmG5Dd65h/a4DHpaQ4Yr+z4 vss86ClJ5Fz37/ycBQ73veCemI05nLIJ0yBWVmR8uYjxMDOt4A HrycSqf1eqaTJsN1Schkbze1zddgDK4pbLcPi2n7E6FBKBgUAk 3NJwAX0TV9dWMh0+RifK5I1hdTUMNGzjoOKCHsI3IWUM+PPbWu ukuZRoxnJnJrFEGO9fDEc26s6r5J51rYSo1TAfuYLIXPpHsZwx OSNmb9dcb3f+uNNXbaNWKoJAAIHOg2/EudOwXk8M2 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130531_095725_084109_7A86840A X-CRM114-Status: GOOD ( 23.26 ) X-Spam-Score: -1.9 (-) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-1.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [212.227.17.8 listed in list.dnswl.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: Samuel Ortiz , Arnd Bergmann , Guennadi Liakhovetski , Simon Horman , Chris Ball , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org 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 Cc: Guennadi Liakhovetski Cc: Chris Ball Cc: Samuel Ortiz Cc: Simon Horman --- 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 #include #include +#include #include #include