]> git.sur5r.net Git - u-boot/commitdiff
davinci: remove obsolete macro CONFIG_EMAC_MDIO_PHY_NUM
authorManjunath Hadli <manjunath.hadli@ti.com>
Thu, 13 Oct 2011 03:40:55 +0000 (03:40 +0000)
committerAlbert ARIBAUD <albert.u.boot@aribaud.net>
Thu, 27 Oct 2011 19:56:36 +0000 (21:56 +0200)
remove macro CONFIG_EMAC_MDIO_PHY_NUM and depending macro EMAC_MDIO_PHY_NUM
as they are no longer needed with the support for more than 1 PHYs in davinci
emac driver.

Signed-off-by: Manjunath Hadli <manjunath.hadli@ti.com>
Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
13 files changed:
arch/arm/cpu/arm926ejs/davinci/et1011c.c
arch/arm/include/asm/arch-davinci/emac_defs.h
drivers/net/davinci_emac.c
include/configs/da830evm.h
include/configs/da850evm.h
include/configs/davinci_dm365evm.h
include/configs/davinci_dm6467evm.h
include/configs/davinci_dvevm.h
include/configs/davinci_schmoogie.h
include/configs/davinci_sffsdr.h
include/configs/davinci_sonata.h
include/configs/ea20.h
include/configs/hawkboard.h

index da073457a30a5092f352c19176cc622facdd8f4d..df35e44d138aca279688cf297555f2cf2708fcfc 100644 (file)
@@ -39,11 +39,9 @@ int et1011c_get_link_speed(int phy_addr)
        u_int16_t       data;
 
        if (davinci_eth_phy_read(phy_addr, MII_STATUS_REG, &data) && (data & 0x04)) {
-               davinci_eth_phy_read(EMAC_MDIO_PHY_NUM,
-                               MII_PHY_CONFIG_REG, &data);
+               davinci_eth_phy_read(phy_addr, MII_PHY_CONFIG_REG, &data);
                /* Enable 125MHz clock sourced from PHY */
-               davinci_eth_phy_write(EMAC_MDIO_PHY_NUM,
-                       MII_PHY_CONFIG_REG,
+               davinci_eth_phy_write(phy_addr, MII_PHY_CONFIG_REG,
                        data | PHY_SYS_CLK_EN);
                return (1);
        }
index 294a9a88ed1c3f0bbb5693a77e890ce34b5d7875..ea52888ff45fe2434f1d0a9f1ca2e04e2dd1936d 100644 (file)
 #define EMAC_MDIO_CLOCK_FREQ           2000000         /* 2.0 MHz */
 #endif
 
-/* PHY mask - set only those phy number bits where phy is/can be connected */
-#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 */
 #define EMAC_MIN_ETHERNET_PKT_SIZE     60
 #define EMAC_MAX_ETHERNET_PKT_SIZE     1518
index 4ffd08657e7e86075b2a726fbd5955e7d9c80a19..7dacb2368d64d2b90fd140ed1db9844efabad9bc 100644 (file)
@@ -48,9 +48,9 @@ unsigned int  emac_dbg = 0;
 #define debug_emac(fmt,args...)        if (emac_dbg) printf(fmt,##args)
 
 #ifdef DAVINCI_EMAC_GIG_ENABLE
-#define emac_gigabit_enable()  davinci_eth_gigabit_enable()
+#define emac_gigabit_enable(phy_addr)  davinci_eth_gigabit_enable(phy_addr)
 #else
-#define emac_gigabit_enable()  /* no gigabit to enable */
+#define emac_gigabit_enable(phy_addr)  /* no gigabit to enable */
 #endif
 
 static void davinci_eth_mdio_enable(void);
@@ -357,11 +357,11 @@ static int davinci_mii_phy_write(const char *devname, unsigned char addr, unsign
 }
 #endif
 
-static void  __attribute__((unused)) davinci_eth_gigabit_enable(void)
+static void  __attribute__((unused)) davinci_eth_gigabit_enable(int phy_addr)
 {
        u_int16_t data;
 
-       if (davinci_eth_phy_read(EMAC_MDIO_PHY_NUM, 0, &data)) {
+       if (davinci_eth_phy_read(phy_addr, 0, &data)) {
                if (data & (1 << 6)) { /* speed selection MSB */
                        /*
                         * Check if link detected is giga-bit
@@ -484,7 +484,7 @@ static int davinci_eth_open(struct eth_device *dev, bd_t *bis)
        if (index == -1)
                return(0);
 
-       emac_gigabit_enable();
+       emac_gigabit_enable(active_phy_addr[index]);
 
        /* Start receive process */
        writel((u_int32_t)emac_rx_desc, &adap_emac->RX0HDP);
@@ -589,7 +589,7 @@ static int davinci_eth_send_packet (struct eth_device *dev,
                return (ret_status);
        }
 
-       emac_gigabit_enable();
+       emac_gigabit_enable(active_phy_addr[index]);
 
        /* Check packet size and if < EMAC_MIN_ETHERNET_PKT_SIZE, pad it up */
        if (length < EMAC_MIN_ETHERNET_PKT_SIZE) {
@@ -614,7 +614,7 @@ static int davinci_eth_send_packet (struct eth_device *dev,
                        return (ret_status);
                }
 
-               emac_gigabit_enable();
+               emac_gigabit_enable(active_phy_addr[index]);
 
                if (readl(&adap_emac->TXINTSTATRAW) & 0x01) {
                        ret_status = length;
index cca75cefe3c7667eb7f4a0b94d716914d28dbce9..6ac25d2b9c11e7781da0f819ce73d31855b0dfdd 100644 (file)
@@ -87,7 +87,6 @@
  * 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 b4e489022b21c45a6d760c54486bc541ced98fdf..4c143700ddc5299b5c5d28e510a7d7ad69e4c948 100644 (file)
  * Network & Ethernet Configuration
  */
 #ifdef CONFIG_DRIVER_TI_EMAC
-#define CONFIG_EMAC_MDIO_PHY_NUM       0
 #define CONFIG_MII
 #define CONFIG_BOOTP_DEFAULT
 #define CONFIG_BOOTP_DNS
index 5fa2e56c315b16e893d6d4b4113f3bda06b6dbe3..cb6ed24a80015dc5d6d4962cc0cbd78d5d613ba8 100644 (file)
@@ -57,7 +57,6 @@
 
 /* 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 d97c0f36c4afbd1c730e10bccc7e3ccfea3f490e..ec1c31c0852f3cec4f1a2590c4b28ec9a7af6d01 100644 (file)
@@ -84,7 +84,6 @@ extern unsigned int davinci_arm_clk_get(void);
 
 /* 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 2507d79e4ca31079e0d899eb4c81b2541d283026..c0525173e6806841e91108eab4fb526eaa33b2f5 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 b6f61ee4bfdbc4904b24cc9156f76b40cebc6327..5eaa19884676cf7aad9ac87e90a8db2fc30dfce6 100644 (file)
@@ -68,7 +68,6 @@
 /* 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 ce2721275b70c8be7bb8931a1e6daaa14eeddc11..0c653915bdf83d95e76fff1a4c2c1a1441603720 100644 (file)
@@ -65,7 +65,6 @@
 #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 163f1a2103ea6162f9b7ce66673acf5f09de5d09..74530e8306c2bfe604cae316e61cb2a99710e9e4 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 a2e317825f8dc2536b6c1b69965c62907be1d334..201e6b570b659002e219172a887d15755afa7620 100644 (file)
@@ -86,7 +86,6 @@
  * Network & Ethernet Configuration
  */
 #ifdef CONFIG_DRIVER_TI_EMAC
-#define CONFIG_EMAC_MDIO_PHY_NUM       0
 #define CONFIG_MII
 #define CONFIG_BOOTP_DEFAULT
 #define CONFIG_BOOTP_DNS
index 5f88d96679b5c944d31e4de0888470da426a6fc3..638643a2b237d07720ecc88062fc1707cd1837c8 100644 (file)
@@ -83,7 +83,6 @@
 /*
  * Network & Ethernet Configuration
  */
-#define CONFIG_EMAC_MDIO_PHY_NUM       0x7
 #if !defined(CONFIG_NAND_SPL)
 #define CONFIG_DRIVER_TI_EMAC
 #endif