aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/fec_mpc52xx_phy.c
AgeCommit message (Collapse)Author
2009-10-14net: Fix OF platform drivers coldplug/hotplug when compiled as modulesAnton Vorontsov
Some OF platform drivers are missing module device tables, so they won't load automatically on boot. This patch fixes the issue by adding proper MODULE_DEVICE_TABLE() macros to the drivers. Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-18Merge commit 'gcl/merge' into nextBenjamin Herrenschmidt
Manual merge of: drivers/net/fec_mpc52xx.c
2009-06-17powerpc/5xxx: Add common mpc5xxx_get_bus_frequency() functionWolfgang Denk
So far, MPC512x used mpc512x_find_ips_freq() to get the bus frequency, while MPC52xx used mpc52xx_find_ipb_freq(). Despite the different clock names (IPS vs. IPB) the code was identical. Use common code for both processor families. Signed-off-by: Wolfgang Denk <wd@denx.de> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2009-04-27net: Rework mpc5200 fec driver to use of_mdio infrastructure.Grant Likely
The patch reworks the MPC5200 Fast Ethernet Controller (FEC) driver to use the of_mdio infrastructure for registering PHY devices from data out openfirmware device tree, and eliminates the assumption that the PHY for the FEC is always attached to the FEC's own MDIO bus. With this patch, the FEC can use a PHY attached to any MDIO bus if it is described in the device tree. Tested on Freescale Lite5200b eval board Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Acked-by: Andy Fleming <afleming@freescale.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-21powerpc/mpc5200: Remove obsolete code from mpc5200 MDIO driverWolfram Sang
As this driver polls for a complete MDIO transaction, there is no need to enable interrupts for it. Furthermore, make both checks for freeing MDIO-bus irqs consistent. Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2008-10-15powerpc/mpc5200: Refactor FEC mdio read/write routinesWolfram Sang
Read & write functions now call a generic transfer function, so identical code in both routines could be eliminated. The result is easier to maintain and smaller in source and binary code. Also, fix some checkpatch warnings. Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2008-10-08phylib: move to dynamic allocation of struct mii_busLennert Buytenhek
This patch introduces mdiobus_alloc() and mdiobus_free(), and makes all mdio bus drivers use these functions to allocate their struct mii_bus'es dynamically. Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Signed-off-by: David S. Miller <davem@davemloft.net> Acked-by: Andy Fleming <afleming@freescale.com>
2008-10-08phylib: rename mii_bus::dev to mii_bus::parentLennert Buytenhek
In preparation of giving mii_bus objects a device tree presence of their own, rename struct mii_bus's ->dev argument to ->parent, since having a 'struct device *dev' that points to our parent device conflicts with introducing a 'struct device dev' representing our own device. Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Signed-off-by: David S. Miller <davem@davemloft.net> Acked-by: Andy Fleming <afleming@freescale.com>
2008-04-17Merge branch 'master' of ↵David S. Miller
master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6
2008-04-16phy: Change mii_bus id field to a stringAndy Fleming
Having the id field be an int was making more complex bus topologies excessively difficult. For now, just convert it to a string, and change all instances of "bus->id = val" to snprintf(id, MII_BUS_ID_LEN, "%x", val). Signed-off-by: Andy Fleming <afleming@freescale.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2008-04-03[POWERPC] Fix MPC5200 (not B!) device tree so FEC ethernet worksRené Bürgel
This gets the FEC ethernet driver working again on the lite5200 platform. The FEC driver is also compatible with the MPC5200, not only with the MPC5200B, so this adds a suitable entry to the driver's match list. Furthermore this adds the settings for the PHY in the dts file for the Lite5200. Note, that this is not exactly the same as in the Lite5200B, because the PHY is located at f0003000:01 for the 5200, and at :00 for the 5200B. This was tested on a Lite5200 and a Lite5200B, both booted a kernel via tftp and mounted the root via nfs successfully. Signed-off-by: René Bürgel <r.buergel@unicontrol.de> Acked-by: Grant Likely <grant.likely@secretlab.ca> Signed-off-by: Paul Mackerras <paulus@samba.org>
2008-03-24[POWERPC] mpc5200-fec: Fix possible NULL dereference in mdio driverGrant Likely
If the reg property is missing from the phy node (unlikely, but possible), then the kernel will oops with a NULL pointer dereference. This fixes it by checking the pointer first. Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Signed-off-by: Paul Mackerras <paulus@samba.org>
2008-01-26[POWERPC] mpc5200: normalize compatible property bindingsGrant Likely
Update MPC5200 drivers to also look for compatible properties in the form "fsl,mpc5200-*" to better conform to open firmware generic names recommended practice as published here: http://www.openfirmware.org/1275/practice/gnames/gnamv14a.html This patch should *not* break compatibility with older device trees which do not use the 'fsl,' prefix. The drivers will still bind against the older names also. Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2007-10-29FEC - fast ethernet controller for mpc52xxDomen Puncer
Driver for ethernet on mpc5200/mpc5200b SoCs (FEC). Signed-off-by: Domen Puncer <domen.puncer@telargo.com> Acked-by: Dale Farnsworth <dale@farnsworth.org> Signed-off-by: Jeff Garzik <jeff@garzik.org>