net: cpsw: add vlan handling for dual_emac mode
From TI am335x Reference Manual: 14.3.2.10.2 Dual Mac Mode When operating in dual mac mode the intention is to transfer packets between ports 0 and 1 and ports 0 and 2, but not between ports 1 and 2. Each CPGMAC_SL appears as a single MAC with no bridging between MAC’s. Each CPGMAC_SL has at least one unique (not the same) mac address. Dual mac mode is configured as described below: - Set the ale_vlan_aware bit in the ALE_Control register. This bit configures the ALE to process in vlan aware mode. With X can be Port 1 or Port 2: - Configure the Port X to Port 0 VLAN. Add a VLAN Table Entry with ports 0 and X as members (clear the flood masks). Add a VLAN/Unicast Address Table Entry with the PortX/0 VLAN and a port number of 0. - Select the dual mac mode on the port 0 FIFO by setting tx_in_sel[1:0] = 01 in P0_Tx_In_Ctl. Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> |
---|
|
drivers/net/cpsw.c |
---|