summaryrefslogtreecommitdiff
path: root/drivers/net
diff options
context:
space:
mode:
authorHao Zhang <hzhang@ti.com>2014-09-29 22:17:20 +0300
committerTom Rini <trini@ti.com>2014-10-23 11:27:05 -0400
commitb2cfe32278478dbf4b08a06f8d48436fc3d4ae7e (patch)
tree0ddd57ec160d87a41b80fc6b91851d0f0a535b44 /drivers/net
parent8347210a3f158f0d40ced048673d8602802ed9cc (diff)
downloadu-boot-imx-b2cfe32278478dbf4b08a06f8d48436fc3d4ae7e.zip
u-boot-imx-b2cfe32278478dbf4b08a06f8d48436fc3d4ae7e.tar.gz
u-boot-imx-b2cfe32278478dbf4b08a06f8d48436fc3d4ae7e.tar.bz2
net: keystone_net: remove SoC specific emac_regs structure
This patch removes K2HK SOC specifc emac_regs structure, it uses soc specific register offset to keep the network driver common across all the Keystone II EVMs. Acked-by: Murali Karicheri <m-karicheri2@ti.com> Signed-off-by: Hao Zhang <hzhang@ti.com> Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@ti.com>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/keystone_net.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/net/keystone_net.c b/drivers/net/keystone_net.c
index 66532ee..4abde57 100644
--- a/drivers/net/keystone_net.c
+++ b/drivers/net/keystone_net.c
@@ -45,8 +45,6 @@ static void keystone2_eth_mdio_enable(void);
static int gen_get_link_speed(int phy_addr);
/* EMAC Addresses */
-static volatile struct emac_regs *adap_emac =
- (struct emac_regs *)EMAC_EMACSL_BASE_ADDR;
static volatile struct mdio_regs *adap_mdio =
(struct mdio_regs *)EMAC_MDIO_BASE_ADDR;
@@ -169,10 +167,10 @@ static void __attribute__((unused))
* Check if link detected is giga-bit
* If Gigabit mode detected, enable gigbit in MAC
*/
- writel(readl(&(adap_emac[eth_priv->slave_port - 1].maccontrol)) |
+ writel(readl(DEVICE_EMACSL_BASE(eth_priv->slave_port - 1) +
+ CPGMACSL_REG_CTL) |
EMAC_MACCONTROL_GIGFORCE | EMAC_MACCONTROL_GIGABIT_ENABLE,
- &(adap_emac[eth_priv->slave_port - 1].maccontrol))
- ;
+ DEVICE_EMACSL_BASE(eth_priv->slave_port - 1) + CPGMACSL_REG_CTL);
}
int keystone_sgmii_link_status(int port)