]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
ARM: k2g: Add Ethernet Support
authorVitaly Andrianov <vitalya@ti.com>
Sat, 19 Sep 2015 10:56:52 +0000 (16:26 +0530)
committerTom Rini <trini@konsulko.com>
Thu, 22 Oct 2015 18:22:24 +0000 (14:22 -0400)
Add Ethernet support for tftp support

Signed-off-by: Vitaly Andrianov <vitalya@ti.com>
Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
board/ti/ks2_evm/board.c
board/ti/ks2_evm/board_k2g.c

index 7a5509ad09d20ff6247692bb68ee29eb87891584..73d94a6729d460f4355c15a386c7eb93bb0c845c 100644 (file)
@@ -75,9 +75,14 @@ int board_eth_init(bd_t *bis)
        int port_num;
        char link_type_name[32];
 
+       if (cpu_is_k2g())
+               writel(KS2_ETHERNET_RGMII, KS2_ETHERNET_CFG);
+
        /* By default, select PA PLL clock as PA clock source */
+#ifndef CONFIG_SOC_K2G
        if (psc_enable_module(KS2_LPSC_PA))
                return -1;
+#endif
        if (psc_enable_module(KS2_LPSC_CPGMAC))
                return -1;
        if (psc_enable_module(KS2_LPSC_CRYPTO))
index 3852138a6736e84b1796c8ec0557685954882f74..b2bc7934d5be29e28efab5b75096414fa26eaebf 100644 (file)
@@ -8,6 +8,7 @@
  */
 #include <common.h>
 #include <asm/arch/clock.h>
+#include <asm/ti-common/keystone_net.h>
 #include "mux-k2g.h"
 
 #define SYS_CLK                24000000
@@ -74,3 +75,21 @@ void spl_init_keystone_plls(void)
        init_plls();
 }
 #endif
+
+#ifdef CONFIG_DRIVER_TI_KEYSTONE_NET
+struct eth_priv_t eth_priv_cfg[] = {
+       {
+               .int_name       = "K2G_EMAC",
+               .rx_flow        = 0,
+               .phy_addr       = 0,
+               .slave_port     = 1,
+               .sgmii_link_type = SGMII_LINK_MAC_PHY,
+               .phy_if          = PHY_INTERFACE_MODE_RGMII,
+       },
+};
+
+int get_num_eth_ports(void)
+{
+       return sizeof(eth_priv_cfg) / sizeof(struct eth_priv_t);
+}
+#endif