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: 1375911 Return-Path: X-Original-To: patchwork-linux-mmc@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 1A09B3FC71 for ; Sun, 26 Aug 2012 22:25:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753317Ab2HZWZZ (ORCPT ); Sun, 26 Aug 2012 18:25:25 -0400 Received: from bosmailout07.eigbox.net ([66.96.189.7]:42652 "EHLO bosmailout07.eigbox.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753122Ab2HZWZY (ORCPT ); Sun, 26 Aug 2012 18:25:24 -0400 X-Greylist: delayed 2398 seconds by postgrey-1.27 at vger.kernel.org; Sun, 26 Aug 2012 18:25:24 EDT Received: from bosmailscan13.eigbox.net ([10.20.15.13]) by bosmailout07.eigbox.net with esmtp (Exim) id 1T5ke5-0001yt-7V for linux-mmc@vger.kernel.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" CC: egtvedt@samfundet.no, Havard Skinnemoen , "linux-mmc@vger.kernel.org" , linux-arm-kernel@lists.infradead.org, Chris Ball 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 Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.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 --- 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;