aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/cadence/macb.h
AgeCommit message (Collapse)AuthorFilesLines
2012-11-07net/at91_ether: use stat function from macbJoachim Eastwood1-0/+1
Signed-off-by: Joachim Eastwood <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-11-07net/macb: export macb_set_hwaddr and macb_get_hwaddrJoachim Eastwood1-0/+2
for usage in at91_ether driver. Signed-off-by: Joachim Eastwood <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-11-01net/macb: better manage tx errorsNicolas Ferre1-0/+1
Handle all TX errors, not only underruns. TX error management is deferred to a dedicated workqueue. Reinitialize the TX ring after treating all remaining frames, and restart the controller when everything has been cleaned up properly. Napi is not stopped during this task as the driver only handles napi for RX for now. With this sequence, we do not need a special check during the xmit method as the packets will be caught by TX disable during workqueue execution. Signed-off-by: Nicolas Ferre <[email protected]> Tested-by: Joachim Eastwood <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-11-01net/macb: ethtool interface: add register dump featureNicolas Ferre1-0/+3
Add macb_get_regs() ethtool function and its helper function: macb_get_regs_len(). The version field is deduced from the IP revision which gives the "MACB or GEM" information. An additional version field is reserved. Signed-off-by: Nicolas Ferre <[email protected]> Reviewed-by: Ben Hutchings <[email protected]> Tested-by: Joachim Eastwood <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-11-01net/macb: clean up ring buffer logicHavard Skinnemoen1-7/+15
Instead of masking head and tail every time we increment them, just let them wrap through UINT_MAX and mask them when subscripting. Add simple accessor functions to do the subscripting properly to minimize the chances of messing this up. This makes the code slightly smaller, and hopefully faster as well. Also, doing the ring buffer management this way will simplify things a lot when making the ring sizes configurable in the future. Available number of descriptors in ring buffer function by David Laight. Signed-off-by: Havard Skinnemoen <[email protected]> [[email protected]: split patch in topics, adapt to newer kernel] Signed-off-by: Nicolas Ferre <[email protected]> Tested-by: Joachim Eastwood <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-11-01net/macb: Add support for Gigabit Ethernet modePatrice Vilchez1-0/+4
Add Gigabit Ethernet mode to GEM cadence IP and enable RGMII connection. Signed-off-by: Patrice Vilchez <[email protected]> Signed-off-by: Nicolas Ferre <[email protected]> Tested-by: Joachim Eastwood <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-10-19net/at91_ether: clean up rx buffer handlingJoachim Eastwood1-13/+0
This patch does two things: * Use macb struct members and remove at91_ether ones * Alloc DMA buffers on netdev start and dealloc on stop Signed-off-by: Joachim Eastwood <[email protected]>
2012-10-19net/at91_ether: use macb dma description structJoachim Eastwood1-6/+1
Signed-off-by: Joachim Eastwood <[email protected]>
2012-10-19net/at91_ether: share macb_set_rx_mode with macbJoachim Eastwood1-0/+1
Signed-off-by: Joachim Eastwood <[email protected]>
2012-10-19net/at91_ether: use ethtool and mdio from macbJoachim Eastwood1-7/+0
This rips out the at91_ether phy handling and ethtool stuff and replace it with equivalent stuff from macb. The only thing lost is the phy irq support from at91_ether, but this can be added to macb and then benefit all users. Signed-off-by: Joachim Eastwood <[email protected]>
2012-10-19net/macb: export some symbols for at91_etherJoachim Eastwood1-0/+5
Export some symbols to start sharing code between macb and at91_ether drivers. Signed-off-by: Joachim Eastwood <[email protected]>
2012-10-19net/at91_ether: use pclk member instead of ether_clkJoachim Eastwood1-1/+0
Remove old at91_priv member and use pclk member from macb. Signed-off-by: Joachim Eastwood <[email protected]>
2012-10-19net/at91_ether/macb: absorb at91_private in to macb private structJoachim Eastwood1-0/+36
This will make it easier to share code between the drivers and eventually merge them into one driver. Signed-off-by: Joachim Eastwood <[email protected]>
2012-10-19net/macb: add AT91RM9200 specific registers and bits to headerJoachim Eastwood1-0/+6
Signed-off-by: Joachim Eastwood <[email protected]>
2011-12-16net/macb: add DT support for Cadence macb/gem driverJean-Christophe PLAGNIOL-VILLARD1-0/+2
Allow the device tree to provide the mac address and the phy mode. Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <[email protected]> [[email protected]: change "compatible" node property, doc and DT hwaddr] Signed-off-by: Nicolas Ferre <[email protected]> [[email protected]: add "gem" compatibility strings and doc] Acked-by: Jamie Iles<[email protected]> Acked-by: David S. Miller <[email protected]>
2011-11-22macb: allow GEM to have configurable receive buffer sizeJamie Iles1-0/+5
GEM has configurable receive buffer sizes so requires this to be programmed up. Any size < 2048 and a multiple of 64 bytes is permitted. Signed-off-by: Jamie Iles <[email protected]> Acked-by: David S. Miller <[email protected]> Acked-by: Nicolas Ferre <[email protected]> Tested-by: Jean-Christophe PLAGNIOL-VILLARD <[email protected]>
2011-11-22macb: support DMA bus widths > 32 bitsJamie Iles1-0/+19
Some GEM implementations may support DMA bus widths up to 128 bits. We can get the maximum supported DMA bus width from the design configuration register so use that to program the device up. Signed-off-by: Jamie Iles <[email protected]> Acked-by: David S. Miller <[email protected]> Acked-by: Nicolas Ferre <[email protected]> Tested-by: Jean-Christophe PLAGNIOL-VILLARD <[email protected]>
2011-11-22macb: support statistics for GEM devicesJamie Iles1-1/+53
GEM devices have a different number of statistics registers and they are at a different offset to MACB devices. Make the statistics collection method dependent on device type. Signed-off-by: Jamie Iles <[email protected]> Acked-by: David S. Miller <[email protected]> Acked-by: Nicolas Ferre <[email protected]> Tested-by: Jean-Christophe PLAGNIOL-VILLARD <[email protected]>
2011-11-22macb: support higher rate GEM MDIO clock divisorsJamie Iles1-0/+11
GEM devices support larger clock divisors and have a different range of divisors. Program the MDIO clock divisors based on the device type. Signed-off-by: Jamie Iles <[email protected]> Acked-by: David S. Miller <[email protected]> Acked-by: Nicolas Ferre <[email protected]> Tested-by: Jean-Christophe PLAGNIOL-VILLARD <[email protected]>
2011-11-22macb: initial support for Cadence GEMJamie Iles1-0/+61
The Cadence GEM is based on the MACB Ethernet controller but has a few small changes with regards to register and bitfield placement. This patch detects the presence of a GEM by reading the module ID register and setting a flag appropriately. This handles the new HW address, USRIO and hash register base register locations in GEM. v3: - convert to macb_is_gem() inline rather than storing a boolean flag - handle rx_overrun stats for gem Acked-by: David S. Miller <[email protected]> Acked-by: Nicolas Ferre <[email protected]> Cc: Jean-Christophe PLAGNIOL-VILLARD <[email protected]> Signed-off-by: Jamie Iles <[email protected]> Tested-by: Jean-Christophe PLAGNIOL-VILLARD <[email protected]>
2011-08-12macb: Move the Atmel driverJeff Kirsher1-0/+394
Move the Atmel driver into drivers/net/ethernet/cadence/ and make the necessary Kconfig and Makefile changes. CC: Nicolas Ferre <[email protected]> CC: Jamie Iles <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]> Acked-by: Jamie Iles <[email protected]> Acked-by: Nicolas Ferre <[email protected]>