summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/marvell/mvmdio.c
AgeCommit message (Collapse)Author
2014-04-07Rewind v3.13-rc3+ (78fd82238d0e5716) to v3.12Scott Wood
2013-10-29net: mvmdio: doc: mvmdio now used by mv643xx_ethLeigh Brown
Amend the documentation in the mvmdio driver to note the fact that it is now used by both the mvneta and mv643xx_eth drivers. Signed-off-by: Leigh Brown <leigh@solinno.co.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-10-29net: mvmdio: slight optimisation of orion_mdio_writeLeigh Brown
Make only a single call to mutex_unlock in orion_mdio_write. Signed-off-by: Leigh Brown <leigh@solinno.co.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-10-29net: mvmdio: orion_mdio_ready: remove manual pollLeigh Brown
Replace manual poll of MVMDIO_SMI_READ_VALID with a call to orion_mdio_wait_ready. This ensures a consistent timeout, eliminates a busy loop, and allows for use of interrupts on systems that support them. Signed-off-by: Leigh Brown <leigh@solinno.co.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-10-29net: mvmdio: make orion_mdio_wait_ready consistentLeigh Brown
Amend orion_mdio_wait_ready so that the same timeout is used when polling or using wait_event_timeout. Set the timeout to 1ms. Replace udelay with usleep_range to avoid a busy loop, and set the polling interval range as 45us to 55us, so that the first sleep will be enough in almost all cases. Generate the same log message at timeout when polling or using wait_event_timeout. Signed-off-by: Leigh Brown <leigh@solinno.co.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-04-08net: mvmdio: get and enable optional clockSebastian Hesselbarth
Marvell mdio driver uses internal registers that can be clock gated on some SoCs. This patch just adds optional clock handling, to allow to pass and enable the corresponding clock. Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> Acked-by: Florian Fainelli <florian@openwrt.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-03-24net: mvmdio: define module alias for platform deviceSimon Baatz
The mvmdio driver can be instantiated using device tree or as a classic platform device. In order to load the driver automatically by udev in the latter case, the driver needs to define a module alias for the platform device. Signed-off-by: Simon Baatz <gmbnomis@gmail.com> Acked-by: Florian Fainelli <florian@openwrt.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-03-22net: mvmdio: enhance driver to support SMI error/done interruptsFlorian Fainelli
This patch enhances the "mvmdio" to support a SMI error/done interrupt line which can be used along with a wait queue instead of doing busy-waiting on the registers. This is a feature which is available in the mv643xx_eth SMI code and thus reduces again the gap between the two. Signed-off-by: Florian Fainelli <florian@openwrt.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-03-22net: mvmdio: rename base register cookie from smireg to regsFlorian Fainelli
This patch renames the base register cookie in the mvmdio drive from "smireg" to "regs" since a subsequent patch is going to use an ioremap() cookie whose size is larger than a single register of 4 bytes. No functionnal code change introduced. Acked-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Florian Fainelli <florian@openwrt.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-03-22net: mvmdio: allow platform device style registrationFlorian Fainelli
This patch changes the mvmdio driver not to use device tree helper functions such as of_mdiobus_register() and of_iomap() so we can instantiate this driver using a classic platform_device approach. Use the device manager helper to ioremap() the base register cookie so we get automatic freeing upon error and removal. This change is harmless for Device Tree platforms because they will get the driver be registered the same way as it was before. Signed-off-by: Florian Fainelli <florian@openwrt.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2013-02-04ethernet: Remove unnecessary alloc/OOM messages, alloc cleanupsJoe Perches
alloc failures already get standardized OOM messages and a dump_stack. Convert kzalloc's with multiplies to kcalloc. Convert kmalloc's with multiplies to kmalloc_array. Fix a few whitespace defects. Convert a constant 6 to ETH_ALEN. Use parentheses around sizeof. Convert vmalloc/memset to vzalloc. Remove now unused size variables. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-12-22Drivers: network: more __dev* removalGreg KH
Remove some __dev* markings that snuck in the 3.8-rc1 merge window in the drivers/net/* directory. Cc: Bill Pemberton <wfp5p@virginia.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-11-20net: mvmdio: adjust multiline comment to net/ styleThomas Petazzoni
As reported by checkpatch, the multiline comments for net/ and drivers/net/ have a slightly different format than the one used in the rest of the kernel, so we adjust our multiline comment accordingly. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2012-11-20net: mvmdio: use <linux/delay.h> instead of <asm/delay.h>Thomas Petazzoni
As suggested by checkpatch, using <linux/delay.h> instead of <asm/delay.h> is appropriate. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2012-11-16net: mvmdio: new Marvell MDIO driverThomas Petazzoni
This patch adds a separate driver for the MDIO interface of the Marvell Ethernet controllers. There are two reasons to have a separate driver rather than including it inside the MAC driver itself: *) The MDIO interface is shared by all Ethernet ports, so a driver must guarantee non-concurrent accesses to this MDIO interface. The most logical way is to have a separate driver that handles this single MDIO interface, used by all Ethernet ports. *) The MDIO interface is the same between the existing mv643xx_eth driver and the new mvneta driver. Even though it is for now only used by the mvneta driver, it will in the future be used by the mv643xx_eth driver as well. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Acked-by: David S. Miller <davem@davemloft.net>