<meta http-equiv="Content-Type" content="text/html; charset=utf-8"><div dir="ltr"><div>The changes to TI sources for dp83848h should use the #ifdef __rtems__ convention since they will not be fully integrated into the rtemslwip directory.</div><div><br></div><div>Kinsey<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Mar 9, 2023 at 6:13 AM Sebastian Huber <<a href="mailto:sebastian.huber@embedded-brains.de">sebastian.huber@embedded-brains.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">---<br>
 defs/bsps/arm/tms570_base.json               |  6 ++++--<br>
 uLan/ports/driver/tms570_emac/eth_lwip.c     | 15 +++++++++++----<br>
 uLan/ports/driver/tms570_emac/phy_dp83848h.c |  1 +<br>
 uLan/ports/driver/tms570_emac/phy_dp83848h.h |  2 ++<br>
 4 files changed, 18 insertions(+), 6 deletions(-)<br>
<br>
diff --git a/defs/bsps/arm/tms570_base.json b/defs/bsps/arm/tms570_base.json<br>
index 33cd969..050f77a 100644<br>
--- a/defs/bsps/arm/tms570_base.json<br>
+++ b/defs/bsps/arm/tms570_base.json<br>
@@ -1,9 +1,11 @@<br>
 {<br>
        "header-paths-to-import": [<br>
                "uLan/ports/driver/tms570_emac",<br>
-               "uLan/ports/os"<br>
+               "uLan/ports/os",<br>
+               "cpsw/src/include"<br>
        ],<br>
        "source-paths-to-import": [<br>
-               "uLan/ports/driver/tms570_emac"<br>
+               "uLan/ports/driver/tms570_emac",<br>
+               "cpsw/src"<br>
        ]<br>
 }<br>
diff --git a/uLan/ports/driver/tms570_emac/eth_lwip.c b/uLan/ports/driver/tms570_emac/eth_lwip.c<br>
index 6105268..0315cdf 100644<br>
--- a/uLan/ports/driver/tms570_emac/eth_lwip.c<br>
+++ b/uLan/ports/driver/tms570_emac/eth_lwip.c<br>
@@ -39,7 +39,7 @@<br>
 #include "netif/etharp.h" /* includes - lwip/ip.h, lwip/netif.h, lwip/ip_addr.h, lwip/pbuf.h */<br>
 #include "eth_lwip_default.h"<br>
 #include "eth_lwip.h"<br>
-#include "beaglebone.h"<br>
+#include "tms570_netif.h"<br>
 #include <stdio.h><br>
<br>
 /* The lwIP network interface structure for the Ethernet EMAC. */<br>
@@ -72,8 +72,13 @@ eth_lwip_get_dhcp_info(void)<br>
   }<br>
 }<br>
<br>
-int8_t<br>
-eth_lwip_init(uint8_t *mac_addr)<br>
+int start_networking(<br>
+  struct netif  *net_interface,<br>
+  ip_addr_t     *ipaddr,<br>
+  ip_addr_t     *netmask,<br>
+  ip_addr_t     *gateway,<br>
+  unsigned char *mac_addr<br>
+)<br>
 {<br>
   unsigned int instance_number = 0;<br>
   int8_t retVal = SUCCESS;<br>
@@ -103,15 +108,17 @@ eth_lwip_init(uint8_t *mac_addr)<br>
 #endif<br>
<br>
   netif_tmp = netif_add(netif, &ip_addr, &net_mask, &gw_addr,<br>
-                        NULL, ETH_LWIP_INIT_NETIF_FNC, tcpip_input);<br>
+                        NULL, tms570_eth_init_netif, tcpip_input);<br>
<br>
   if (netif_tmp == NULL)<br>
     return NETIF_ADD_ERR;<br>
<br>
   netif_set_default(netif);<br>
+#if LWIP_NETIF_API<br>
   netifapi_netif_set_up(netif);<br>
 #if !STATIC_IP_ADDRESS<br>
   netifapi_dhcp_start(netif);<br>
+#endif<br>
 #endif<br>
<br>
   return retVal;<br>
diff --git a/uLan/ports/driver/tms570_emac/phy_dp83848h.c b/uLan/ports/driver/tms570_emac/phy_dp83848h.c<br>
index d20f669..dec1011 100644<br>
--- a/uLan/ports/driver/tms570_emac/phy_dp83848h.c<br>
+++ b/uLan/ports/driver/tms570_emac/phy_dp83848h.c<br>
@@ -34,6 +34,7 @@<br>
<br>
 #include "ti_drv_mdio.h"<br>
 #include "phy_dp83848h.h"<br>
+#include "mdio.h"<br>
<br>
 #ifndef TRUE<br>
 /**<br>
diff --git a/uLan/ports/driver/tms570_emac/phy_dp83848h.h b/uLan/ports/driver/tms570_emac/phy_dp83848h.h<br>
index 58d9f04..8ddb3ec 100644<br>
--- a/uLan/ports/driver/tms570_emac/phy_dp83848h.h<br>
+++ b/uLan/ports/driver/tms570_emac/phy_dp83848h.h<br>
@@ -35,6 +35,8 @@<br>
 #ifndef __DRV_PHY_H<br>
 #define __DRV_PHY_H<br>
<br>
+#include <bsp/ti_herc/reg_mdio.h><br>
+<br>
 #ifdef __cplusplus<br>
 extern "C" {<br>
 #endif<br>
-- <br>
2.35.3<br>
<br>
_______________________________________________<br>
devel mailing list<br>
<a href="mailto:devel@rtems.org" target="_blank">devel@rtems.org</a><br>
<a href="http://lists.rtems.org/mailman/listinfo/devel" rel="noreferrer" target="_blank">http://lists.rtems.org/mailman/listinfo/devel</a><br>
</blockquote></div>