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: 1389191 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 D63563FDF5 for ; Thu, 30 Aug 2012 18:30:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754714Ab2H3S34 (ORCPT ); Thu, 30 Aug 2012 14:29:56 -0400 Received: from bosmailout14.eigbox.net ([66.96.186.14]:52861 "EHLO bosmailout14.eigbox.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753530Ab2H3S3y (ORCPT ); Thu, 30 Aug 2012 14:29:54 -0400 Received: from bosmailscan13.eigbox.net ([10.20.15.13]) by bosmailout14.eigbox.net with esmtp (Exim) id 1T78qr-0001N4-6t for linux-mmc@vger.kernel.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 Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.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 --- 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;