aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/cadence
AgeCommit message (Collapse)AuthorFilesLines
2012-11-01net/macb: tx status is more than 8 bits nowNicolas Ferre1-1/+1
On some revision of GEM, TSR status register has more information. 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: remove macb_get_drvinfo()Nicolas Ferre1-11/+0
This function has little meaning so remove it altogether and let ethtool core fill in the fields automatically. 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: change debugging messagesHavard Skinnemoen1-10/+12
Convert some noisy netdev_dbg() statements to netdev_vdbg(). Defining DEBUG will no longer fill up the logs; VERBOSE_DEBUG still does. Add one more verbose debug for ISR status. Signed-off-by: Havard Skinnemoen <[email protected]> [[email protected]: split patch in topics, add ISR status] 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: memory barriers cleanupHavard Skinnemoen1-4/+14
Remove a couple of unneeded barriers and document the remaining ones. Signed-off-by: Havard Skinnemoen <[email protected]> [[email protected]: split patch in topics] 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 Vilchez2-3/+16
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-31net/cadence: depend on HAS_IOMEMJoachim Eastwood1-0/+1
Fixes the following build failure on S390: In file included from drivers/net/ethernet/cadence/at91_ether.c:35:0: drivers/net/ethernet/cadence/macb.h: In function 'macb_is_gem': drivers/net/ethernet/cadence/macb.h:563:2: error: implicit declaration of function '__raw_readl' [-Werror=implicit-function-declaration] drivers/net/ethernet/cadence/at91_ether.c: In function 'update_mac_address': drivers/net/ethernet/cadence/at91_ether.c:119:2: error: implicit declaration of function '__raw_writel' [-Werror=implicit-function-declaration] cc1: some warnings being treated as errors Reported-by: Fengguang Wu <[email protected]> Signed-off-by: Joachim Eastwood <[email protected]> Acked-by: Nicolas Ferre <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-10-23net/at91_ether: add pdata flag for reverse Eth addrJoachim Eastwood2-4/+2
This will allow us to remove the last mach include from at91_ether and also make it easier to share address setup with macb. Signed-off-by: Joachim Eastwood <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-10-23net/at91_ether: select MACB in KconfigJoachim Eastwood2-2/+2
Now that HAVE_NET_MACB is gone let's just select MACB to satisfy the dependecies in at91_ether. Signed-off-by: Joachim Eastwood <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-10-23net/cadence: get rid of HAVE_NET_MACBJoachim Eastwood1-5/+0
macb is a platform driver and there is nothing that prevents this driver from being built on non-ARM/AVR32 platforms. Signed-off-by: Joachim Eastwood <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-10-23net/macb: fix truncate warningsJoachim Eastwood1-4/+4
When building macb on x86_64 the following warnings show up: drivers/net/ethernet/cadence/macb.c: In function macb_interrupt: drivers/net/ethernet/cadence/macb.c:556:4: warning: large integer implicitly truncated to unsigned type [-Woverflow] drivers/net/ethernet/cadence/macb.c: In function macb_reset_hw: drivers/net/ethernet/cadence/macb.c:792:2: warning: large integer implicitly truncated to unsigned type [-Woverflow] drivers/net/ethernet/cadence/macb.c:793:2: warning: large integer implicitly truncated to unsigned type [-Woverflow] drivers/net/ethernet/cadence/macb.c:796:2: warning: large integer implicitly truncated to unsigned type [-Woverflow] Use -1 insted of ~0UL, as done in other places in the driver, to silence these warnings. Signed-off-by: Joachim Eastwood <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-10-19net/at91_ether: convert to devm_* functionsJoachim Eastwood1-18/+7
Signed-off-by: Joachim Eastwood <[email protected]>
2012-10-19net/at91_ether: clean up rx buffer handlingJoachim Eastwood2-51/+68
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 Eastwood2-9/+4
Signed-off-by: Joachim Eastwood <[email protected]>
2012-10-19net/at91_ether: share macb_set_rx_mode with macbJoachim Eastwood3-107/+4
Signed-off-by: Joachim Eastwood <[email protected]>
2012-10-19net/at91_ether: use ethtool and mdio from macbJoachim Eastwood3-673/+31
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/at91_ether: compile macb for exported functionsJoachim Eastwood2-2/+2
Comile macb as well as at91_ether to access exported functions. Signed-off-by: Joachim Eastwood <[email protected]>
2012-10-19net/macb: export some symbols for at91_etherJoachim Eastwood2-3/+11
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 Eastwood2-13/+12
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 Eastwood3-79/+71
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/at91_ether: use macb defs for rx dma buffersJoachim Eastwood2-11/+4
Signed-off-by: Joachim Eastwood <[email protected]>
2012-10-19net/at91_ether: use macb access functionsJoachim Eastwood2-82/+64
Use macb read/write funtions and remove the old at91_ether ones. Signed-off-by: Joachim Eastwood <[email protected]>
2012-10-19net/at91_ether: use macb register definitionsJoachim Eastwood1-80/+84
Use register and bits definitions from the macb header. This makes it possible to have one header file for this hardware. Process was scripted and the resulting object file has the same checksum. 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]>
2012-09-20at91ether: return PTR_ERR if call to clk_get failsDevendra Naga1-1/+1
we are currently returning ENODEV, as the clk_get may give a exact error code in its returned pointer, assign it to the ret by using the PTR_ERR function, so that the subsequent goto label will jump to the error path and clean the driver and return the error correctly. Signed-off-by: Devendra Naga <[email protected]> Acked-by: Nicolas Ferre <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-07-09net/macb: manage carrier state with call to netif_carrier_{on|off}()Nicolas Ferre1-2/+11
OFF carrier state is setup in probe() open() and suspend() functions. The carrier ON state is managed in macb_handle_link_change(). Signed-off-by: Nicolas Ferre <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-04-28net/at91_ether: use gpio_to_irq for phy IRQ lineNicolas Ferre1-4/+4
Use the gpio_to_irq() function to retrieve the phy IRQ line from the GPIO pin specification. This fix is needed now that we have moved to irqdomains on AT91. Reported-by: Jamie Iles <[email protected]> Signed-off-by: Nicolas Ferre <[email protected]> Cc: Andrew Victor <[email protected]> Cc: David S. Miller <[email protected]> Cc: [email protected] Signed-off-by: David S. Miller <[email protected]>
2012-04-28AT91: Remove fixed mapping for AT91RM9200 ethernetAndrew Victor2-243/+285
The AT91RM9200 Ethernet controller still has a fixed IO mapping. So: * Remove the fixed IO mapping and AT91_VA_BASE_EMAC definition. * Pass the physical base-address via platform-resources to the driver. * Convert at91_ether.c driver to perform an ioremap(). * Ethernet PHY detection needs to be performed during the driver initialization process, it can no longer be done first. Signed-off-by: Andrew Victor <[email protected]> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <[email protected]> Signed-off-by: Nicolas Ferre <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-04-04macb: Support the get_ts_info ethtool method.Richard Cochran1-0/+1
Signed-off-by: Richard Cochran <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-02-15net: replace random_ether_addr() with eth_hw_addr_random()Danny Kukawka1-1/+1
Replace usage of random_ether_addr() with eth_hw_addr_random() to set addr_assign_type correctly to NET_ADDR_RANDOM. Change the trivial cases. v2: adapt to renamed eth_hw_addr_random() Signed-off-by: Danny Kukawka <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-02-06netdev: ethernet dev_alloc_skb to netdev_alloc_skbPradeep A Dalvi1-1/+1
Replaced deprecating dev_alloc_skb with netdev_alloc_skb in drivers/net/ethernet - Removed extra skb->dev = dev after netdev_alloc_skb Signed-off-by: Pradeep A Dalvi <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-02-06netdev: ethernet dev_alloc_skb to netdev_alloc_skbPradeep A Dalvi1-1/+1
Replaced deprecating dev_alloc_skb with netdev_alloc_skb in drivers/net/ethernet - Removed extra skb->dev = dev after netdev_alloc_skb Signed-off-by: Pradeep A Dalvi <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-01-31drivers/net: Remove alloc_etherdev error messagesJoe Perches1-3/+1
alloc_etherdev has a generic OOM/unable to alloc message. Remove the duplicative messages after alloc_etherdev calls. Signed-off-by: Joe Perches <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-01-10macb: use an unique MDIO bus name.Florian Fainelli1-1/+2
Signed-off-by: Florian Fainelli <[email protected]> Acked-by: Nicolas Ferre <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-12-21net: macb: fix build break with !CONFIG_OFOlof Johansson1-0/+1
This fixes the build of the macb driver that was broken by the DT changes: drivers/net/ethernet/cadence/macb.c:1503: error: implicit declaration of function 'of_match_ptr' drivers/net/ethernet/cadence/macb.c:1503: error: 'macb_dt_ids' undeclared here (not in a function) drivers/net/ethernet/cadence/macb.c:1503: error: initializer element is not constant drivers/net/ethernet/cadence/macb.c:1503: error: (near initialization for 'macb_driver.driver.of_match_table') Signed-off-by: Olof Johansson <[email protected]> Acked-by: Nicolas Ferre <[email protected]>
2011-12-16Merge branch 'at91/macb' into next/driversArnd Bergmann3-18/+80
2011-12-16net/at91_ether: use gpio_is_valid for phy IRQ lineNicolas Ferre1-10/+13
Use the generic gpiolib gpio_is_valid() function to test if the phy IRQ line GPIO is actually provided. For non-connected or non-existing phy IRQ lines, -EINVAL value is used for phy_irq_pin field of struct at91_eth_data. Signed-off-by: Nicolas Ferre <[email protected]> Acked-by: Jean-Christophe PLAGNIOL-VILLARD <[email protected]> Acked-by: David S. Miller <[email protected]>
2011-12-16net/macb: add DT support for Cadence macb/gem driverJean-Christophe PLAGNIOL-VILLARD2-8/+67
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-12-06Merge branch 'mxs/saif' into next/driversArnd Bergmann1-0/+1
Conflicts: drivers/net/ethernet/cadence/Kconfig
2011-11-22macb: allow GEM to have configurable receive buffer sizeJamie Iles2-0/+22
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 Iles2-0/+42
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 Iles2-4/+107
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 Iles2-11/+55
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 Iles3-26/+94
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-11-22macb: convert printk to netdev_ and friendsJamie Iles1-64/+56
macb is already using the dev_dbg() and friends helpers so use netdev_() along with a pr_fmt() definition to make the printing a little cleaner. Acked-by: Jean-Christophe PLAGNIOL-VILLARD <[email protected]> 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: unify at91 and avr32 platform dataJamie Iles3-8/+9
Both at91 and avr32 defines its own platform data structure for the macb driver and both share common structures though at91 includes a currently unused phy_irq_pin. Create a common macb_platform_data for macb that both at91 and avr32 can use. In future we can use this to support other architectures that use the same IP block with the macb driver. v2: rename eth_platform_data to macb_platform_data and allow at91_ether to share the platform data with macb. Signed-off-by: Jamie Iles <[email protected]> Acked-by: Nicolas Ferre <[email protected]> Tested-by: Jean-Christophe PLAGNIOL-VILLARD <[email protected]>
2011-11-22macb: remove conditional clk handlingJamie Iles1-21/+2
AT91 now provides both "pclk" and "hclk" aliases for the the macb device so we can use the same clk handling paths for both AT91 and AVR32. 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-16net/cadence: enable by default NET_ATMELJean-Christophe PLAGNIOL-VILLARD1-0/+1
so the defconfig of the atmel continue to have the support of the network as before Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <[email protected]> Cc: Nicolas Ferre <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-10-27Merge branch 'gpio' of ↵Linus Torvalds1-1/+1
http://ftp.arm.linux.org.uk/pub/linux/arm/kernel/git-cur/linux-2.6-arm * 'gpio' of http://ftp.arm.linux.org.uk/pub/linux/arm/kernel/git-cur/linux-2.6-arm: (43 commits) ARM: 7135/1: ep93xx: bring back missing <mach/gpio.h> ARM: 7104/1: plat-pxa: break out GPIO driver specifics ARM: 7103/1: plat-pxa: move PXA GPIO driver to GPIO subsystem ARM: 7042/3: mach-ep93xx: break out GPIO driver specifics ARM: 7101/1: arm/tegra: Replace <mach/gpio.h> with <mach/gpio-tegra.h> ARM: 7094/1: arm/tegra: Move EN_VDD_1V05_GPIO to board-harmony.h ARM: 7083/1: rewrite U300 GPIO to use gpiolib ARM: 7074/1: gpio: davinci: eliminate unused variable warnings ARM: 7063/1: Orion: gpio: add missing include of linux/types.h ARM: 7055/1: arm/tegra: mach/gpio.h: include linux/types.h to fix build ARM: 7054/1: arm/tegra: Delete custom gpio_to_irq, and irq_to_gpio ARM: 7053/1: gpio/tegra: Implement gpio_chip.to_irq ARM: 7052/1: gpio/tegra: Remove use of irq_to_gpio ARM: 7057/1: mach-pnx4008: rename GPIO header ARM: 7056/1: plat-nomadik: kill off <plat/gpio.h> ARM: 7050/1: mach-sa1100: delete irq_to_gpio() function ARM: 7049/1: mach-sa1100: move SA1100 GPIO driver to GPIO subsystem ARM: 7045/1: mach-lpc32xx: break out GPIO driver specifics ARM: 7044/1: mach-lpc32xx: move LPC32XX GPIO driver to GPIO subsystem ARM: 7043/1: mach-ixp2000: rename GPIO header ... Fix up trivial conflicts in arch/arm/mach-u300/Kconfig manually
2011-09-15MII: fix Kconfig dependencies for MIIJeff Kirsher1-0/+1
MII Kconfig option is apart of the core networking drivers and by default NET_CORE is enabled so drivers selecting MII will have MII enabled as well. It was found using the randconfig option during testing, MII would be selected but NET_CORE could be disabled. This caused a dependency error. Resolved the dependency by selecting NET_CORE when MII is selected. Reported-by: Emil Tantilov <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-08-17net: remove use of ndo_set_multicast_list in driversJiri Pirko2-2/+2
replace it by ndo_set_rx_mode Signed-off-by: Jiri Pirko <[email protected]> Signed-off-by: David S. Miller <[email protected]>