diff mbox

[U-Boot,U-boot,3/4] net: keystone_net: add Keystone2 K2L SoC support

Message ID 1414580974-4669-4-git-send-email-ivan.khoronzhuk@ti.com
State Accepted
Delegated to: Tom Rini
Headers show

Commit Message

Ivan Khoronzhuk Oct. 29, 2014, 11:09 a.m. UTC
The Keystone2 Lamar SoC uses the same keystone net driver.
This patch adds opportunity to use it by K2L SoCs.

Acked-by: Murali Karicheri <m-karicheri2@ti.com>
Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@ti.com>
---
 arch/arm/include/asm/arch-keystone/hardware-k2l.h | 3 +++
 drivers/net/keystone_net.c                        | 5 ++++-
 2 files changed, 7 insertions(+), 1 deletion(-)

Comments

Tom Rini Nov. 5, 2014, 9:30 p.m. UTC | #1
On Wed, Oct 29, 2014 at 01:09:33PM +0200, Khoronzhuk, Ivan wrote:

> The Keystone2 Lamar SoC uses the same keystone net driver.
> This patch adds opportunity to use it by K2L SoCs.
> 
> Acked-by: Murali Karicheri <m-karicheri2@ti.com>
> Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@ti.com>

Applied to u-boot-ti/master, thanks!
diff mbox

Patch

diff --git a/arch/arm/include/asm/arch-keystone/hardware-k2l.h b/arch/arm/include/asm/arch-keystone/hardware-k2l.h
index da448fd..4f1197e 100644
--- a/arch/arm/include/asm/arch-keystone/hardware-k2l.h
+++ b/arch/arm/include/asm/arch-keystone/hardware-k2l.h
@@ -102,4 +102,7 @@ 
 #define KS2_NETCP_PDMA_RX_FLOW_NUM	96
 #define KS2_NETCP_PDMA_TX_SND_QUEUE	896
 
+/* NETCP */
+#define KS2_NETCP_BASE			0x26000000
+
 #endif /* __ASM_ARCH_HARDWARE_K2L_H */
diff --git a/drivers/net/keystone_net.c b/drivers/net/keystone_net.c
index 83eeeda..bedab1d 100644
--- a/drivers/net/keystone_net.c
+++ b/drivers/net/keystone_net.c
@@ -315,7 +315,7 @@  int mac_sl_config(u_int16_t port, struct mac_sl_cfg *cfg)
 	writel(cfg->max_rx_len, DEVICE_EMACSL_BASE(port) + CPGMACSL_REG_MAXLEN);
 	writel(cfg->ctl, DEVICE_EMACSL_BASE(port) + CPGMACSL_REG_CTL);
 
-#ifdef CONFIG_K2E_EVM
+#if defined(CONFIG_SOC_K2E) || defined(CONFIG_SOC_K2L)
 	/* Map RX packet flow priority to 0 */
 	writel(0, DEVICE_EMACSL_BASE(port) + CPGMACSL_REG_RX_PRI_MAP);
 #endif
@@ -400,6 +400,9 @@  static int keystone2_eth_open(struct eth_device *dev, bd_t *bis)
 
 	keystone2_net_serdes_setup();
 
+	if (sys_has_mdio)
+		keystone2_mdio_reset(mdio_bus);
+
 	keystone_sgmii_config(phy_dev, eth_priv->slave_port - 1,
 			      eth_priv->sgmii_link_type);