All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Benoît Thébaudeau" <benoit.thebaudeau@advansee.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 2/2] fsl_esdhc: Remove cache snooping for i.MX
Date: Mon, 13 Aug 2012 17:53:20 +0200 (CEST)	[thread overview]
Message-ID: <555537827.2366062.1344873200180.JavaMail.root@advansee.com> (raw)
In-Reply-To: <50291A3E.4060002@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 <benoit.thebaudeau@advansee.com>
Cc: Andy Fleming <afleming@gmail.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Kim Phillips <kim.phillips@freescale.com>
---
Changes for v2:
 - Get rid of no_snoop.

 .../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..1ed89a3 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(&regs->sysctl) & SYSCTL_RSTA) && --timeout)
 		udelay(1000);
 
+#ifndef ARCH_IMX
 	/* Enable cache snooping */
-	if (cfg && !cfg->no_snoop)
-		esdhc_write32(&regs->scr, 0x00000040);
+	esdhc_write32(&regs->scr, 0x00000040);
+#endif
 
 	esdhc_write32(&regs->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 */

  reply	other threads:[~2012-08-13 15:53 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-10 21:13 [U-Boot] [PATCH] fsl_esdhc: Add no-snoop config for default init Benoît Thébaudeau
2012-08-11 10:43 ` Stefano Babic
2012-08-11 14:39   ` Benoît Thébaudeau
2012-08-11 17:25     ` Stefano Babic
2012-08-11 17:59       ` Benoît Thébaudeau
2012-08-11 21:57         ` stefano babic
2012-08-13 14:18           ` [U-Boot] [PATCH 1/2] imx: Define architecture identifier Benoît Thébaudeau
2012-08-13 14:18             ` [U-Boot] [PATCH 2/2] fsl_esdhc: Remove cache snooping for i.MX Benoît Thébaudeau
2012-08-13 14:24               ` Stefano Babic
2012-08-13 14:39                 ` Benoît Thébaudeau
2012-08-13 15:16                   ` Stefano Babic
2012-08-13 15:53                     ` Benoît Thébaudeau [this message]
2012-08-13 17:28                       ` [U-Boot] [PATCH v3 " Benoît Thébaudeau
2012-08-13 16:32             ` [U-Boot] [PATCH 1/2] imx: Define architecture identifier Otavio Salvador
2012-08-13 17:27               ` [U-Boot] [PATCH v3 1/2] mxc: " Benoît Thébaudeau
2012-09-01  7:35                 ` Stefano Babic
2012-08-12  6:25         ` [U-Boot] [PATCH] fsl_esdhc: Add no-snoop config for default init Stefano Babic
2012-08-12 13:52           ` Benoît Thébaudeau

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=555537827.2366062.1344873200180.JavaMail.root@advansee.com \
    --to=benoit.thebaudeau@advansee.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.