[U-Boot] [PATCH 27/28] SPEAr : Ethernet issue workaround is not needed when uboot is acting as flashing

Vipin KUMAR vipin.kumar at st.com
Wed Jul 14 07:10:03 CEST 2010


From: Vipin KUMAR <vipin.kumar at st.com>

Ethernet/UHC issue workaround which resets the SoC has an unexpected effect
while using uboot as flashing utils firmware. So, excluding the changes for
uboot built as usbtty firmware

Enable overwriting of env variables. The env variables ethaddr, serial# etc
support a feture of being written only once. Though this feature is bypassed
using this patch

Signed-off-by: Vipin Kumar <vipin.kumar at st.com>
---
 include/configs/spear-common.h  |   10 ++++++++++
 include/configs/spear13xx_evb.h |   15 ++++++++++++++-
 include/configs/spear3xx_evb.h  |    2 ++
 3 files changed, 26 insertions(+), 1 deletions(-)

diff --git a/include/configs/spear-common.h b/include/configs/spear-common.h
index b02d512..a0b8270 100644
--- a/include/configs/spear-common.h
+++ b/include/configs/spear-common.h
@@ -27,6 +27,7 @@
  * Common configurations used for both spear3xx as well as spear6xx
  */
 
+#if !defined(CONFIG_SPEAR_USBTTY)
 /* Ethernet driver configuration */
 #define CONFIG_MII
 #define CONFIG_DESIGNWARE_ETH
@@ -34,6 +35,7 @@
 #define CONFIG_DW0_PHY				1
 #define CONFIG_NET_MULTI
 #define CONFIG_PHY_RESET_DELAY			(10000)		/* in usec */
+#endif
 
 /* USBD driver configuration */
 #define CONFIG_DW_UDC
@@ -109,14 +111,22 @@
 #define CONFIG_CMD_MEMORY
 #define CONFIG_CMD_RUN
 #define CONFIG_CMD_SAVES
+
+#if !defined(CONFIG_SPEAR_USBTTY)
 #define CONFIG_CMD_NET
 #define CONFIG_CMD_MII
 #define CONFIG_CMD_PING
 #define CONFIG_CMD_DHCP
+#endif
 
 /* This must be included AFTER the definition of CONFIG_COMMANDS (if any) */
 #include <config_cmd_default.h>
 
+#if defined(CONFIG_SPEAR_USBTTY)
+#undef CONFIG_CMD_NET
+#undef CONFIG_CMD_NFS
+#endif
+
 /*
  * Default Environment Varible definitions
  */
diff --git a/include/configs/spear13xx_evb.h b/include/configs/spear13xx_evb.h
index 427892d..195a08e 100644
--- a/include/configs/spear13xx_evb.h
+++ b/include/configs/spear13xx_evb.h
@@ -39,9 +39,12 @@
 #define CONFIG_ENV_IS_IN_FLASH			1
 #endif
 
+#if !defined(CONFIG_SPEAR_USBTTY)
 /* Solve issue #101435 - UHC blocks the BUSMATRIX */
-#define CONFIG_SPEAR1300_ISSUE_101435 1
+#define CONFIG_SPEAR1300_ISSUE_101435		1
+#endif
 
+#if !defined(CONFIG_SPEAR_USBTTY)
 /* Ethernet configuration */
 #define CONFIG_MII
 #define CONFIG_DESIGNWARE_ETH
@@ -50,6 +53,7 @@
 #define CONFIG_DW_SEARCH_PHY			1
 #define CONFIG_DW0_PHY				1
 #define CONFIG_PHY_RESET_DELAY			(10000)		/* in usec */
+#endif
 
 /* USBD driver configuration */
 #define CONFIG_DW_UDC
@@ -108,14 +112,22 @@
 #define CONFIG_CMD_NAND
 #define CONFIG_CMD_MEMORY
 #define CONFIG_CMD_RUN
+
+#if !defined(CONFIG_SPEAR_USBTTY)
 #define CONFIG_CMD_NET
 #define CONFIG_CMD_MII
 #define CONFIG_CMD_PING
 #define CONFIG_CMD_DHCP
+#endif
 
 /* This must be included AFTER the definition of CONFIG_COMMANDS (if any) */
 #include <config_cmd_default.h>
 
+#if defined(CONFIG_SPEAR_USBTTY)
+#undef CONFIG_CMD_NET
+#undef CONFIG_CMD_NFS
+#endif
+
 /*
  * Default Environment Varible definitions
  */
@@ -126,6 +138,7 @@
 #define CONFIG_BOOTDELAY			1
 #endif
 
+#define CONFIG_ENV_OVERWRITE
 /*
  * Environment placing
  */
diff --git a/include/configs/spear3xx_evb.h b/include/configs/spear3xx_evb.h
index 48e1f34..889a58c 100644
--- a/include/configs/spear3xx_evb.h
+++ b/include/configs/spear3xx_evb.h
@@ -51,6 +51,7 @@
 
 #include <configs/spear-common.h>
 
+#if !defined(CONFIG_SPEAR_USBTTY)
 /* Ethernet driver configuration */
 #define CONFIG_DW_ALTDESCRIPTOR			1
 
@@ -66,6 +67,7 @@
 #define CONFIG_MACB0_PHY			0x01
 
 #endif
+#endif
 
 /* Serial Configuration (PL011) */
 #define CONFIG_SYS_SERIAL0			0xD0000000
-- 
1.6.0.2



More information about the U-Boot mailing list