From patchwork Mon Aug 13 17:28:16 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Beno=C3=AEt_Th=C3=A9baudeau?= X-Patchwork-Id: 177009 X-Patchwork-Delegate: sbabic@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 8C9122C007A for ; Tue, 14 Aug 2012 03:23:13 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 027322808F; Mon, 13 Aug 2012 19:23:12 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Bd3e6zEKmIW7; Mon, 13 Aug 2012 19:23:11 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 59FEF28085; Mon, 13 Aug 2012 19:23:09 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id CD07E28086 for ; Mon, 13 Aug 2012 19:23:06 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 3h6zI2nbWNwR for ; Mon, 13 Aug 2012 19:23:05 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from zose-mta11.web4all.fr (zose-mta-11.w4a.fr [178.33.204.86]) by theia.denx.de (Postfix) with ESMTP id B111628081 for ; Mon, 13 Aug 2012 19:22:57 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by zose-mta11.web4all.fr (Postfix) with ESMTP id 385834601D; Mon, 13 Aug 2012 19:27:44 +0200 (CEST) X-Virus-Scanned: amavisd-new at zose1.web4all.fr Received: from zose-mta11.web4all.fr ([127.0.0.1]) by localhost (zose-mta11.web4all.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id qdymzbSWXopQ; Mon, 13 Aug 2012 19:27:43 +0200 (CEST) Received: from zose-store12.web4all.fr (zose-store12.web4all.fr [178.33.204.49]) by zose-mta11.web4all.fr (Postfix) with ESMTP id 8F24246007; Mon, 13 Aug 2012 19:27:43 +0200 (CEST) Date: Mon, 13 Aug 2012 19:28:16 +0200 (CEST) From: =?utf-8?Q?Beno=C3=AEt_Th=C3=A9baudeau?= To: u-boot@lists.denx.de Message-ID: <867211870.2369486.1344878896598.JavaMail.root@advansee.com> In-Reply-To: <555537827.2366062.1344873200180.JavaMail.root@advansee.com> MIME-Version: 1.0 X-Originating-IP: [88.188.188.98] X-Mailer: Zimbra 7.2.0_GA_2669 (ZimbraWebClient - FF3.0 (Win)/7.2.0_GA_2669) Cc: Andy Fleming , Kim Phillips Subject: [U-Boot] [PATCH v3 2/2] fsl_esdhc: Remove cache snooping for i.MX X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de The cache snooping feature of Freescale's eSDHC IP is not available on i.MX, so disable it globally for this architecture. This avoids setting no_snoop for all i.MX boards, and it prevents setting a reserved bit of a reserved register if fsl_esdhc_mmc_init() is used on i.MX, like in arch/arm/cpu/armv7/imx-common/cpu.c/cpu_mmc_init(). Since no_snoop was only used on i.MX, get rid of it BTW. Signed-off-by: Benoît Thébaudeau Cc: Andy Fleming Cc: Stefano Babic Cc: Kim Phillips --- Changes for v2: - Get rid of no_snoop. Changes for v3: - Rename ARCH_IMX to ARCH_MXC to emphasize the difference between mxc and mxs. .../board/efikamx/efikamx.c | 4 ++-- .../board/esg/ima3-mx53/ima3-mx53.c | 2 +- .../board/freescale/mx51evk/mx51evk.c | 4 ++-- .../board/freescale/mx53ard/mx53ard.c | 4 ++-- .../board/freescale/mx53evk/mx53evk.c | 4 ++-- .../board/freescale/mx53loco/mx53loco.c | 4 ++-- .../board/freescale/mx53smd/mx53smd.c | 2 +- .../board/freescale/mx6qarm2/mx6qarm2.c | 4 ++-- .../board/freescale/mx6qsabrelite/mx6qsabrelite.c | 4 ++-- .../board/ttcontrol/vision2/vision2.c | 2 +- .../drivers/mmc/fsl_esdhc.c | 5 +++-- .../include/fsl_esdhc.h | 1 - 12 files changed, 20 insertions(+), 20 deletions(-) diff --git u-boot-4d3c95f.orig/board/efikamx/efikamx.c u-boot-4d3c95f/board/efikamx/efikamx.c index e88b2ed..1e643d7 100644 --- u-boot-4d3c95f.orig/board/efikamx/efikamx.c +++ u-boot-4d3c95f/board/efikamx/efikamx.c @@ -302,8 +302,8 @@ static inline void power_init(void) { } */ #ifdef CONFIG_FSL_ESDHC struct fsl_esdhc_cfg esdhc_cfg[2] = { - {MMC_SDHC1_BASE_ADDR, 1}, - {MMC_SDHC2_BASE_ADDR, 1}, + {MMC_SDHC1_BASE_ADDR}, + {MMC_SDHC2_BASE_ADDR}, }; static inline uint32_t efika_mmc_cd(void) diff --git u-boot-4d3c95f.orig/board/esg/ima3-mx53/ima3-mx53.c u-boot-4d3c95f/board/esg/ima3-mx53/ima3-mx53.c index 9ecf31d..e947330 100644 --- u-boot-4d3c95f.orig/board/esg/ima3-mx53/ima3-mx53.c +++ u-boot-4d3c95f/board/esg/ima3-mx53/ima3-mx53.c @@ -172,7 +172,7 @@ static void setup_iomux_fec(void) } #ifdef CONFIG_FSL_ESDHC -struct fsl_esdhc_cfg esdhc_cfg = { MMC_SDHC1_BASE_ADDR, 1 }; +struct fsl_esdhc_cfg esdhc_cfg = { MMC_SDHC1_BASE_ADDR }; int board_mmc_getcd(struct mmc *mmc) { diff --git u-boot-4d3c95f.orig/board/freescale/mx51evk/mx51evk.c u-boot-4d3c95f/board/freescale/mx51evk/mx51evk.c index 514a7ac..7e50688 100644 --- u-boot-4d3c95f.orig/board/freescale/mx51evk/mx51evk.c +++ u-boot-4d3c95f/board/freescale/mx51evk/mx51evk.c @@ -47,8 +47,8 @@ DECLARE_GLOBAL_DATA_PTR; #ifdef CONFIG_FSL_ESDHC struct fsl_esdhc_cfg esdhc_cfg[2] = { - {MMC_SDHC1_BASE_ADDR, 1}, - {MMC_SDHC2_BASE_ADDR, 1}, + {MMC_SDHC1_BASE_ADDR}, + {MMC_SDHC2_BASE_ADDR}, }; #endif diff --git u-boot-4d3c95f.orig/board/freescale/mx53ard/mx53ard.c u-boot-4d3c95f/board/freescale/mx53ard/mx53ard.c index 2d21584..6fea7e5 100644 --- u-boot-4d3c95f.orig/board/freescale/mx53ard/mx53ard.c +++ u-boot-4d3c95f/board/freescale/mx53ard/mx53ard.c @@ -79,8 +79,8 @@ static void setup_iomux_uart(void) #ifdef CONFIG_FSL_ESDHC struct fsl_esdhc_cfg esdhc_cfg[2] = { - {MMC_SDHC1_BASE_ADDR, 1 }, - {MMC_SDHC2_BASE_ADDR, 1 }, + {MMC_SDHC1_BASE_ADDR}, + {MMC_SDHC2_BASE_ADDR}, }; int board_mmc_getcd(struct mmc *mmc) diff --git u-boot-4d3c95f.orig/board/freescale/mx53evk/mx53evk.c u-boot-4d3c95f/board/freescale/mx53evk/mx53evk.c index 8a6e31d..2a90a4c 100644 --- u-boot-4d3c95f.orig/board/freescale/mx53evk/mx53evk.c +++ u-boot-4d3c95f/board/freescale/mx53evk/mx53evk.c @@ -204,8 +204,8 @@ static void setup_iomux_fec(void) #ifdef CONFIG_FSL_ESDHC struct fsl_esdhc_cfg esdhc_cfg[2] = { - {MMC_SDHC1_BASE_ADDR, 1}, - {MMC_SDHC3_BASE_ADDR, 1}, + {MMC_SDHC1_BASE_ADDR}, + {MMC_SDHC3_BASE_ADDR}, }; int board_mmc_getcd(struct mmc *mmc) diff --git u-boot-4d3c95f.orig/board/freescale/mx53loco/mx53loco.c u-boot-4d3c95f/board/freescale/mx53loco/mx53loco.c index cbdcfad..3195b22 100644 --- u-boot-4d3c95f.orig/board/freescale/mx53loco/mx53loco.c +++ u-boot-4d3c95f/board/freescale/mx53loco/mx53loco.c @@ -165,8 +165,8 @@ static void setup_iomux_fec(void) #ifdef CONFIG_FSL_ESDHC struct fsl_esdhc_cfg esdhc_cfg[2] = { - {MMC_SDHC1_BASE_ADDR, 1}, - {MMC_SDHC3_BASE_ADDR, 1}, + {MMC_SDHC1_BASE_ADDR}, + {MMC_SDHC3_BASE_ADDR}, }; int board_mmc_getcd(struct mmc *mmc) diff --git u-boot-4d3c95f.orig/board/freescale/mx53smd/mx53smd.c u-boot-4d3c95f/board/freescale/mx53smd/mx53smd.c index c237980..b816377 100644 --- u-boot-4d3c95f.orig/board/freescale/mx53smd/mx53smd.c +++ u-boot-4d3c95f/board/freescale/mx53smd/mx53smd.c @@ -129,7 +129,7 @@ static void setup_iomux_fec(void) #ifdef CONFIG_FSL_ESDHC struct fsl_esdhc_cfg esdhc_cfg[1] = { - {MMC_SDHC1_BASE_ADDR, 1}, + {MMC_SDHC1_BASE_ADDR}, }; int board_mmc_getcd(struct mmc *mmc) diff --git u-boot-4d3c95f.orig/board/freescale/mx6qarm2/mx6qarm2.c u-boot-4d3c95f/board/freescale/mx6qarm2/mx6qarm2.c index 340c4c4..69f5781 100644 --- u-boot-4d3c95f.orig/board/freescale/mx6qarm2/mx6qarm2.c +++ u-boot-4d3c95f/board/freescale/mx6qarm2/mx6qarm2.c @@ -116,8 +116,8 @@ static void setup_iomux_enet(void) #ifdef CONFIG_FSL_ESDHC struct fsl_esdhc_cfg usdhc_cfg[2] = { - {USDHC3_BASE_ADDR, 1}, - {USDHC4_BASE_ADDR, 1}, + {USDHC3_BASE_ADDR}, + {USDHC4_BASE_ADDR}, }; int board_mmc_getcd(struct mmc *mmc) diff --git u-boot-4d3c95f.orig/board/freescale/mx6qsabrelite/mx6qsabrelite.c u-boot-4d3c95f/board/freescale/mx6qsabrelite/mx6qsabrelite.c index 01e5083..c40db59 100644 --- u-boot-4d3c95f.orig/board/freescale/mx6qsabrelite/mx6qsabrelite.c +++ u-boot-4d3c95f/board/freescale/mx6qsabrelite/mx6qsabrelite.c @@ -237,8 +237,8 @@ int board_ehci_hcd_init(int port) #ifdef CONFIG_FSL_ESDHC struct fsl_esdhc_cfg usdhc_cfg[2] = { - {USDHC3_BASE_ADDR, 1}, - {USDHC4_BASE_ADDR, 1}, + {USDHC3_BASE_ADDR}, + {USDHC4_BASE_ADDR}, }; int board_mmc_getcd(struct mmc *mmc) diff --git u-boot-4d3c95f.orig/board/ttcontrol/vision2/vision2.c u-boot-4d3c95f/board/ttcontrol/vision2/vision2.c index d68bef7..d4ca510 100644 --- u-boot-4d3c95f.orig/board/ttcontrol/vision2/vision2.c +++ u-boot-4d3c95f/board/ttcontrol/vision2/vision2.c @@ -521,7 +521,7 @@ static void setup_fec(void) } struct fsl_esdhc_cfg esdhc_cfg[1] = { - {MMC_SDHC1_BASE_ADDR, 1}, + {MMC_SDHC1_BASE_ADDR}, }; int get_mmc_getcd(u8 *cd, struct mmc *mmc) diff --git u-boot-4d3c95f.orig/drivers/mmc/fsl_esdhc.c u-boot-4d3c95f/drivers/mmc/fsl_esdhc.c index b6c969d..3f8d30d 100644 --- u-boot-4d3c95f.orig/drivers/mmc/fsl_esdhc.c +++ u-boot-4d3c95f/drivers/mmc/fsl_esdhc.c @@ -479,9 +479,10 @@ static int esdhc_init(struct mmc *mmc) while ((esdhc_read32(®s->sysctl) & SYSCTL_RSTA) && --timeout) udelay(1000); +#ifndef ARCH_MXC /* Enable cache snooping */ - if (cfg && !cfg->no_snoop) - esdhc_write32(®s->scr, 0x00000040); + esdhc_write32(®s->scr, 0x00000040); +#endif esdhc_write32(®s->sysctl, SYSCTL_HCKEN | SYSCTL_IPGEN); diff --git u-boot-4d3c95f.orig/include/fsl_esdhc.h u-boot-4d3c95f/include/fsl_esdhc.h index 0e26558..4e321e7 100644 --- u-boot-4d3c95f.orig/include/fsl_esdhc.h +++ u-boot-4d3c95f/include/fsl_esdhc.h @@ -167,7 +167,6 @@ struct fsl_esdhc_cfg { u32 esdhc_base; - u32 no_snoop; }; /* Select the correct accessors depending on endianess */