[U-Boot] [PATCH V2] davinci: disable dcache on boards with EMAC

Ilya Yanok yanok at emcraft.com
Tue Nov 15 01:09:55 CET 2011


DaVinci EMAC driver needs working {flush,invalidate}_dcache_range
functions to run with enabled D-Cache correctly. These functions are not
implemented for ARM926EJS currently so disable D-Cache on DaVinci boards
with EMAC for now.

Signed-off-by: Ilya Yanok <yanok at emcraft.com>
---
 include/configs/cam_enc_4xx.h       |    5 ++++-
 include/configs/da830evm.h          |    1 +
 include/configs/da850evm.h          |    6 +++---
 include/configs/davinci_dm365evm.h  |    4 ++++
 include/configs/davinci_dm6467evm.h |    4 ++++
 include/configs/davinci_dvevm.h     |    4 ++++
 include/configs/davinci_schmoogie.h |    4 ++++
 include/configs/davinci_sffsdr.h    |    4 ++++
 include/configs/davinci_sonata.h    |    4 ++++
 include/configs/ea20.h              |    1 +
 include/configs/hawkboard.h         |    3 +++
 11 files changed, 36 insertions(+), 4 deletions(-)

diff --git a/include/configs/cam_enc_4xx.h b/include/configs/cam_enc_4xx.h
index a21d448..daaf545 100644
--- a/include/configs/cam_enc_4xx.h
+++ b/include/configs/cam_enc_4xx.h
@@ -70,9 +70,12 @@
 #define CONFIG_NET_RETRY_COUNT	10
 #define CONFIG_NET_MULTI
 #define CONFIG_CMD_MII
-#define CONFIG_SYS_DCACHE_OFF
 #define CONFIG_RESET_PHY_R
 
+#ifdef CONFIG_DRIVER_TI_EMAC
+#define CONFIG_SYS_DCACHE_OFF
+#endif
+
 /* I2C */
 #define CONFIG_HARD_I2C
 #define CONFIG_DRIVER_DAVINCI_I2C
diff --git a/include/configs/da830evm.h b/include/configs/da830evm.h
index 6ac25d2..11a0b18 100644
--- a/include/configs/da830evm.h
+++ b/include/configs/da830evm.h
@@ -87,6 +87,7 @@
  * Network & Ethernet Configuration
  */
 #ifdef CONFIG_DRIVER_TI_EMAC
+#define CONFIG_SYS_DCACHE_OFF
 #define CONFIG_MII
 #define CONFIG_BOOTP_DEFAULT
 #define CONFIG_BOOTP_DNS
diff --git a/include/configs/da850evm.h b/include/configs/da850evm.h
index 4c14370..ed1a634 100644
--- a/include/configs/da850evm.h
+++ b/include/configs/da850evm.h
@@ -43,9 +43,6 @@
 #define CONFIG_SYS_HZ			1000
 #define CONFIG_SKIP_LOWLEVEL_INIT
 #define CONFIG_SYS_TEXT_BASE		0xc1080000
-#define CONFIG_SYS_ICACHE_OFF
-#define CONFIG_SYS_DCACHE_OFF
-#define CONFIG_SYS_L2CACHE_OFF
 
 /*
  * Memory Info
@@ -121,6 +118,9 @@
  * Network & Ethernet Configuration
  */
 #ifdef CONFIG_DRIVER_TI_EMAC
+#define CONFIG_SYS_ICACHE_OFF
+#define CONFIG_SYS_DCACHE_OFF
+#define CONFIG_SYS_L2CACHE_OFF
 #define CONFIG_MII
 #define CONFIG_BOOTP_DEFAULT
 #define CONFIG_BOOTP_DNS
diff --git a/include/configs/davinci_dm365evm.h b/include/configs/davinci_dm365evm.h
index cb6ed24..9878a0a 100644
--- a/include/configs/davinci_dm365evm.h
+++ b/include/configs/davinci_dm365evm.h
@@ -64,6 +64,10 @@
 #define CONFIG_BOOTP_SEND_HOSTNAME
 #define CONFIG_NET_RETRY_COUNT	10
 
+#ifdef CONFIG_DRIVER_TI_EMAC
+#define CONFIG_SYS_DCACHE_OFF
+#endif
+
 /* I2C */
 #define CONFIG_HARD_I2C
 #define CONFIG_DRIVER_DAVINCI_I2C
diff --git a/include/configs/davinci_dm6467evm.h b/include/configs/davinci_dm6467evm.h
index ec1c31c..171d095 100644
--- a/include/configs/davinci_dm6467evm.h
+++ b/include/configs/davinci_dm6467evm.h
@@ -92,6 +92,10 @@ extern unsigned int davinci_arm_clk_get(void);
 #define CONFIG_NET_RETRY_COUNT	10
 #define CONFIG_CMD_NET
 
+#ifdef CONFIG_DRIVER_TI_EMAC
+#define CONFIG_SYS_DCACHE_OFF
+#endif
+
 /* Flash & Environment */
 #define CONFIG_SYS_NO_FLASH
 #ifdef CONFIG_SYS_USE_NAND
diff --git a/include/configs/davinci_dvevm.h b/include/configs/davinci_dvevm.h
index c052517..5eb8772 100644
--- a/include/configs/davinci_dvevm.h
+++ b/include/configs/davinci_dvevm.h
@@ -108,6 +108,10 @@
 #define CONFIG_BOOTP_DNS2
 #define CONFIG_BOOTP_SEND_HOSTNAME
 #define CONFIG_NET_RETRY_COUNT	10
+
+#ifdef CONFIG_DRIVER_TI_EMAC
+#define CONFIG_SYS_DCACHE_OFF
+#endif
 /*=====================*/
 /* Flash & Environment */
 /*=====================*/
diff --git a/include/configs/davinci_schmoogie.h b/include/configs/davinci_schmoogie.h
index 5eaa198..4fa3a5c 100644
--- a/include/configs/davinci_schmoogie.h
+++ b/include/configs/davinci_schmoogie.h
@@ -75,6 +75,10 @@
 #define CONFIG_BOOTP_SEND_HOSTNAME
 #define CONFIG_NET_RETRY_COUNT	10
 #define CONFIG_OVERWRITE_ETHADDR_ONCE
+
+#ifdef CONFIG_DRIVER_TI_EMAC
+#define CONFIG_SYS_DCACHE_OFF
+#endif
 /*=====================*/
 /* Flash & Environment */
 /*=====================*/
diff --git a/include/configs/davinci_sffsdr.h b/include/configs/davinci_sffsdr.h
index 0c65391..7cbc566 100644
--- a/include/configs/davinci_sffsdr.h
+++ b/include/configs/davinci_sffsdr.h
@@ -72,6 +72,10 @@
 #define CONFIG_BOOTP_SEND_HOSTNAME
 #define CONFIG_NET_RETRY_COUNT	10
 #define CONFIG_OVERWRITE_ETHADDR_ONCE
+
+#ifdef CONFIG_DRIVER_TI_EMAC
+#define CONFIG_SYS_DCACHE_OFF
+#endif
 /* Flash & Environment */
 #undef CONFIG_ENV_IS_IN_FLASH
 #define CONFIG_SYS_NO_FLASH
diff --git a/include/configs/davinci_sonata.h b/include/configs/davinci_sonata.h
index 74530e8..631f02c 100644
--- a/include/configs/davinci_sonata.h
+++ b/include/configs/davinci_sonata.h
@@ -107,6 +107,10 @@
 #define CONFIG_BOOTP_DNS2
 #define CONFIG_BOOTP_SEND_HOSTNAME
 #define CONFIG_NET_RETRY_COUNT	10
+
+#ifdef CONFIG_DRIVER_TI_EMAC
+#define CONFIG_SYS_DCACHE_OFF
+#endif
 /*=====================*/
 /* Flash & Environment */
 /*=====================*/
diff --git a/include/configs/ea20.h b/include/configs/ea20.h
index 74fec3f..a583a2a 100644
--- a/include/configs/ea20.h
+++ b/include/configs/ea20.h
@@ -98,6 +98,7 @@
  * Network & Ethernet Configuration
  */
 #ifdef CONFIG_DRIVER_TI_EMAC
+#define CONFIG_SYS_DCACHE_OFF
 #define CONFIG_MII
 #define CONFIG_BOOTP_DEFAULT
 #define CONFIG_BOOTP_DNS
diff --git a/include/configs/hawkboard.h b/include/configs/hawkboard.h
index 638643a..ff03cba 100644
--- a/include/configs/hawkboard.h
+++ b/include/configs/hawkboard.h
@@ -92,6 +92,9 @@
 #define CONFIG_BOOTP_DNS2
 #define CONFIG_BOOTP_SEND_HOSTNAME
 #define CONFIG_NET_RETRY_COUNT		10
+#ifdef CONFIG_DRIVER_TI_EMAC
+#define CONFIG_SYS_DCACHE_OFF
+#endif
 
 /*
  * Nand Flash
-- 
1.7.6.4



More information about the U-Boot mailing list