From patchwork Sun Dec 12 13:52:24 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Ball X-Patchwork-Id: 400872 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id oBCDqRE8019588 for ; Sun, 12 Dec 2010 13:52:28 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752892Ab0LLNw0 (ORCPT ); Sun, 12 Dec 2010 08:52:26 -0500 Received: from void.printf.net ([89.145.121.20]:35250 "EHLO void.printf.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752736Ab0LLNw0 (ORCPT ); Sun, 12 Dec 2010 08:52:26 -0500 Received: from chris by void.printf.net with local (Exim 4.69) (envelope-from ) id 1PRmLg-0008IZ-Ec; Sun, 12 Dec 2010 13:52:24 +0000 Date: Sun, 12 Dec 2010 13:52:24 +0000 From: Chris Ball To: Will Newton Cc: Linux Kernel list , linux-mmc@vger.kernel.org, Matt Fleming , linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH] dw_mmc: Add Synopsys DesignWare mmc host driver. Message-ID: <20101212135224.GA31812@void.printf.net> References: <20101208115510.GD10998@console-pimps.org> <20101209064751.GA21128@void.printf.net> <20101209160157.GA28586@void.printf.net> <20101211192320.GA24430@void.printf.net> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.18 (2008-05-17) Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Sun, 12 Dec 2010 13:52:28 +0000 (UTC) diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c index 7de6b42..526b5cb 100644 --- a/drivers/mmc/host/dw_mmc.c +++ b/drivers/mmc/host/dw_mmc.c @@ -988,10 +988,11 @@ static void dw_mci_pull_data32(struct dw_mci *host, void *buf, int cnt) *pData++ = mci_readl(host, DATA); cnt--; } } +#if BITS_PER_LONG >= 64 static void dw_mci_push_data64(struct dw_mci *host, void *buf, int cnt) { u64 *pData = (u64 *)buf; WARN_ON(cnt % 8 != 0); @@ -1013,10 +1014,11 @@ static void dw_mci_pull_data64(struct dw_mci *host, void *buf, int cnt) while (cnt > 0) { *pData++ = mci_readq(host, DATA); cnt--; } } +#endif static void dw_mci_read_data_pio(struct dw_mci *host) { struct scatterlist *sg = host->sg; void *buf = sg_virt(sg); @@ -1591,15 +1593,17 @@ static int dw_mci_probe(struct platform_device *pdev) if (!i) { host->push_data = dw_mci_push_data16; host->pull_data = dw_mci_pull_data16; width = 16; host->data_shift = 1; +#if BITS_PER_LONG >= 64 } else if (i == 2) { host->push_data = dw_mci_push_data64; host->pull_data = dw_mci_pull_data64; width = 64; host->data_shift = 3; +#endif } else { /* Check for a reserved value, and warn if it is */ WARN((i != 1), "HCON reports a reserved host data width!\n" "Defaulting to 32-bit access.\n");