DaVinci: EMAC: Get EMAC_MDIO_PHY_NUM from config files
authorPrakash PM <prakash.pm@ti.com>
Tue, 22 Jun 2010 14:24:43 +0000 (10:24 -0400)
committerSandeep Paulraj <s-paulraj@ti.com>
Tue, 22 Jun 2010 14:24:43 +0000 (10:24 -0400)
Currently EMAC_MDIO_PHY_NUM is defined as 1 in emac_defs.h.
Because of this, EMAC does not work on EVMs which do not have phy
connected at 1. Moving the macro to board config file makes this
configurable depending on where the phy is connected on the MDIO bus.

This patch fixes the board reset issue observed during network access
on DM365EVM. EMAC driver was assuming EMAC_MDIO_PHY_NUM as 1
but it is 0 on DM365EVM.

This patch is verified on da830/omap-l137, dm365 and dm644x evms.

Signed-off-by: Prakash PM <prakash.pm@ti.com>
Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
arch/arm/include/asm/arch-davinci/emac_defs.h
include/configs/da830evm.h
include/configs/davinci_dm365evm.h
include/configs/davinci_dvevm.h
include/configs/davinci_schmoogie.h
include/configs/davinci_sffsdr.h
include/configs/davinci_sonata.h

index b0ec8f50909acb59773e3ce933df99db69b88c76..35a1585d17baf1a43459869edbbda419b1bac75c 100644 (file)
@@ -85,7 +85,7 @@
 #endif
 
 /* PHY mask - set only those phy number bits where phy is/can be connected */
-#define EMAC_MDIO_PHY_NUM           1
+#define EMAC_MDIO_PHY_NUM           CONFIG_EMAC_MDIO_PHY_NUM
 #define EMAC_MDIO_PHY_MASK          (1 << EMAC_MDIO_PHY_NUM)
 
 /* Ethernet Min/Max packet size */
index 0f58e11e7461aa7e4816685e113b3f6e0f18b841..160ece2bf9cf8d20097d38178ea6e4aea98e80e6 100644 (file)
@@ -87,6 +87,7 @@
  * Network & Ethernet Configuration
  */
 #ifdef CONFIG_DRIVER_TI_EMAC
+#define CONFIG_EMAC_MDIO_PHY_NUM       1
 #define CONFIG_MII
 #define CONFIG_BOOTP_DEFAULT
 #define CONFIG_BOOTP_DNS
index 6f99ae087dc4a5db6f2e57a7c915ad4924d3c0f7..2c3d88dc174740a35c88d79bb399cf0cf9a98eb3 100644 (file)
@@ -58,6 +58,7 @@
 
 /* Network Configuration */
 #define CONFIG_DRIVER_TI_EMAC
+#define CONFIG_EMAC_MDIO_PHY_NUM       0
 #define CONFIG_MII
 #define CONFIG_BOOTP_DEFAULT
 #define CONFIG_BOOTP_DNS
index 5774df5cfbe5884abd240ca198226aaa690f93f5..aab2afa962b22ad81084366f0e754668cbbbb445 100644 (file)
 /* Network & Ethernet Configuration */
 /*==================================*/
 #define CONFIG_DRIVER_TI_EMAC
+#define CONFIG_EMAC_MDIO_PHY_NUM       1
 #define CONFIG_MII
 #define CONFIG_BOOTP_DEFAULT
 #define CONFIG_BOOTP_DNS
index 3972ebce6f41d72566d963b1abdf11eb509d64ee..875dda4442c6c6c8bb6c6e7bf78f512d4fe7a406 100644 (file)
@@ -69,6 +69,7 @@
 /* Network & Ethernet Configuration */
 /*==================================*/
 #define CONFIG_DRIVER_TI_EMAC
+#define CONFIG_EMAC_MDIO_PHY_NUM       1
 #define CONFIG_MII
 #define CONFIG_BOOTP_DEFAULT
 #define CONFIG_BOOTP_DNS
index 94be9dcf44607bddf1d32ed7c3043a40c1bd5beb..f4e17f8cc227e8a9ef5e70517d5fb9cc2bce9a17 100644 (file)
@@ -66,6 +66,7 @@
 #define CONFIG_SYS_I2C_SLAVE           10      /* Bogus, master-only in U-Boot */
 /* Network & Ethernet Configuration */
 #define CONFIG_DRIVER_TI_EMAC
+#define CONFIG_EMAC_MDIO_PHY_NUM       1
 #define CONFIG_MII
 #define CONFIG_BOOTP_DEFAULT
 #define CONFIG_BOOTP_DNS
index 490821a0e32b7058885fc0963c5490b1a73dcd1b..4c0184415ffd4c588d321d9e3c9a639f053430a2 100644 (file)
 /* Network & Ethernet Configuration */
 /*==================================*/
 #define CONFIG_DRIVER_TI_EMAC
+#define CONFIG_EMAC_MDIO_PHY_NUM       1
 #define CONFIG_MII
 #define CONFIG_BOOTP_DEFAULT
 #define CONFIG_BOOTP_DNS