Commits
Wingman Kwok committed 031c5510439
net: prueth: Add TI PRUSS Ethernet driver support of HSR PRP This patch adds the Ethernet driver support of HSR (High-availability Seamless Redundancy) and PRP (Parallel Redundancy Protocol) functionality on TI SoCs that support the aforementioned protocols over PRUSS loaded with the appropriate PRU firmware. Usage: in u-boot env (note line continuation "\" for netargs): setenv netargs 'setenv bootargs console=${console} ${optargs} \ root=/dev/nfs nfsroot=${serverip}:${rootpath},${nfsopts} rw ip=dhcp \ ti_prueth.pruss1_ethtype=${pruss1_ethtype} \ ti_prueth.pruss2_ethtype=${pruss2_ethtype}' setenv pruss1_ethtype 1 setenv pruss2_ethtype 2 where prussX_ethtype value 0 => emac 1 => hsr 2 => prp Missing ti_prueth.prussX_ethtype => emac for that pruss. prueth driver allows run time change of protocols at PRU (without rebooting the board). This is achieved using the ethtool -K command support to change feature flag to either NETIF_F_HW_PRP_RX_OFFLOAD for PRP offload and NETIF_F_HW_HSR_RX_OFFLOAD for HSR at the prueth device and restart the interfaces. At ndo_open() the driver determines the eth_type based on the feature flag and download the appropriate protocol firmware at PRU and start the PRU. Before starting PRU, driver also setup the OCMC and Shared RAM offsets to do IPC with PRU in either direction. Driver is responsible inserting the remote node MAC address in the Node Table maintained in the shared RAM and also remove expired entries. Signed-off-by: WingMan Kwok <w-kwok2@ti.com> Signed-off-by: Murali Karicheri <m-karicheri2@ti.com> Signed-off-by: Vitaly Andrianov <vitalya@ti.com> Signed-off-by: Aaron Kramer <a-kramer@ti.com>