aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* net: keystone: add missing statistics for k2l and k2eWingMan Kwok2015-03-101-30/+278
| | | | | | | | This patch adds the missing statistics for k2l and k2e. It also removes the ones that are not defined for these platforms. Signed-off-by: WingMan Kwok <w-kwok2@ti.com>
* net: keystone: add support of setting hw address liveWingMan Kwok2015-03-101-0/+10
| | | | | | | | | This patch adds support of setting hw address live. When doing so, the netcp needs to update the lower modules cpsw and pa to update their database accordingly, i.e. setting up their receive filters. Signed-off-by: WingMan Kwok <w-kwok2@ti.com>
* net: keystone: add support of additional 1G sgmii mode configurationsWingMan Kwok2015-03-101-3/+5
| | | | | | | | | | | | | | | | | This patch adds support of 3 1G sgmii mode configurations 1. MAC-to-PHY master (SGMII_LINK_MAC_PHY_MASTER) 2. MAC-to-PHY master NO MDIO (SGMII_LINK_MAC_PHY_MASTER_NO_MDIO) - SGMII is in master mode and auto-nego enabled - use this mode to work around link down/up issue observed on K2E/L. - these 2 modes supports only gigabit fullduplex connections. 3. MAC-to-MAC Auto-negotiation Slave (SGMII_LINK_MAC_MAC_AN_SLAVE) - When connected 2 EVMs back-to-back and one side is configured as MAC-to-MAC Auto-negotiation master the other side needs to be configured as auto-nego slave. Signed-off-by: WingMan Kwok <w-kwok2@ti.com>
* net: keystone: clean up slave port configurationsWingMan Kwok2015-03-101-29/+43
| | | | | | | | | | | | | | | | | | | | | | | | In multi-if mode: When MDIO/PHY is enabled, carrier on/off is reported to upper layer by the phy state machine, hence cpsw driver needs to report carrier on/off when the link interface type is other than MAC-to-PHY. Also, in the MAC-to-PHY case, in addition to checking the sgmii link status register, cpsw driver needs to check the bit that corresponds to the phy connected to the slave port in the phy link state variable in netcp in order to conclude the sgmii link status. Only when both of these two statuses show an up state can the cpsw driver conclude the link is up. Before this patch, it checks the aggregated value of the phy link state variable. In the case of MAC-to-MAC, the cpsw driver is responsible to report the carrier on/off status to upper layers. Signed-off-by: WingMan Kwok <w-kwok2@ti.com>
* net: keystone: Remove NetCP CPSW ALE VLAN configurationReece R. Pollack2015-02-161-53/+0
| | | | | | | | | | | An early implementation of the NetCP CPSW module configured the Address Lookup Engine (ALE) to be VLAN-aware. This was later determined to be undesirable, and the VLAN-aware bit in the ALE Control register was changed to 0. However, the code to configure VLAN-specific entries remained. This patch removes this unneeded code, and addresses a NULL pointer dereference in the process. Signed-off-by: Reece R. Pollack <x0183204@ti.com>
* net: keystone: Fix memory leak in CPSW ALE configurationReece R. Pollack2015-02-161-5/+5
| | | | | | | | | | | | | | | | | | Prior to this patch, the CPSW ALE context was created when the first interface on a device was opened, but it was not destroyed when the last interface was closed (it was stopped instead). This resulted in a memory leak. This patch corrects this. Also, the ALE Slaves were being shut down after the ALE context was being destroyed. This could result in a NULL pointer reference. This patch fixes this too. Finally, the ALE reference count in keystone_xgess.c was a non-atomic integer, while the other modules used an atomic. This patch fixes this and includes some minor restructuring so the code looks more like the other two modules. Signed-off-by: Reece R. Pollack <x0183204@ti.com>
* net: keystone: k2e k2l changes paired with k2hkWingMan Kwok2015-02-161-53/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch pairs some changes made for k2hk in two commits before but not on k2e and k2l. Original k2hk commit logs: net: keystone: Don't re-initialize CPSW host port and ALE Prior to this patch, every time an interface was brought up the CPSW host port and a number of ALE configurations were re- initialized. This is unnecessary and interferes with some uses of the CPSW by DSPs. This patch causes the CPSW host port and ALE to be configured only when the first interface on the CPSW is brought up. Note that if all of the interfaces on the CPSW are brought down, the clocks driving the CPSW (and other parts of the NetCP) are shut off for power consumption, which is assumed to cause a loss of configuration. Thus the CPSW must be re-initialized when the first interface is brought back up. net: keystone: Clean up network interface shutdown This patch also asserts SGMII RTRESET during shutdown to avoid having the hardware wedge when shutting down with high incoming traffic rates. This is cleared when the interface is brought back up. Signed-off-by: WingMan Kwok <w-kwok2@ti.com>
* net: keystone: disable slave port state on ifdownMurali Karicheri2015-01-301-0/+5
| | | | | | | Currently the slave port state is not updated when interface is brought down. This patch fixes this. Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
* net: keystone: Fixes to CPSW statistics collectionReece R. Pollack2014-12-031-86/+102
| | | | | | | | | | | | | | | | | | | | | | | In certain applications it's beneficial to allow the CPSW h/w stats counters to continue to increment even while the kernel polls them. This patch implements this behavior for both the ethss and ethss2 modules. Along the way, some bugs were discovered and fixed: In both modules, the timer routine synchronized against the ethtool- triggered updates with spin_lock_bh(). A timer function is itself a bottom-half, so this should be spin_lock(). Both modules accessed device statistics registers by dereferencing a pointer rather than using the more appropriate macro readl_relaxed(). In ethss2, the hw_stats array was undersized: 72 vs 378. This caused data following the hw_stats array to be overwritten. Also, the macro ETHTOOL_STATS_NUM calculated (42 * 8 + 1) rather than (42 * (8 + 1)) due to missing parens. Signed-off-by: Reece R. Pollack <x0183204@ti.com>
* keystone: net: use h/w capability to remove FCS from rx packetMurali Karicheri2014-12-031-1/+6
| | | | | | | CPSW_NU has a bit in control register to remove FCS from packet send on Port 0 tx. Use this to strip FCS instead of software doing it. Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
* net: keystone: cpts: add ts_comp polarity config from dts for k2e/lWingMan Kwok2014-12-031-0/+4
| | | | Signed-off-by: WingMan Kwok <w-kwok2@ti.com>
* net: keystone: enable k2l k2e cptsWingMan Kwok2014-12-031-6/+0
| | | | Signed-off-by: WingMan Kwok <w-kwok2@ti.com>
* net: keystone: ethss2: disable CPTSMurali Karicheri2014-12-031-0/+6
| | | | | | | Current CPTS driver can't be used ASIS on K2E/L. So disable the CPTS driver registration until this is implemented and working Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
* net: keystone: ethss2: fix compiler error when CPTS is disabledMurali Karicheri2014-12-031-52/+75
| | | | | | | | Currently if CPTS is disabled, network driver doesn't compile. This patch addresses this issue. While at it, move the code a bit so that ptp_filter_init() is called from cpts registration function. Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
* net: keystone: ethernet: create ethss2 plugin driverHao Zhang2014-12-031-0/+4062
This patch creates a new 1GB Ethernet driver plugin driver to support the NSS (Network Sub-System) for TI Keystone II K2E and K2L devices. The new driver supports a Ethernet switch with up to 8 EMAC (slave) ports and 1 host port. Signed-off-by: Hao Zhang <hzhang@ti.com>