Commit 6c0fb41a0ac6e83728280c5946f0c7c25ec61da1

Authored by Khoronzhuk, Ivan
Committed by Tom Rini
1 parent 87ac27bd5b

net: keystone_net: add Keystone2 K2L SoC support

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>

Showing 2 changed files with 7 additions and 1 deletions Side-by-side Diff

arch/arm/include/asm/arch-keystone/hardware-k2l.h
... ... @@ -102,5 +102,8 @@
102 102 #define KS2_NETCP_PDMA_RX_FLOW_NUM 96
103 103 #define KS2_NETCP_PDMA_TX_SND_QUEUE 896
104 104  
  105 +/* NETCP */
  106 +#define KS2_NETCP_BASE 0x26000000
  107 +
105 108 #endif /* __ASM_ARCH_HARDWARE_K2L_H */
drivers/net/keystone_net.c
... ... @@ -315,7 +315,7 @@
315 315 writel(cfg->max_rx_len, DEVICE_EMACSL_BASE(port) + CPGMACSL_REG_MAXLEN);
316 316 writel(cfg->ctl, DEVICE_EMACSL_BASE(port) + CPGMACSL_REG_CTL);
317 317  
318   -#ifdef CONFIG_K2E_EVM
  318 +#if defined(CONFIG_SOC_K2E) || defined(CONFIG_SOC_K2L)
319 319 /* Map RX packet flow priority to 0 */
320 320 writel(0, DEVICE_EMACSL_BASE(port) + CPGMACSL_REG_RX_PRI_MAP);
321 321 #endif
... ... @@ -399,6 +399,9 @@
399 399 (eth_priv->sgmii_link_type == SGMII_LINK_MAC_PHY) ? 1 : 0;
400 400  
401 401 keystone2_net_serdes_setup();
  402 +
  403 + if (sys_has_mdio)
  404 + keystone2_mdio_reset(mdio_bus);
402 405  
403 406 keystone_sgmii_config(phy_dev, eth_priv->slave_port - 1,
404 407 eth_priv->sgmii_link_type);