diff options
author | Stefano Babic <sbabic@denx.de> | 2014-04-04 11:35:30 +0200 |
---|---|---|
committer | Stefano Babic <sbabic@denx.de> | 2014-04-04 11:35:30 +0200 |
commit | 1cad23c5f471d695bed1e3907e30caee3c2a3056 (patch) | |
tree | 34e035df5db9b327aeae36eff9d0645a915e3177 /drivers/net | |
parent | 5dd73bc0a40a4b318195eab871a1f535aad6b43b (diff) | |
parent | 00b132bf34c5be86a108ac7fe8231ad9e97f6de4 (diff) | |
download | u-boot-imx-1cad23c5f471d695bed1e3907e30caee3c2a3056.zip u-boot-imx-1cad23c5f471d695bed1e3907e30caee3c2a3056.tar.gz u-boot-imx-1cad23c5f471d695bed1e3907e30caee3c2a3056.tar.bz2 |
Merge branch 'master' of git://git.denx.de/u-boot-arm into master
Conflicts:
arch/arm/cpu/arm926ejs/mxs/mxsimage.mx23.cfg
arch/arm/cpu/arm926ejs/mxs/mxsimage.mx28.cfg
Signed-off-by: Stefano Babic <sbabic@denx.de>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/cpsw.c | 6 | ||||
-rw-r--r-- | drivers/net/phy/atheros.c | 2 | ||||
-rw-r--r-- | drivers/net/xilinx_emaclite.c | 17 | ||||
-rw-r--r-- | drivers/net/zynq_gem.c | 42 |
4 files changed, 53 insertions, 14 deletions
diff --git a/drivers/net/cpsw.c b/drivers/net/cpsw.c index dd6c26a..bd5fba2 100644 --- a/drivers/net/cpsw.c +++ b/drivers/net/cpsw.c @@ -941,11 +941,7 @@ static int cpsw_phy_init(struct eth_device *dev, struct cpsw_slave *slave) { struct cpsw_priv *priv = (struct cpsw_priv *)dev->priv; struct phy_device *phydev; - u32 supported = (SUPPORTED_10baseT_Half | - SUPPORTED_10baseT_Full | - SUPPORTED_100baseT_Half | - SUPPORTED_100baseT_Full | - SUPPORTED_1000baseT_Full); + u32 supported = PHY_GBIT_FEATURES; phydev = phy_connect(priv->bus, slave->data->phy_addr, diff --git a/drivers/net/phy/atheros.c b/drivers/net/phy/atheros.c index 5332e1a..b80980d 100644 --- a/drivers/net/phy/atheros.c +++ b/drivers/net/phy/atheros.c @@ -41,7 +41,7 @@ static int ar8035_config(struct phy_device *phydev) static struct phy_driver AR8021_driver = { .name = "AR8021", .uid = 0x4dd040, - .mask = 0x4fffff, + .mask = 0x4ffff0, .features = PHY_GBIT_FEATURES, .config = ar8021_config, .startup = genphy_startup, diff --git a/drivers/net/xilinx_emaclite.c b/drivers/net/xilinx_emaclite.c index 0a5209d..2a5cc44 100644 --- a/drivers/net/xilinx_emaclite.c +++ b/drivers/net/xilinx_emaclite.c @@ -14,8 +14,6 @@ #include <asm/io.h> #include <fdtdec.h> -DECLARE_GLOBAL_DATA_PTR; - #undef DEBUG #define ENET_ADDR_LENGTH 6 @@ -364,24 +362,27 @@ int xilinx_emaclite_initialize(bd_t *bis, unsigned long base_addr, } #ifdef CONFIG_OF_CONTROL -int xilinx_emaclite_init(bd_t *bis) +int xilinx_emaclite_of_init(const void *blob) { int offset = 0; u32 ret = 0; u32 reg; do { - offset = fdt_node_offset_by_compatible(gd->fdt_blob, offset, + offset = fdt_node_offset_by_compatible(blob, offset, "xlnx,xps-ethernetlite-1.00.a"); if (offset != -1) { - reg = fdtdec_get_addr(gd->fdt_blob, offset, "reg"); + reg = fdtdec_get_addr(blob, offset, "reg"); if (reg != FDT_ADDR_T_NONE) { - u32 rxpp = fdtdec_get_int(gd->fdt_blob, offset, + u32 rxpp = fdtdec_get_int(blob, offset, "xlnx,rx-ping-pong", 0); - u32 txpp = fdtdec_get_int(gd->fdt_blob, offset, + u32 txpp = fdtdec_get_int(blob, offset, "xlnx,tx-ping-pong", 0); - ret |= xilinx_emaclite_initialize(bis, reg, + ret |= xilinx_emaclite_initialize(NULL, reg, txpp, rxpp); + } else { + debug("EMACLITE: Can't get base address\n"); + return -1; } } } while (offset != -1); diff --git a/drivers/net/zynq_gem.c b/drivers/net/zynq_gem.c index 6d4001b..101489c 100644 --- a/drivers/net/zynq_gem.c +++ b/drivers/net/zynq_gem.c @@ -12,6 +12,8 @@ #include <common.h> #include <net.h> #include <config.h> +#include <fdtdec.h> +#include <libfdt.h> #include <malloc.h> #include <asm/io.h> #include <phy.h> @@ -534,3 +536,43 @@ int zynq_gem_initialize(bd_t *bis, int base_addr, int phy_addr, u32 emio) return 1; } + +#ifdef CONFIG_OF_CONTROL +int zynq_gem_of_init(const void *blob) +{ + int offset = 0; + u32 ret = 0; + u32 reg, phy_reg; + + debug("ZYNQ GEM: Initialization\n"); + + do { + offset = fdt_node_offset_by_compatible(blob, offset, + "xlnx,ps7-ethernet-1.00.a"); + if (offset != -1) { + reg = fdtdec_get_addr(blob, offset, "reg"); + if (reg != FDT_ADDR_T_NONE) { + offset = fdtdec_lookup_phandle(blob, offset, + "phy-handle"); + if (offset != -1) + phy_reg = fdtdec_get_addr(blob, offset, + "reg"); + else + phy_reg = 0; + + debug("ZYNQ GEM: addr %x, phyaddr %x\n", + reg, phy_reg); + + ret |= zynq_gem_initialize(NULL, reg, + phy_reg, 0); + + } else { + debug("ZYNQ GEM: Can't get base address\n"); + return -1; + } + } + } while (offset != -1); + + return ret; +} +#endif |