summaryrefslogtreecommitdiff
path: root/drivers/net/tsec.c
diff options
context:
space:
mode:
authorPeter Tyser <ptyser@xes-inc.com>2009-09-21 11:20:31 -0500
committerWolfgang Denk <wd@denx.de>2009-10-03 10:17:56 +0200
commitcd1011db80287eef933d1599b74cff1116c93134 (patch)
treef60c1ef86fc6fd306a15fe55e07706479139c297 /drivers/net/tsec.c
parentb5650c5d8c99100144d8e4e9af910405f857bb7a (diff)
downloadu-boot-imx-cd1011db80287eef933d1599b74cff1116c93134.zip
u-boot-imx-cd1011db80287eef933d1599b74cff1116c93134.tar.gz
u-boot-imx-cd1011db80287eef933d1599b74cff1116c93134.tar.bz2
tsec: Remove PHY command relocation fixups
Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
Diffstat (limited to 'drivers/net/tsec.c')
-rw-r--r--drivers/net/tsec.c49
1 files changed, 0 insertions, 49 deletions
diff --git a/drivers/net/tsec.c b/drivers/net/tsec.c
index 5c3d261..3f74118 100644
--- a/drivers/net/tsec.c
+++ b/drivers/net/tsec.c
@@ -35,8 +35,6 @@ typedef volatile struct rtxbd {
#define MAXCONTROLLERS (8)
-static int relocated = 0;
-
static struct tsec_private *privlist[MAXCONTROLLERS];
static int num_tsecs = 0;
@@ -59,7 +57,6 @@ uint read_phy_reg(struct tsec_private *priv, uint regnum);
struct phy_info *get_phy_info(struct eth_device *dev);
void phy_run_commands(struct tsec_private *priv, struct phy_cmd *cmd);
static void adjust_link(struct eth_device *dev);
-static void relocate_cmds(void);
#if defined(CONFIG_MII) || defined(CONFIG_CMD_MII) \
&& !defined(BITBANGMII)
static int tsec_miiphy_write(char *devname, unsigned char addr,
@@ -321,9 +318,6 @@ static int init_phy(struct eth_device *dev)
asm("sync");
while (priv->phyregs->miimind & MIIMIND_BUSY) ;
- if (0 == relocated)
- relocate_cmds();
-
/* Get the cmd structure corresponding to the attached
* PHY */
curphy = get_phy_info(dev);
@@ -1800,49 +1794,6 @@ void phy_run_commands(struct tsec_private *priv, struct phy_cmd *cmd)
}
}
-/* Relocate the function pointers in the phy cmd lists */
-static void relocate_cmds(void)
-{
- struct phy_cmd **cmdlistptr;
- struct phy_cmd *cmd;
- int i, j, k;
-
- for (i = 0; phy_info[i]; i++) {
- /* First thing's first: relocate the pointers to the
- * PHY command structures (the structs were done) */
- phy_info[i] = (struct phy_info *)((uint) phy_info[i]
- + gd->reloc_off);
- phy_info[i]->name += gd->reloc_off;
- phy_info[i]->config =
- (struct phy_cmd *)((uint) phy_info[i]->config
- + gd->reloc_off);
- phy_info[i]->startup =
- (struct phy_cmd *)((uint) phy_info[i]->startup
- + gd->reloc_off);
- phy_info[i]->shutdown =
- (struct phy_cmd *)((uint) phy_info[i]->shutdown
- + gd->reloc_off);
-
- cmdlistptr = &phy_info[i]->config;
- j = 0;
- for (; cmdlistptr <= &phy_info[i]->shutdown; cmdlistptr++) {
- k = 0;
- for (cmd = *cmdlistptr;
- cmd->mii_reg != miim_end;
- cmd++) {
- /* Only relocate non-NULL pointers */
- if (cmd->funct)
- cmd->funct += gd->reloc_off;
-
- k++;
- }
- j++;
- }
- }
-
- relocated = 1;
-}
-
#if defined(CONFIG_MII) || defined(CONFIG_CMD_MII) \
&& !defined(BITBANGMII)