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

2010-07-13 Thread Vipin KUMAR
From: Vipin KUMAR 

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 
---
 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 (1) /* 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 
 
+#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 (1) /* 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 
 
+#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 
 
+#if !defined(CONFIG_SPEAR_USBTTY)
 /* Ethernet driver configuration */
 #define CONFIG_DW_ALTDESCRIPTOR1
 
@@ -66,6 +67,7 @@
 #define CONFIG_MACB0_PHY   0x01
 
 #endif
+#endif
 
 /* Serial Configuration (PL011) */
 #define CONFIG_SYS_SERIAL0 0xD000
-- 
1.6.0.2

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


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

2010-07-15 Thread Wolfgang Denk
Dear Vipin KUMAR,

In message <1279084204-3263-28-git-send-email-vipin.ku...@st.com> you wrote:
> From: Vipin KUMAR 
> 
> 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

Sorry, but I don't understand what you're trying to tell us here.
Please re-formulate so everybody understands this.

> 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

This is not a good idea, it seems to me.


Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
"There was no difference between  the  behavior  of  a  god  and  the
operations of pure chance..."   - Thomas Pynchon, _Gravity's Rainbow_
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot