diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2023-03-09 12:58:22 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2023-03-24 11:22:53 +0100 |
commit | 5fc0adebb90bbcd95d70168d5b167317ee42cf9b (patch) | |
tree | b936e3b0fdce3a3faae3e020269e5cfb6b4665c5 | |
parent | rtemslwip: Use interrupt server for ISRs (diff) | |
download | rtems-lwip-5fc0adebb90bbcd95d70168d5b167317ee42cf9b.tar.bz2 |
Fix build for arm/tms570 BSPs
-rw-r--r-- | defs/bsps/arm/tms570_base.json | 6 | ||||
-rw-r--r-- | uLan/ports/driver/tms570_emac/eth_lwip.c | 15 | ||||
-rw-r--r-- | uLan/ports/driver/tms570_emac/phy_dp83848h.c | 3 | ||||
-rw-r--r-- | uLan/ports/driver/tms570_emac/phy_dp83848h.h | 4 |
4 files changed, 22 insertions, 6 deletions
diff --git a/defs/bsps/arm/tms570_base.json b/defs/bsps/arm/tms570_base.json index 33cd969..050f77a 100644 --- a/defs/bsps/arm/tms570_base.json +++ b/defs/bsps/arm/tms570_base.json @@ -1,9 +1,11 @@ { "header-paths-to-import": [ "uLan/ports/driver/tms570_emac", - "uLan/ports/os" + "uLan/ports/os", + "cpsw/src/include" ], "source-paths-to-import": [ - "uLan/ports/driver/tms570_emac" + "uLan/ports/driver/tms570_emac", + "cpsw/src" ] } diff --git a/uLan/ports/driver/tms570_emac/eth_lwip.c b/uLan/ports/driver/tms570_emac/eth_lwip.c index 6105268..0315cdf 100644 --- a/uLan/ports/driver/tms570_emac/eth_lwip.c +++ b/uLan/ports/driver/tms570_emac/eth_lwip.c @@ -39,7 +39,7 @@ #include "netif/etharp.h" /* includes - lwip/ip.h, lwip/netif.h, lwip/ip_addr.h, lwip/pbuf.h */ #include "eth_lwip_default.h" #include "eth_lwip.h" -#include "beaglebone.h" +#include "tms570_netif.h" #include <stdio.h> /* The lwIP network interface structure for the Ethernet EMAC. */ @@ -72,8 +72,13 @@ eth_lwip_get_dhcp_info(void) } } -int8_t -eth_lwip_init(uint8_t *mac_addr) +int start_networking( + struct netif *net_interface, + ip_addr_t *ipaddr, + ip_addr_t *netmask, + ip_addr_t *gateway, + unsigned char *mac_addr +) { unsigned int instance_number = 0; int8_t retVal = SUCCESS; @@ -103,16 +108,18 @@ eth_lwip_init(uint8_t *mac_addr) #endif netif_tmp = netif_add(netif, &ip_addr, &net_mask, &gw_addr, - NULL, ETH_LWIP_INIT_NETIF_FNC, tcpip_input); + NULL, tms570_eth_init_netif, tcpip_input); if (netif_tmp == NULL) return NETIF_ADD_ERR; netif_set_default(netif); +#if LWIP_NETIF_API netifapi_netif_set_up(netif); #if !STATIC_IP_ADDRESS netifapi_dhcp_start(netif); #endif +#endif return retVal; } diff --git a/uLan/ports/driver/tms570_emac/phy_dp83848h.c b/uLan/ports/driver/tms570_emac/phy_dp83848h.c index d20f669..91516bf 100644 --- a/uLan/ports/driver/tms570_emac/phy_dp83848h.c +++ b/uLan/ports/driver/tms570_emac/phy_dp83848h.c @@ -34,6 +34,9 @@ #include "ti_drv_mdio.h" #include "phy_dp83848h.h" +#ifdef __rtems__ +#include "mdio.h" +#endif /* __rtems__ */ #ifndef TRUE /** diff --git a/uLan/ports/driver/tms570_emac/phy_dp83848h.h b/uLan/ports/driver/tms570_emac/phy_dp83848h.h index 58d9f04..d45ecc5 100644 --- a/uLan/ports/driver/tms570_emac/phy_dp83848h.h +++ b/uLan/ports/driver/tms570_emac/phy_dp83848h.h @@ -35,6 +35,10 @@ #ifndef __DRV_PHY_H #define __DRV_PHY_H +#ifdef __rtems__ +#include <bsp/ti_herc/reg_mdio.h> +#endif /* __rtems__ */ + #ifdef __cplusplus extern "C" { #endif |