summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSekhar Nori <nsekhar@ti.com>2009-03-21 17:23:45 +0530
committerJustin Waters <justin.waters@timesys.com>2009-09-09 14:03:21 -0400
commit9717766f942a70082a66bc5c1501a9616c662258 (patch)
tree34ec933f141a31f673d873c0d354472938d4d955
parent6dfcb3d5a374e0279255303f179105b12df17d1d (diff)
correct the name for get_link_speed in phy_t
the get_link_speed API actually returns the link status. So call it get_link_status instead. Signed-off-by: Sekhar Nori <nsekhar@ti.com>
-rw-r--r--cpu/arm926ejs/da8xx/ether.c22
-rw-r--r--include/asm-arm/arch-da8xx/emac_defs.h2
2 files changed, 12 insertions, 12 deletions
diff --git a/cpu/arm926ejs/da8xx/ether.c b/cpu/arm926ejs/da8xx/ether.c
index bf3c97022f..d031b3d215 100644
--- a/cpu/arm926ejs/da8xx/ether.c
+++ b/cpu/arm926ejs/da8xx/ether.c
@@ -59,7 +59,7 @@ static void davinci_eth_mdio_enable(void);
static int gen_init_phy(int phy_addr);
static int gen_is_phy_connected(int phy_addr);
-static int gen_get_link_speed(int phy_addr);
+static int gen_get_link_status(int phy_addr);
static int gen_auto_negotiate(int phy_addr);
/* Wrappers exported to the U-Boot proper */
@@ -131,12 +131,12 @@ static volatile u_int8_t active_phy_addr = 0xff;
static int no_phy_init (int phy_addr) { return(1); }
static int no_phy_is_connected (int phy_addr) { return(1); }
-static int no_phy_get_link_speed (int phy_addr) { return(1); }
+static int no_phy_get_link_status (int phy_addr) { return(1); }
static int no_phy_auto_negotiate (int phy_addr) { return(1); }
phy_t phy = {
.init = no_phy_init,
.is_phy_connected = no_phy_is_connected,
- .get_link_speed = no_phy_get_link_speed,
+ .get_link_status = no_phy_get_link_status,
.auto_negotiate = no_phy_auto_negotiate
};
@@ -234,9 +234,9 @@ static int gen_init_phy(int phy_addr)
{
int ret = 1;
- if (gen_get_link_speed(phy_addr)) {
+ if (gen_get_link_status(phy_addr)) {
/* Try another time */
- ret = gen_get_link_speed(phy_addr);
+ ret = gen_get_link_status(phy_addr);
}
return(ret);
@@ -249,7 +249,7 @@ static int gen_is_phy_connected(int phy_addr)
return(davinci_eth_phy_read(phy_addr, PHY_PHYIDR1, &dummy));
}
-static int gen_get_link_speed(int phy_addr)
+static int gen_get_link_status(int phy_addr)
{
u_int16_t tmp;
@@ -278,7 +278,7 @@ static int gen_auto_negotiate(int phy_addr)
if (!(tmp & PHY_BMSR_AUTN_COMP))
return(0);
- return(gen_get_link_speed(phy_addr));
+ return(gen_get_link_status(phy_addr));
}
/* End of generic PHY functions */
@@ -355,7 +355,7 @@ static int davinci_eth_hw_init(void)
sprintf(phy.name, "GENERIC @ 0x%02x", active_phy_addr);
phy.init = gen_init_phy;
phy.is_phy_connected = gen_is_phy_connected;
- phy.get_link_speed = gen_get_link_speed;
+ phy.get_link_status = gen_get_link_status;
phy.auto_negotiate = gen_auto_negotiate;
}
@@ -468,7 +468,7 @@ static int davinci_eth_open(void)
clkdiv = (EMAC_MDIO_BUS_FREQ / EMAC_MDIO_CLOCK_FREQ) - 1;
adap_mdio->CONTROL = ((clkdiv & 0xff) | MDIO_CONTROL_ENABLE | MDIO_CONTROL_FAULT);
- if (!phy.get_link_speed(active_phy_addr))
+ if (!phy.get_link_status(active_phy_addr))
return(0);
/* Start receive process */
@@ -554,7 +554,7 @@ static int davinci_eth_send_packet (volatile void *packet, int length)
tx_send_loop = 0;
/* Return error if no link */
- if (!phy.get_link_speed (active_phy_addr)) {
+ if (!phy.get_link_status (active_phy_addr)) {
printf ("WARN: emac_send_packet: No link\n");
return (ret_status);
}
@@ -577,7 +577,7 @@ static int davinci_eth_send_packet (volatile void *packet, int length)
/* Wait for packet to complete or link down */
while (1) {
- if (!phy.get_link_speed (active_phy_addr)) {
+ if (!phy.get_link_status (active_phy_addr)) {
davinci_eth_ch_teardown (EMAC_CH_TX);
return (ret_status);
}
diff --git a/include/asm-arm/arch-da8xx/emac_defs.h b/include/asm-arm/arch-da8xx/emac_defs.h
index 6120a595e3..6fe67f2e11 100644
--- a/include/asm-arm/arch-da8xx/emac_defs.h
+++ b/include/asm-arm/arch-da8xx/emac_defs.h
@@ -324,7 +324,7 @@ typedef struct
char name[64];
int (*init)(int phy_addr);
int (*is_phy_connected)(int phy_addr);
- int (*get_link_speed)(int phy_addr);
+ int (*get_link_status)(int phy_addr);
int (*auto_negotiate)(int phy_addr);
} phy_t;