summaryrefslogtreecommitdiffstats
path: root/drivers/net/fec_mxc.c
Commit message (Collapse)AuthorAgeFilesLines
* net: fec_mxc: add PHYLIB supportTroy Kisky2012-02-271-48/+96
| | | | | | | | | | | | | | | | | | | | | Surround non PHYLIB routines miiphy_restart_aneg and miiphy_wait_aneg with ifndef CONFIG_PHYLIB. When later PHYLIB is required it is easy to delete the non-PHYLIB code. This separation idea came from Andy Fleming. fec_miiphy_read, and fec_miiphy_write changed to fec_phy_read, and fec_phy_write with argument changes. Deprecated miiphy_register is no longer used. Both old and new PHYLIB code now use mdio_register. Cleanup some debug prints. Inline function fec_miiphy_fec_to_eth is no longer necessary. Moved to the single call location. Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
* net: fec_mxc: add 1000 Mbps selectionTroy Kisky2012-02-271-2/+19
| | | | | | | | Define FEC_QUIRK_ENET_MAC and add to arch-mx6/imx-regs.h Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com> Acked-by: Dirk Behme <dirk.behme@de.bosch.com>
* net: imx: Add multi-FEC support for imx_get_mac_from_fuseFabio Estevam2012-01-161-4/+5
| | | | | | | | | | Add multi-FEC support for imx_get_mac_from_fuse by passing dev_id as a parameter. This feature is important on mx28 SoC for example that has two FEC ports. Cc: Ben Warren <biggerbadderben@gmail.com> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Acked-by: Stefano Babic <sbabic@denx.de>
* fec: add the i.mx6q enet driver supportJason Liu2012-01-161-0/+10
| | | | | | Cc: Stefano Babic <sbabic@denx.de> Signed-off-by: Jason Liu <jason.hui@linaro.org> Acked-by: Stefano Babic <sbabic@denx.de>
* FEC: Add support for iMX28 quirksMarek Vasut2011-11-111-2/+42
| | | | | | | | Signed-off-by: Marek Vasut <marek.vasut@gmail.com> Cc: Ben Warren <biggerbadderben@gmail.com> Cc: Stefano Babic <sbabic@denx.de> Cc: Wolfgang Denk <wd@denx.de> Cc: Detlev Zundel <dzu@denx.de>
* GCC4.6: Squash warnings in fec_mxc.cMarek Vasut2011-10-271-2/+2
| | | | | | | | | | | | | | fec_mxc.c: In function 'fec_mii_setspeed': fec_mxc.c:112:2: warning: format '%#lx' expects type 'long unsigned int', but argument 2 has type 'u32' fec_mxc.c: In function 'fec_recv': fec_mxc.c:632:2: warning: format '%x' expects type 'unsigned int', but argument 2 has type 'long unsigned int' Signed-off-by: Marek Vasut <marek.vasut@gmail.com> Cc: Wolfgang Denk <wd@denx.de> Cc: Simon Glass <sjg@chromium.org> Cc: Mike Frysinger <vapier@gentoo.org>
* FEC: Squish "got MAC from fuse" message, make it debug()Marek Vasut2011-09-301-1/+1
| | | | | | | | Signed-off-by: Marek Vasut <marek.vasut@gmail.com> Cc: Ben Warren <biggerbadderben@gmail.com> Cc: Stefano Babic <sbabic@denx.de> Cc: Wolfgang Denk <wd@denx.de> Cc: Detlev Zundel <dzu@denx.de>
* FEC: Add timeout for chip resetMarek Vasut2011-09-301-4/+21
| | | | | | | | Signed-off-by: Marek Vasut <marek.vasut@gmail.com> Cc: Ben Warren <biggerbadderben@gmail.com> Cc: Stefano Babic <sbabic@denx.de> Cc: Wolfgang Denk <wd@denx.de> Cc: Detlev Zundel <dzu@denx.de>
* FEC: Allow registering MII postconfiguration callbackMarek Vasut2011-09-301-1/+13
| | | | | | | | Signed-off-by: Marek Vasut <marek.vasut@gmail.com> Cc: Ben Warren <biggerbadderben@gmail.com> Cc: Stefano Babic <sbabic@denx.de> Cc: Wolfgang Denk <wd@denx.de> Cc: Detlev Zundel <dzu@denx.de>
* FEC: Allow multiple FECesMarek Vasut2011-09-301-30/+49
| | | | | | | | | | | | | | | | | | | This patch allows user to register multiple FEC controllers. To preserve compatibility with older boards, the mxcfec_register() call is still in place. To use multiple controllers, new macro is in place, the mxcfec_register_multi(), which takes more arguments. The syntax is: mxcfec_register_multi(bd, FEC ID, FEC PHY ID on the MII bus, base address); To disable the fecmxc_register() compatibility stuff, define the macro CONFIG_FEC_MXC_MULTI. This will remove the requirement for defining IMX_FEC_BASE and CONFIG_FEC_MXC_PHYADDR. Signed-off-by: Marek Vasut <marek.vasut@gmail.com> Cc: Ben Warren <biggerbadderben@gmail.com> Cc: Stefano Babic <sbabic@denx.de> Cc: Wolfgang Denk <wd@denx.de> Cc: Detlev Zundel <dzu@denx.de>
* FEC: Abstract access to fec->eth in MII operationsMarek Vasut2011-09-301-8/+10
| | | | | | | | Signed-off-by: Marek Vasut <marek.vasut@gmail.com> Cc: Ben Warren <biggerbadderben@gmail.com> Cc: Stefano Babic <sbabic@denx.de> Cc: Wolfgang Denk <wd@denx.de> Cc: Detlev Zundel <dzu@denx.de>
* FEC: Allow selection of MII mode via CONFIG_FEC_XCV_TYPEMarek Vasut2011-09-301-1/+5
| | | | | | | | | | The default is MII100, which was hardcoded previously in the driver. Signed-off-by: Marek Vasut <marek.vasut@gmail.com> Cc: Ben Warren <biggerbadderben@gmail.com> Cc: Stefano Babic <sbabic@denx.de> Cc: Wolfgang Denk <wd@denx.de> Cc: Detlev Zundel <dzu@denx.de>
* FEC: Add RMII mode supportMarek Vasut2011-09-301-0/+2
| | | | | | | | Signed-off-by: Marek Vasut <marek.vasut@gmail.com> Cc: Ben Warren <biggerbadderben@gmail.com> Cc: Stefano Babic <sbabic@denx.de> Cc: Wolfgang Denk <wd@denx.de> Cc: Detlev Zundel <dzu@denx.de>
* FEC: Kill mode select FIXME'sMarek Vasut2011-09-301-12/+14
| | | | | | | | Signed-off-by: Marek Vasut <marek.vasut@gmail.com> Cc: Ben Warren <biggerbadderben@gmail.com> Cc: Stefano Babic <sbabic@denx.de> Cc: Wolfgang Denk <wd@denx.de> Cc: Detlev Zundel <dzu@denx.de>
* FEC: Use defined constant instead of magic numberMarek Vasut2011-09-301-1/+1
| | | | | | | | Signed-off-by: Marek Vasut <marek.vasut@gmail.com> Cc: Ben Warren <biggerbadderben@gmail.com> Cc: Stefano Babic <sbabic@denx.de> Cc: Wolfgang Denk <wd@denx.de> Cc: Detlev Zundel <dzu@denx.de>
* FEC: Use proper accessor to read register in debug callMarek Vasut2011-09-301-1/+1
| | | | | | | | Signed-off-by: Marek Vasut <marek.vasut@gmail.com> Cc: Ben Warren <biggerbadderben@gmail.com> Cc: Stefano Babic <sbabic@denx.de> Cc: Wolfgang Denk <wd@denx.de> Cc: Detlev Zundel <dzu@denx.de>
* Timer: Fix misuse of ARM *timer_masked() functions outside arch/armGraeme Russ2011-07-161-3/+3
| | | | Signed-off-by: Graeme Russ <graeme.russ@gmail.com>
* fec_mxc: add support for MX53 processorLiu Hui-R643432011-02-021-1/+1
| | | | | | This patch add FEC support for Freescale MX53 processor Signed-off-by: Jason Liu <r64343@freescale.com>
* miiphy: convert to linux/mii.hMike Frysinger2011-01-091-10/+10
| | | | | | | | The include/miiphy.h header duplicates a lot of things from linux/mii.h. So punt all the things that overlap to keep the API simple and to make merging between U-Boot and Linux simpler. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* imx: Get fec mac address from fuseLiu Hui-R643432010-11-211-15/+2
| | | | | | | The patch is to support getting FEC MAC address from fuse bank. Signed-off-by: Jason Liu <r64343@freescale.com> Tested-by: Stefano Babic <sbabic@denx.de>
* net: fec_mxc: Add initialized eth_device structureNobuhiro Iwamatsu2010-11-141-0/+1
| | | | | | | This prevents access to the member of eth_device which is not initialized. Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org> CC: Ben Warren <biggerbadderben@gmail.com>
* drivers/net/fec_mxc.c: write mac address in initJohn Rigby2010-10-191-0/+3
| | | | | | | | Call fec_set_hwaddr in init routine to setup MAC address so when ethaddr is set late via setenv the change will propagate to the hw. Signed-off-by: John Rigby <john.rigby@linaro.org> CC: Ben Warren <biggerbadderben@gmail.com>
* miiphy: constify device nameMike Frysinger2010-08-091-2/+2
| | | | | | | The driver name does not need to be writable, so constify it. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
* net,fec: Shorten device name as done for other driversStefano Babic2010-08-091-1/+1
| | | | | | | | | | After discussion on the ML it is suggested to drop unrequired and not useful characters from the device name. This patch changes the name for the fec_mxc driver from "FEC_MXC" to "FEC". Signed-off-by: Stefano Babic <sbabic@denx.de> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
* net: fec_mxc: add write_hwaddr supportHeiko Schocher2010-05-031-1/+1
| | | | | | | tested on the magnesium board. Signed-off-by: Heiko Schocher <hs@denx.de> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
* fec_mxc.c: Fix MX27 FEC MAC validity checkEric Jarrige2010-05-031-1/+1
| | | | | | | | Fix MX27 FEC logic to check validity of the MAC address in fuse. Only null (empty fuse) or invalid MAC address was retrieved from mx27 fuses before this change. Signed-off-by: Eric Jarrige <jorasse@armadeus.org> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
* fec_mxc don't use internal eeprom on MX25John Rigby2010-05-031-2/+2
| | | | | | | Avoid using the internal eeprom on MX25 like MX51 already does. Signed-off-by: John Rigby <jcrigby@gmail.com> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
* net, fec_mxc: only setup the device enetaddr with eeprom valueHeiko Schocher2010-03-311-1/+0
| | | | | | | | Only fill the device enetaddr with the contents of the eeprom, do not program it in MAC address registers Signed-off-by: Heiko Schocher <hs@denx.de> Acked-by: Ben Warren <biggerbadderben@gmail.com>
* fec_mxc: add MX25 supportJohn Rigby2010-03-071-1/+30
| | | | | | | | Use RMII for MX25 Add code to init gasket that enables RMII Signed-off-by: John Rigby <jcrigby@gmail.com> CC: Ben Warren <biggerbadderben@gmail.com>
* fec_mxc: cleanup and factor out MX27 dependenciesJohn Rigby2010-03-071-6/+9
| | | | | | | | | | | | | general cleanup move clock init to cpu_eth_init in cpu/arm926ejs/mx27/generic.c make MX27 specific phy init conditional on CONFIG_MX27 replace call to imx_get_ahbclk with one to imx_get_fecclk and define imx_get_fecclk in include/asm-arm/arch-mx27/clock.h Signed-off-by: John Rigby <jcrigby@gmail.com> CC: Ben Warren <biggerbadderben@gmail.com> CC: Fred Fan <fanyefeng@gmail.com> CC: Tom <Tom.Rix@windriver.com>
* fec_mxc: add support for MX51 processorStefano Babic2010-02-061-41/+32
| | | | | | | | The patch add support for the Freescale mx51 processor to the FEC ethernet driver. Signed-off-by: Stefano Babic <sbabic@denx.de> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
* fec_mxc: incomplete error handlingJohn Ogness2009-12-131-0/+1
| | | | | | | | | | fec_init() will only allocate fec->base_ptr if it is non-NULL. But the cleanup routine on error will free the pointer without setting it to NULL. This means that a later call to fec_init() would result in using an invalid pointer. Signed-off-by: John Ogness <john.ogness@linutronix.de> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
* mxc_fec: avoid free() calls to already freed pointers.javier Martin2009-11-111-5/+7
| | | | | | | | | | | | | | Sometimes, inside NetLoop, eth_halt() is called before eth_init() has been called. This is harmless except for free() calls to pointers which have not been allocated yet. This patch initializes those pointers to NULL and allocates them only the first time. This way we can get rid of free calls in halt callback. This has been tested in i.MX27 Litekit board and eldk-4.2 toolchains. Signed-off-by: Javier Martin <javier.martin@vista-silicon.com> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
* mxc_fec: fix some erroneous PHY accesses.javier Martin2009-11-111-3/+5
| | | | | | | | | | | | | | | This patch fixes erroneous access to the ethernet PHY which broke the driver. 1. Selector field in the auto-negotiation register must be 0x00001 for using 802.3, not 0x00000 which is reseved. 2. Access to the PHY address specified by CONFIG_FEC_MXC_PHYADDR, not 0x0 fixed address. This has been tested in i.MX27 Litekit board and eldk-4.2 toolchains. Now using proper defines for auto-negotiation register. Signed-off-by: Javier Martin <javier.martin@vista-silicon.com> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
* Coding Style cleanup; update CHANGELOG.Wolfgang Denk2009-07-231-1/+0
| | | | Signed-off-by: Wolfgang Denk <wd@denx.de>
* fec_mxc: driver for FEC ethernet controller on i.MX27Ilya Yanok2009-07-221-0/+742
Signed-off-by: Ilya Yanok <yanok@emcraft.com> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
OpenPOWER on IntegriCloud