diff mbox

[U-Boot,13/25] SPEAr: spear usbtty configuration does not use ethernet device

Message ID 1331121854-20494-14-git-send-email-amit.virdi@st.com
State Superseded
Delegated to: Stefan Roese
Headers show

Commit Message

Amit Virdi March 7, 2012, 12:04 p.m. UTC
From: Vipin KUMAR <vipin.kumar@st.com>

Ethernet probing is removed from u-boot compiled as a firmware for spear
flashing utility. This enables faster access to usbtty interface as unused
ethernet i/f is not initialized.

Signed-off-by: Vipin Kumar <vipin.kumar@st.com>
Signed-off-by: Amit Virdi <amit.virdi@st.com>
---
 include/configs/spear-common.h |   10 ++++++++++
 include/configs/spear3xx_evb.h |    3 ++-
 include/configs/spear6xx_evb.h |    1 -
 3 files changed, 12 insertions(+), 2 deletions(-)

Comments

Stefan Roese March 7, 2012, 2:14 p.m. UTC | #1
On Wednesday 07 March 2012 13:04:02 Amit Virdi wrote:
> From: Vipin KUMAR <vipin.kumar@st.com>
> 
> Ethernet probing is removed from u-boot compiled as a firmware for spear
> flashing utility. This enables faster access to usbtty interface as unused
> ethernet i/f is not initialized.

Ethernet probing should only be done, when the device is really accessed (e.g. 
by using tftp commands). I know that the current implementation of the 
designware ethernet driver does this probing (PHY link negotiation etc) 
unconditionally at startup.

I have a patch in my queue that changes the designware driver to only start 
probing/auto-negotiating once its really used. I'll rebase my patch on top of 
your designware rework patches, once they are approved.

With this patch, this patch here should be unnecessary. At least when reading 
the patch description above.

So is this patch still needed, after my designware net driver rework?
 
Thanks,
Stefan

--
DENX Software Engineering GmbH,      MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: office@denx.de
Amit Virdi March 12, 2012, 1:12 p.m. UTC | #2
Hello Stefan,

On 3/7/2012 7:44 PM, Stefan Roese wrote:
> On Wednesday 07 March 2012 13:04:02 Amit Virdi wrote:
>> From: Vipin KUMAR<vipin.kumar@st.com>
>>
>> Ethernet probing is removed from u-boot compiled as a firmware for spear
>> flashing utility. This enables faster access to usbtty interface as unused
>> ethernet i/f is not initialized.
>
> Ethernet probing should only be done, when the device is really accessed (e.g.
> by using tftp commands). I know that the current implementation of the
> designware ethernet driver does this probing (PHY link negotiation etc)
> unconditionally at startup.
>
> I have a patch in my queue that changes the designware driver to only start
> probing/auto-negotiating once its really used. I'll rebase my patch on top of
> your designware rework patches, once they are approved.
>
> With this patch, this patch here should be unnecessary. At least when reading
> the patch description above.
>
> So is this patch still needed, after my designware net driver rework?
>

This patch is not required after your patch. I shall be dropping this in V2.

Regards
Amit Virdi
diff mbox

Patch

diff --git a/include/configs/spear-common.h b/include/configs/spear-common.h
index f4980b0..14e3ec4 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/spear3xx_evb.h b/include/configs/spear3xx_evb.h
index 263c058..84fad0c 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
@@ -144,7 +146,6 @@ 
 #endif
 
 /* NAND flash configuration */
-#define CONFIG_SYS_FSMC_NAND_SP
 #define CONFIG_SYS_FSMC_NAND_8BIT
 
 #if defined(CONFIG_SPEAR300)
diff --git a/include/configs/spear6xx_evb.h b/include/configs/spear6xx_evb.h
index a61d9be..d901ba8 100644
--- a/include/configs/spear6xx_evb.h
+++ b/include/configs/spear6xx_evb.h
@@ -49,7 +49,6 @@ 
 						(void *)CONFIG_SYS_SERIAL1 }
 
 /* NAND flash configuration */
-#define CONFIG_SYS_FSMC_NAND_SP
 #define CONFIG_SYS_FSMC_NAND_8BIT
 #define CONFIG_SYS_NAND_BASE			(0xD2000000)