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: 2644101 Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 9AAE5DFB79 for ; Fri, 31 May 2013 13:56:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751014Ab3EaN46 (ORCPT ); Fri, 31 May 2013 09:56:58 -0400 Received: from moutng.kundenserver.de ([212.227.17.8]:60870 "EHLO moutng.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750946Ab3EaN44 (ORCPT ); Fri, 31 May 2013 09:56:56 -0400 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 Cc: linux-arm-kernel@lists.infradead.org, Arnd Bergmann , Guennadi Liakhovetski , Chris Ball , Samuel Ortiz , Simon Horman 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 Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.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