am335x_eth_driver.c
bool_t osSetEventFromIsr(OsEvent *event)
Set an event object to the signaled state from an interrupt service routine.
Definition: os_port_chibios.c:270
error_t am335xEthUpdateMacConfig(NetInterface *interface)
Adjust MAC configuration parameters for proper operation.
Definition: am335x_eth_driver.c:1438
void am335xEthInitInstance(NetInterface *interface)
Initialize CPSW instance.
Definition: am335x_eth_driver.c:327
void macAddrToEui64(const MacAddr *macAddr, Eui64 *interfaceId)
Map a MAC address to the IPv6 modified EUI-64 identifier.
Definition: ethernet.c:946
size_t netBufferRead(void *dest, const NetBuffer *src, size_t srcOffset, size_t length)
Read data from a multi-part buffer.
Definition: net_mem.c:690
void am335xEthWriteEntry(uint_t index, const Am335xAleEntry *entry)
Write an ALE table entry.
Definition: am335x_eth_driver.c:1586
const NicDriver am335xEthPort1Driver
AM335x Ethernet MAC driver (port1)
Definition: am335x_eth_driver.c:126
#define CPSW_ALE_WORD1_ENTRY_TYPE_VLAN_ADDR
Definition: am243x_eth_driver.h:60
const NicDriver am335xEthPort2Driver
AM335x Ethernet MAC driver (port2)
Definition: am335x_eth_driver.c:151
uint_t am335xEthFindFreeEntry(void)
Find a free entry in the ALE table.
Definition: am335x_eth_driver.c:1621
#define CPSW_ALE_WORD0_VLAN_MEMBER_LIST(n)
Definition: am243x_eth_driver.h:94
uint16_t am335xEthReadPhyReg(uint8_t opcode, uint8_t phyAddr, uint8_t regAddr)
Read PHY register.
Definition: am335x_eth_driver.c:1543
#define CPSW_CPDMA_STATERAM_RX_CP_R(n)
Definition: am335x_eth_driver.h:180
void nicProcessPacket(NetInterface *interface, uint8_t *packet, size_t length, NetRxAncillary *ancillary)
Handle a packet received by the network controller.
Definition: nic.c:392
#define CPSW_ALE_WORD1_ENTRY_TYPE_VLAN
Definition: am243x_eth_driver.h:59
error_t am335xEthInitPort2(NetInterface *interface)
AM335x Ethernet MAC initialization (port 2)
Definition: am335x_eth_driver.c:253
uint_t am335xEthFindVlanAddrEntry(uint_t vlanId, MacAddr *macAddr)
Search the ALE table for the specified VLAN/address entry.
Definition: am335x_eth_driver.c:1697
void am335xEthDisableIrq(NetInterface *interface)
Disable interrupts.
Definition: am335x_eth_driver.c:894
#define CPSW_CPDMA_EOI_VECTOR_TX_PULSE
Definition: am335x_eth_driver.h:303
error_t am335xEthSendPacketPort2(NetInterface *interface, const NetBuffer *buffer, size_t offset, NetTxAncillary *ancillary)
Send a packet (port 2)
Definition: am335x_eth_driver.c:1295
#define CPSW_CPDMA_EOI_VECTOR_RX_PULSE
Definition: am335x_eth_driver.h:302
#define CONTROL_GMII_SEL_GMII1_SEL_MII
Definition: am335x_eth_driver.h:296
__weak_func void am335xEthInitGpio(NetInterface *interface)
GPIO configuration.
Definition: am335x_eth_driver.c:500
#define CONTROL_GMII_SEL_GMII1_SEL_RGMII
Definition: am335x_eth_driver.h:298
#define CPSW_PORT_P_TX_IN_CTL_SEL_DUAL_MAC
Definition: am335x_eth_driver.h:307
error_t am335xEthUpdateMacAddrFilter(NetInterface *interface)
Configure MAC address filtering.
Definition: am335x_eth_driver.c:1380
void am335xEthWritePhyReg(uint8_t opcode, uint8_t phyAddr, uint8_t regAddr, uint16_t data)
Write PHY register.
Definition: am335x_eth_driver.c:1504
error_t am335xEthSendPacketPort1(NetInterface *interface, const NetBuffer *buffer, size_t offset, NetTxAncillary *ancillary)
Send a packet (port 1)
Definition: am335x_eth_driver.c:1206
error_t am335xEthAddVlanAddrEntry(uint_t port, uint_t vlanId, MacAddr *macAddr)
Add a VLAN/address entry in the ALE table.
Definition: am335x_eth_driver.c:1808
#define CPSW_ALE_WORD1_MCAST_FWD_STATE(n)
Definition: am243x_eth_driver.h:77
size_t netBufferGetLength(const NetBuffer *buffer)
Get the actual length of a multi-part buffer.
Definition: net_mem.c:297
error_t am335xEthAddVlanEntry(uint_t port, uint_t vlanId)
Add a VLAN entry in the ALE table.
Definition: am335x_eth_driver.c:1748
#define CPSW_CPDMA_STATERAM_TX_CP_R(n)
Definition: am335x_eth_driver.h:179
#define CPSW_CPDMA_STATERAM_RX_HDP_R(n)
Definition: am335x_eth_driver.h:178
#define CPSW_ALE_WORD0_FORCE_UNTAG_EGRESS(n)
Definition: am243x_eth_driver.h:89
#define CONTROL_GMII_SEL_GMII1_SEL_RMII
Definition: am335x_eth_driver.h:297
void am335xEthEnableIrq(NetInterface *interface)
Enable interrupts.
Definition: am335x_eth_driver.c:858
uint_t am335xEthFindVlanEntry(uint_t vlanId)
Search the ALE table for the specified VLAN entry.
Definition: am335x_eth_driver.c:1655
void am335xEthEventHandler(NetInterface *interface)
AM335x Ethernet MAC event handler.
Definition: am335x_eth_driver.c:1072
void am335xEthInitBufferDesc(NetInterface *interface)
Initialize buffer descriptor lists.
Definition: am335x_eth_driver.c:715
#define CPSW_ALE_WORD1_ENTRY_TYPE_MASK
Definition: am243x_eth_driver.h:56
#define CPSW_CPDMA_STATERAM_TX_HDP_R(n)
Definition: am335x_eth_driver.h:177
void am335xEthReadEntry(uint_t index, Am335xAleEntry *entry)
Read an ALE table entry.
Definition: am335x_eth_driver.c:1604
Sitara AM335x Gigabit Ethernet MAC driver.
void osSetEvent(OsEvent *event)
Set the specified event object to the signaled state.
Definition: os_port_chibios.c:202
#define CPSW_ALE_WORD1_ENTRY_TYPE_FREE
Definition: am243x_eth_driver.h:57
void am335xEthTick(NetInterface *interface)
AM335x Ethernet MAC timer handler.
Definition: am335x_eth_driver.c:821
error_t am335xEthInitPort1(NetInterface *interface)
AM335x Ethernet MAC initialization (port 1)
Definition: am335x_eth_driver.c:178
#define CONTROL_GMII_SEL_GMII2_SEL_RGMII
Definition: am335x_eth_driver.h:295
TCP/IP stack core.
error_t am335xEthDeleteVlanAddrEntry(uint_t port, uint_t vlanId, MacAddr *macAddr)
Remove a VLAN/address entry from the ALE table.
Definition: am335x_eth_driver.c:1879
Debugging facilities.