From patchwork Sun Jul 22 20:47:05 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Chris Ball X-Patchwork-Id: 1224971 Return-Path: X-Original-To: patchwork-linux-mmc@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 9E7FCE0039 for ; Sun, 22 Jul 2012 20:47:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752597Ab2GVUrL (ORCPT ); Sun, 22 Jul 2012 16:47:11 -0400 Received: from void.printf.net ([89.145.121.20]:45485 "EHLO void.printf.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752581Ab2GVUrL convert rfc822-to-8bit (ORCPT ); Sun, 22 Jul 2012 16:47:11 -0400 Received: from [76.24.28.220] (helo=octavius.laptop.org) by void.printf.net with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.69) (envelope-from ) id 1St33U-00057v-6s; Sun, 22 Jul 2012 21:47:08 +0100 From: Chris Ball To: Wilson & Cassie Cc: linux-mmc@vger.kernel.org, Sascha Hauer Subject: Re: [PATCH] esdhc: fix DMA_MASK to not break mx25 DMA access References: <3DC84FDD-7D96-46D6-A9F2-C3F8A47E9051@comcast.net> <20120716214711.GX30009@pengutronix.de> <8D8658B1-9B29-4677-8CA8-EBEE0C42D3E6@comcast.net> Date: Sun, 22 Jul 2012 16:47:05 -0400 In-Reply-To: <8D8658B1-9B29-4677-8CA8-EBEE0C42D3E6@comcast.net> (Wilson & Cassie's message of "Tue, 17 Jul 2012 12:32:05 -0400") Message-ID: <874noz1q2e.fsf@octavius.laptop.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.97 (gnu/linux) MIME-Version: 1.0 Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org Hi Wilson and Sascha, On Tue, Jul 17 2012, Wilson & Cassie wrote: > Patch to not set reserved bits in i.MX25 PROCTL register. DMA stops working if those bits get set. > > Signed-off-by: Wilson Callan > Acked-by: Sascha Hauer > > --- linux-3.4.4/drivers/mmc/host/sdhci-esdhc-imx.c.orig 2012-07-04 13:58:16.239979741 -0400 > +++ linux-3.4.4/drivers/mmc/host/sdhci-esdhc-imx.c 2012-07-04 14:34:38.939949292 -0400 > @@ -310,8 +310,10 @@ static void esdhc_writeb_le(struct sdhci > SDHCI_CTRL_D3CD); > /* ensure the endianess */ > new_val |= ESDHC_HOST_CONTROL_LE; > - /* DMA mode bits are shifted */ > - new_val |= (val & SDHCI_CTRL_DMA_MASK) << 5; > + if (!is_imx25_esdhc(imx_data)) { // bits 8&9 are reserved on mx25 > + /* DMA mode bits are shifted */ > + new_val |= (val & SDHCI_CTRL_DMA_MASK) << 5; > + } > > esdhc_clrset_le(host, 0xffff, new_val, reg); > return; This patch broke the imx build. Please test patches before submitting them. CC drivers/mmc/host/sdhci-esdhc-imx.o /home/cjb/git/mmc/drivers/mmc/host/sdhci-esdhc-imx.c: In function ‘esdhc_writeb_le’: /home/cjb/git/mmc/drivers/mmc/host/sdhci-esdhc-imx.c:319:23: error: ‘imx_data’ undeclared (first use in this function) Fixed by: And pushed out to mmc-next as part of the original patch. - Chris. diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-i index 6175577..e23f813 100644 --- a/drivers/mmc/host/sdhci-esdhc-imx.c +++ b/drivers/mmc/host/sdhci-esdhc-imx.c @@ -299,6 +299,8 @@ static void esdhc_writew_le(struct sdhci_host *host, u16 val static void esdhc_writeb_le(struct sdhci_host *host, u8 val, int reg) { + struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host); + struct pltfm_imx_data *imx_data = pltfm_host->priv; u32 new_val; switch (reg) {