summaryrefslogtreecommitdiff
path: root/drivers/net
diff options
context:
space:
mode:
authorHao Zhang <hzhang@ti.com>2014-10-22 17:18:23 +0300
committerTom Rini <trini@ti.com>2014-10-23 11:27:28 -0400
commit92a16c81f5c5b43779520dbc7278f3d7cfb24684 (patch)
treec239dc17624ebf8a26c5a51c4cebb22774ed3d3b /drivers/net
parent95f74dad912563181e4701dc4bc163c49c2bd3b3 (diff)
downloadu-boot-imx-92a16c81f5c5b43779520dbc7278f3d7cfb24684.zip
u-boot-imx-92a16c81f5c5b43779520dbc7278f3d7cfb24684.tar.gz
u-boot-imx-92a16c81f5c5b43779520dbc7278f3d7cfb24684.tar.bz2
soc: keystone_serdes: generalize to be used by other sub systems
SerDes driver is used by other sub systems like PCI, sRIO etc. So modify it to be more general. The SerDes driver provides common API's that can also be extended for other peripherals SerDes configurations. 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.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/drivers/net/keystone_net.c b/drivers/net/keystone_net.c
index 63f3361..8a45fbd 100644
--- a/drivers/net/keystone_net.c
+++ b/drivers/net/keystone_net.c
@@ -554,7 +554,20 @@ int keystone2_emac_initialize(struct eth_priv_t *eth_priv)
return 0;
}
+struct ks2_serdes ks2_serdes_sgmii_156p25mhz = {
+ .clk = SERDES_CLOCK_156P25M,
+ .rate = SERDES_RATE_5G,
+ .rate_mode = SERDES_QUARTER_RATE,
+ .intf = SERDES_PHY_SGMII,
+ .loopback = 0,
+};
+
static void keystone2_net_serdes_setup(void)
{
- ks2_serdes_sgmii_156p25mhz_setup();
+ ks2_serdes_init(CONFIG_KSNET_SERDES_SGMII_BASE,
+ &ks2_serdes_sgmii_156p25mhz,
+ CONFIG_KSNET_SERDES_LANES_PER_SGMII);
+
+ /* wait till setup */
+ udelay(5000);
}