From patchwork Thu Aug 30 16:34:27 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hein_Tibosch X-Patchwork-Id: 1388641 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork2.kernel.org (Postfix) with ESMTP id EAED5DF264 for ; Thu, 30 Aug 2012 17:52:10 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1T78r2-0001Uo-Ip; Thu, 30 Aug 2012 17:48:32 +0000 Received: from casper.infradead.org ([2001:770:15f::2]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1T78qz-0001Ue-Sj for linux-arm-kernel@merlin.infradead.org; Thu, 30 Aug 2012 17:48:30 +0000 Received: from bosmailout09.eigbox.net ([66.96.187.9]) by casper.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1T78qx-00038E-R4 for linux-arm-kernel@lists.infradead.org; Thu, 30 Aug 2012 17:48:28 +0000 Received: from bosmailscan13.eigbox.net ([10.20.15.13]) by bosmailout09.eigbox.net with esmtp (Exim) id 1T78qr-0001tN-BR for linux-arm-kernel@lists.infradead.org; Thu, 30 Aug 2012 13:48:21 -0400 Received: from bosimpout02.eigbox.net ([10.20.55.2]) by bosmailscan13.eigbox.net with esmtp (Exim) id 1T78qq-0003a4-Ak; Thu, 30 Aug 2012 13:48:20 -0400 Received: from bosauthsmtp05.eigbox.net ([10.20.18.5]) by bosimpout02.eigbox.net with NO UCE id t5oL1j00506Zqne015oLHc; Thu, 30 Aug 2012 13:48:20 -0400 X-Authority-Analysis: v=2.0 cv=LI/Rtuq9 c=1 sm=1 a=EVDLJLhrg0sUKeqAW2r0xw==:17 a=bc2JKO6qiGsA:10 a=tW0haWE2Y5YA:10 a=YvWPwR81G34A:10 a=8nJEP1OIZ-IA:10 a=42Im-i64Wx8A:10 a=bJ0fqD8TFZgqkSadqForXVIPBlU=:19 a=TSbVqHtbAAAA:8 a=r3ZZpCBs9D2ufRnqnocA:9 a=wPNLvfGTeEIA:10 a=eBvjjtMVdWwtQGedh7GyLg==:117 X-EN-OrigOutIP: 10.20.18.5 X-EN-IMPSID: t5oL1j00506Zqne015oLHc Received: from [114.79.60.254] (helo=[10.251.242.253]) by bosauthsmtp05.eigbox.net with esmtpa (Exim) id 1T78qo-0004Js-PS; Thu, 30 Aug 2012 13:48:20 -0400 Message-ID: <503F9613.5060007@yahoo.es> Date: Fri, 31 Aug 2012 00:34:27 +0800 From: Hein Tibosch User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/20120824 Thunderbird/15.0 MIME-Version: 1.0 To: Nicolas Ferre , "ludovic.desroches" , Hans-Christian Egtvedt , Havard Skinnemoen , "linux-mmc@vger.kernel.org" , linux-arm-kernel@lists.infradead.org, Chris Ball Subject: [PATCH v2 2/2] mmc: atmel-mci: AP700x PDC is not connected to MCI X-EN-UserInfo: 3946c951b80c12a8be5482963a0b1232:e0ae43bc192b431f8b69f09a37527cbc X-EN-AuthUser: hein@htibosch.net X-EN-OrigIP: 114.79.60.254 X-EN-OrigHost: unknown X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20120830_184827_994991_5B0F982B X-CRM114-Status: GOOD ( 10.75 ) X-Spam-Score: -1.2 (-) X-Spam-Report: SpamAssassin version 3.3.2 on casper.infradead.org summary: Content analysis details: (-1.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (hein_tibosch[at]yahoo.es) 0.0 DKIM_ADSP_CUSTOM_MED No valid author signature, adsp_override is CUSTOM_MED -0.0 SPF_PASS SPF: sender matches SPF record -0.2 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 0.9 NML_ADSP_CUSTOM_MED ADSP custom_med hit, and not from a mailing list X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Earlier, atmel-mci was adapted to make use of the peripheral DMA controller (PDC), in case normal DMA wouldn't work. ( http://comments.gmane.org/gmane.linux.kernel.mmc/9403 ) This works OK on ARM platforms (AT91), but it broke the driver for AVR32, the AP700x. Although the MCI has PDC support, the connection is not done for AVR chips This patch makes the use of PDC depend on CONFIG_AVR32 Signed-off-by: Hein Tibosch Acked-by: Ludovic Desroches --- drivers/mmc/host/atmel-mci-regs.h | 7 +++++++ drivers/mmc/host/atmel-mci.c | 2 +- 2 files changed, 8 insertions(+), 1 deletions(-) diff --git a/drivers/mmc/host/atmel-mci-regs.h b/drivers/mmc/host/atmel-mci-regs.h index ab56f7d..c97001e 100644 --- a/drivers/mmc/host/atmel-mci-regs.h +++ b/drivers/mmc/host/atmel-mci-regs.h @@ -140,6 +140,13 @@ #define atmci_writel(port,reg,value) \ __raw_writel((value), (port)->regs + reg) +/* On AVR chips the Peripheral DMA Controller is not connected to MCI. */ +#ifdef CONFIG_AVR32 +# define ATMCI_PDC_CONNECTED 0 +#else +# define ATMCI_PDC_CONNECTED 1 +#endif + /* * Fix sconfig's burst size according to atmel MCI. We need to convert them as: * 1 -> 0, 4 -> 1, 8 -> 2, 16 -> 3. diff --git a/drivers/mmc/host/atmel-mci.c b/drivers/mmc/host/atmel-mci.c index a6a5593..b8de891 100644 --- a/drivers/mmc/host/atmel-mci.c +++ b/drivers/mmc/host/atmel-mci.c @@ -2208,7 +2208,7 @@ static void __init atmci_get_cap(struct atmel_mci *host) "version: 0x%x\n", version); host->caps.has_dma_conf_reg = 0; - host->caps.has_pdc = 1; + host->caps.has_pdc = ATMCI_PDC_CONNECTED; host->caps.has_cfg_reg = 0; host->caps.has_cstor_reg = 0; host->caps.has_highspeed = 0;