From patchwork Sun Aug 26 20:22:02 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hein_Tibosch X-Patchwork-Id: 1375881 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 6D487DFABE for ; Sun, 26 Aug 2012 21:48:19 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1T5keD-0000XK-GJ; Sun, 26 Aug 2012 21:45:33 +0000 Received: from bombadil.infradead.org ([2001:4830:2446:ff00:4687:fcff:fea6:5117]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1T5keA-0000XF-Vg for linux-arm-kernel@merlin.infradead.org; Sun, 26 Aug 2012 21:45:31 +0000 Received: from bosmailout13.eigbox.net ([66.96.186.13]) by bombadil.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1T5ke9-0005Xr-0B for linux-arm-kernel@lists.infradead.org; Sun, 26 Aug 2012 21:45:30 +0000 Received: from bosmailscan13.eigbox.net ([10.20.15.13]) by bosmailout13.eigbox.net with esmtp (Exim) id 1T5ke5-00064P-8p for linux-arm-kernel@lists.infradead.org; Sun, 26 Aug 2012 17:45:25 -0400 Received: from bosimpout02.eigbox.net ([10.20.55.2]) by bosmailscan13.eigbox.net with esmtp (Exim) id 1T5ke4-0001Qq-PF; Sun, 26 Aug 2012 17:45:24 -0400 Received: from bosauthsmtp08.eigbox.net ([10.20.18.8]) by bosimpout02.eigbox.net with NO UCE id rZlQ1j0010ASroS01ZlQNV; Sun, 26 Aug 2012 17:45:24 -0400 X-Authority-Analysis: v=2.0 cv=AakG6QrG c=1 sm=1 a=OWwsRfqG41DA94+gJvZMBg==:17 a=bc2JKO6qiGsA:10 a=kfTud4QeKxsA:10 a=sYOGNDXv1OkA:10 a=8nJEP1OIZ-IA:10 a=GEur6dgg4SsA:10 a=bJ0fqD8TFZgqkSadqForXVIPBlU=:19 a=TSbVqHtbAAAA:8 a=c0_SUA6MRfH970XAIVEA:9 a=wPNLvfGTeEIA:10 a=BF10AaGwQl41phDg7WSPyA==:117 X-EN-OrigOutIP: 10.20.18.8 X-EN-IMPSID: rZlQ1j0010ASroS01ZlQNV Received: from [114.79.63.241] (helo=[10.253.148.240]) by bosauthsmtp08.eigbox.net with esmtpa (Exim) id 1T5ke4-0006Hj-3Q; Sun, 26 Aug 2012 17:45:24 -0400 Message-ID: <503A856A.9020303@yahoo.es> Date: Mon, 27 Aug 2012 04:22:02 +0800 From: Hein Tibosch User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:14.0) Gecko/20120713 Thunderbird/14.0 MIME-Version: 1.0 To: Nicolas Ferre , "ludovic.desroches" Subject: [PATCH 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.63.241 X-EN-OrigHost: unknown X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20120826_174529_145010_196BCE60 X-CRM114-Status: GOOD ( 12.98 ) X-Spam-Score: -1.2 (-) X-Spam-Report: SpamAssassin version 3.3.2 on bombadil.infradead.org summary: Content analysis details: (-1.2 points) 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 Cc: Havard Skinnemoen , "linux-mmc@vger.kernel.org" , Chris Ball , linux-arm-kernel@lists.infradead.org, egtvedt@samfundet.no 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 adapter 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. 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 66e9fdc..702ab5c 100644 --- a/drivers/mmc/host/atmel-mci.c +++ b/drivers/mmc/host/atmel-mci.c @@ -2205,7 +2205,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;