summaryrefslogtreecommitdiff
path: root/cleopatre/u-boot-1.1.6
diff options
context:
space:
mode:
Diffstat (limited to 'cleopatre/u-boot-1.1.6')
-rw-r--r--cleopatre/u-boot-1.1.6/drivers/netspcmac_eth.c16
-rw-r--r--cleopatre/u-boot-1.1.6/include/configs/sdk300.h2
2 files changed, 18 insertions, 0 deletions
diff --git a/cleopatre/u-boot-1.1.6/drivers/netspcmac_eth.c b/cleopatre/u-boot-1.1.6/drivers/netspcmac_eth.c
index 1079716d18..c31cc039ed 100644
--- a/cleopatre/u-boot-1.1.6/drivers/netspcmac_eth.c
+++ b/cleopatre/u-boot-1.1.6/drivers/netspcmac_eth.c
@@ -91,6 +91,8 @@ static unsigned int eth_phy_id = 0;
static void spcmac_mii_write (int phy_addr, int reg, int value);
static unsigned int spcmac_mii_read (int phy_addr, int reg);
+static int mii_read(char *devname, unsigned char addr, unsigned char reg, unsigned short *value);
+static int mii_write(char *devname, unsigned char addr, unsigned char reg, unsigned short value);
void spcmac_set_mac_mii_cap (int full_duplex, unsigned int speed);
/* DMA structure */
@@ -532,6 +534,18 @@ static unsigned int spcmac_mii_read (int phy_addr, int reg)
return val;
}
+static int mii_read(char *devname, unsigned char addr, unsigned char reg, unsigned short *value)
+{
+ *value = (unsigned short)spcmac_mii_read((int)addr, (int)reg);
+ return 0;
+}
+
+static int mii_write(char *devname, unsigned char addr, unsigned char reg, unsigned short value)
+{
+ spcmac_mii_write((int)addr, (int)reg, (int)value);
+ return 0;
+}
+
/* ----------------------------------------------------------------------------
MAC CORE Interface
---------------------------------------------------------------------------*/
@@ -1341,6 +1355,8 @@ extern int eth_init (bd_t * bd)
spcmac_reset_eth (bd);
+ miiphy_register("synop3504", mii_read, mii_write);
+
return 0;
}
diff --git a/cleopatre/u-boot-1.1.6/include/configs/sdk300.h b/cleopatre/u-boot-1.1.6/include/configs/sdk300.h
index b585bbb04f..35ea6fd289 100644
--- a/cleopatre/u-boot-1.1.6/include/configs/sdk300.h
+++ b/cleopatre/u-boot-1.1.6/include/configs/sdk300.h
@@ -107,6 +107,7 @@
CFG_CMD_SPIDUPD | \
CFG_CMD_SPIDBOOT | \
CFG_CMD_CACHE | \
+ CFG_CMD_MII | \
CFG_CMD_NET) & \
~( CFG_CMD_SETGETDCR | \
CFG_CMD_FPGA | \
@@ -187,6 +188,7 @@
* ETHERNET PARAMETERS
*/
/* Enable SPC Ethernet MAC driver */
+#define CONFIG_MII 1
#define CONFIG_DRIVER_NETSPCMAC 1
#define CONFIG_SPCMAC_ADDRESS ETHERNET_CTRL_BASE
/* IP layer configuration */