summaryrefslogtreecommitdiff
path: root/drivers/qe/uec.c
Commit message (Collapse)AuthorAgeLines
* Add GPL-2.0+ SPDX-License-Identifier to source filesWolfgang Denk2013-07-24-14/+1
| | | | | | Signed-off-by: Wolfgang Denk <wd@denx.de> [trini: Fixup common/cmd_io.c] Signed-off-by: Tom Rini <trini@ti.com>
* powerpc/mpc8xxx: Remove P1015 and P1016 from CPU listYork Sun2012-08-23-10/+5
| | | | | | | | P1015 is the same as P1011 and P1016 is the same as P1012 from software point of view. They have different packages but share SVRs. Signed-off-by: York Sun <yorksun@freescale.com> Signed-off-by: Andy Fleming <afleming@freescale.com>
* drivers/qe/uec.c: Fix compile warningJoe Hershberger2012-05-22-1/+1
| | | | | | | | Fix this: uec.c: In function 'uec_initialize': uec.c:1404:12: warning: assignment from incompatible pointer type Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
* drivers/qe/uec.c: Fix GCC 4.6 build warningKumar Gala2011-11-11-7/+0
| | | | | | | | | | | uec.c: In function 'uec_stop': uec.c:267:22: warning: variable 'uccf' set but not used [-Wunused-but-set-variable] uec.c: In function 'uec_set_mac_if_mode': uec.c:328:15: warning: variable 'uec_info' set but not used [-Wunused-but-set-variable] uec.c: In function 'adjust_link': uec.c:519:11: warning: variable 'uec_regs' set but not used [-Wunused-but-set-variable] Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
* fsl: Change fsl_phy_enet_if to phy_interface_tAndy Fleming2011-04-20-27/+29
| | | | | | | | | | | | The fsl_phy_enet_if enum was, essentially, the phy_interface_t enum. This meant that drivers which used fsl_phy_enet_if to deal with PHY interfaces would have to convert between the two (or we would have to have them mirror each other, and deal with the ensuing maintenance headache). Instead, we switch all clients of fsl_phy_enet_if over to phy_interface_t, which should become the standard, anyway. Signed-off-by: Andy Fleming <afleming@freescale.com> Acked-by: Detlev Zundel <dzu@denx.de>
* Remove instances of phy_read/writeAndy Fleming2011-04-20-3/+0
| | | | | | | | | | | | | | | | There were a few files which were already using phy_read and phy_write for their PHY function names. It's only a few places, and the name seems most appropriate for the high-level abstraction, so let's rename the other versions to something more specific. Also, uec_phy.c had a marvell_init function which I renamed to not conflict with the one in marvell.c Lastly, uec_phy.c was putting a space between the phy writing function names, and the open paren, so I fixed that Signed-off-by: Andy Fleming <afleming@freescale.com> Acked-by: Detlev Zundel <dzu@denx.de>
* powerpc/85xx: Add P1021 specific QE and UEC supportHaiying Wang2011-04-05-1/+36
| | | | | | | | | | | | | | P1021 has some QE pins which need to be set in pmuxcr register before using QE functions. In this patch, pin QE0 and QE3 are set for UCC1 and UCC5 in Eth mode. QE9 and QE12 are set for MII management. QE12 needs to be released after MII access because QE12 pin is muxed with LBCTL signal. Also added relevant QE support defines unique to P1021. The P1021 QE is shared on P1012, P1016, and P1025. Signed-off-by: Haiying Wang <Haiying.Wang@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
* powerpc/fsl: Introduce common enum for PHY typesKumar Gala2010-10-20-5/+5
| | | | | | | | Have a common enum for phy types that we use in the UCC driver. We will also use this enum for dealing with phy connection fixup in the device tree. Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
* UEC: Don't udelay needlesslyJoakim Tjernlund2010-10-11-1/+3
| | | | | | | | | uec_init() adds an udelay(100000) even though the PHY status read went well, don't do that. Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se> Acked-by: Kim Phillips <kim.phillips@freescale.com> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
* miiphy: constify device nameMike Frysinger2010-08-09-3/+3
| | | | | | | 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: rename "FSL UECx" net interfaces "UECx"Kim Phillips2010-08-09-1/+1
| | | | | | | | | | continuation of commit 2ecc2262d66a286e3aac79005bcb5f461312dea8 "net ppc: fix ethernet device names with spaces" (currently in u-boot-net.git) for QE based parts. Signed-off-by: Kim Phillips <kim.phillips@freescale.com> Acked-by: Dave Liu <daveliu@freescale.com> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
* 83xx: UEC: Added support for bitBang MII driver access to PHYsRichard Retanubun2010-05-03-4/+2
| | | | | | | | | | | This patch enabled support for having PHYs on bitBang MII and uec MII operating at the same time. Modeled after the MPC8360ADS implementation. Added the ability to specify which ethernet interfaces have bitbang SMI on the board header file. Signed-off-by: Richard Retanubun <RichardRetanubun@RuggedCom.com> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
* 83xx, uec: split enet_interface in two variablesHeiko Schocher2010-01-31-53/+69
| | | | | | | | | | | | There's no sensible reason to unite speed and interface type into one variable. So split this variable enet_interface into two vars: enet_interface_type, which hold the interface type and speed. Also: add the possibility for switching between 10 and 100 MBit interfaces on the fly, when running in FAST_ETH mode. Signed-off-by: Heiko Schocher <hs@denx.de> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
* Assigned a static SMI address to all UECs TBIPA address.Richard Retanubun2009-08-10-8/+9
| | | | | | | | | | It is set to 0x1F by default and can be overwritten on the board header file by defining CONFIG_UTBIPAR_INIT_TBIPA. This allows the CPU to simply "reserve" one SMI address instead of using a different one for each UEC. Signed-off-by: Richard Retanubun <RichardRetanubun@RuggedCom.com> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
* Coding style cleanup; update CHANGELOGWolfgang Denk2009-07-07-2/+0
| | | | Signed-off-by: Wolfgang Denk <wd@denx.de>
* drivers/qe: add sgmii support in for UEC driverHaiying Wang2009-06-12-0/+17
| | | | | Signed-off-by: Haiying Wang <Haiying.Wang@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
* qe: Pass in uec_info struct through uec_initializeHaiying Wang2009-06-12-188/+37
| | | | | | | | | | | The uec driver contains code to hard code configuration information for the uec ethernet controllers. This patch creates an array of uec_info structures, which are then parsed by the corresponding driver instance to determine configuration. It also creates function uec_standard_init() to initialize all UEC interfaces for 83xx and 85xx. Signed-off-by: Haiying Wang <Haiying.Wang@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
* drivers/qe: Change QE RISC ALLOCATION to support 4 RISCsHaiying Wang2009-06-12-1/+31
| | | | | | | | | Also define the QE_RISC_ALLOCATION_RISCs to MACROs instead of using enum, and define MAX_QE_RISC for QE based silicons. Signed-off-by: Haiying Wang <Haiying.Wang@freescale.com> Acked-by: Timur Tabi <timur@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
* drivers/qe: Rename the camel-case identifiers in uecHaiying Wang2009-06-12-16/+16
| | | | | | Rename riscRx/riscTx to risc_rx/risc_tx to comply with Codingstyle. Signed-off-by: Haiying Wang <Haiying.Wang@freescale.com>
* NET: QE: UEC: Make uec_miiphy_read() and uec_miiphy_write() use the devname arg.richardretanubun2008-11-09-3/+43
| | | | | | | | | | The current uec_miiphy_read and uec_miiphy_write hardcode access devlist[0] This patch makes these function use the devname argument that is passed in to allow access to the phy registers of other devices in devlist[]. Signed-of-by: Richard Retanubun <RichardRetanubun@RugggedCom.com> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
* Adds two more ethernet interface to 83xxrichardretanubun2008-11-09-0/+8
| | | | | | Fixed compiler warning "declared but unused" eth5_uec_info and eth6_uec_info. Signed-off-by: Richard Retanubun <RichardRetanubun@RugggedCom.com> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
* rename CFG_ macros to CONFIG_SYSJean-Christophe PLAGNIOL-VILLARD2008-10-18-42/+42
| | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* Adds two more ethernet interface to 83xxrichardretanubun2008-10-18-1/+47
| | | | | | | | | Added as a convenience for other platforms that uses MPC8360 (has 8 UCC). Six eth interface is chosen because the platform I am using combines UCC1&2 and UCC3&4 as 1000 Eth and the other four UCCs as 10/100 Eth. Signed-off-by: Richard Retanubun <RichardRetanubun@RugggedCom.com> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
* Change UEC PHY interface to RGMII on MPC8568MDSHaiying Wang2008-10-18-0/+1
| | | | | | | | | | | | | | Change UEC phy interface from GMII to RGMII on MPC8568MDS board Because on MPC8568MDS, GMII interface is only recommended for 1000Mbps speed, but RGMII interface can work at 10/100/1000Mbps, and RGMII interface works more stable. Now both UEC1 and UEC2 can work properly under u-boot. It is also in consistent with the kernel setting for 8568 UEC phy interface. Signed-off-by: Haiying Wang <Haiying.Wang@freescale.com> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
* drivers/qe: Move conditional compilation to MakefileJean-Christophe PLAGNIOL-VILLARD2008-08-13-5/+0
| | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* QE UEC: Fix compiler warningsBen Warren2008-08-07-36/+33
| | | | | | Moved static functions earlier in file so forward declarations are not needed. Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
* QE UEC: Add MII CommandsDavid Saada2008-08-07-0/+53
| | | | | | | | Add MII commands to the UEC driver. Note that once a UEC device is selected, any device on its MDIO bus can be addressed. Signed-off-by: David Saada <david.saada@ecitele.com> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
* Big white-space cleanup.Wolfgang Denk2008-05-21-1/+1
| | | | | | | | | | | This commit gets rid of a huge amount of silly white-space issues. Especially, all sequences of SPACEs followed by TAB characters get removed (unless they appear in print statements). Also remove all embedded "vim:" and "vi:" statements which hide indentation problems. Signed-off-by: Wolfgang Denk <wd@denx.de>
* uec: add support for RGMII_RXID interface modeAnton Vorontsov2008-03-25-0/+1
| | | | | | | PHY drivers will use it to setup software delay between RXD and RXC signals. Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
* net: reduce boot latency on QE UEC based boardsKim Phillips2008-01-16-26/+43
| | | | | | | | | | | | | | | actually polling for PHY autonegotiation to finish enables us to remove the 5 second boot prompt latency present on QE based boards. call to qe_set_mii_clk_src in init_phy, and mv call to init_phy from uec_initialize to uec_init by Joakim Tjernlund; autonegotiation wait code shamelessly stolen from tsec driver. also rm unused CONFIG_RMII_MODE code. Signed-off-by: Kim Phillips <kim.phillips@freescale.com> Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
* QE UEC: Extend number of supported UECs to 4David Saada2008-01-15-1/+42
| | | | | | | | | This patch extends the number of supported UECs to 4. Note that the problem of QE thread resources exhaustion is resolved by setting the correct number of QE threads according to Ethernet type (GBE or FE). Signed-off-by: David Saada <david.saada@ecitele.com> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
* QE: fix compile warningDave Liu2008-01-14-0/+1
| | | | | | | | | qe.c: In function 'qe_upload_firmware': qe.c:390: warning: pointer targets in passing argument 2 uec.c: In function 'uec_initialize': uec.c:1236: warning: 'uec_info' may be used uninitialized Signed-off-by: Dave Liu <daveliu@freescale.com>
* Fix Ethernet init() return codesBen Warren2008-01-10-3/+3
| | | | | | | | | | | | | | | | | | Change return values of init() functions in all Ethernet drivers to conform to the following: >=0: Success <0: Failure All drivers going forward should return 0 on success. Current drivers that return 1 on success were left as-is to minimize changes. Signed-off-by: Ben Warren <biggerbadderben@gmail.com> Acked-by: Stefan Roese <sr@denx.de> Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Acked-by: Kim Phillips <kim.phillips@freescale.com> Acked-by: Haavard Skinnemoen <hskinnemoen@atmel.com> Acked-By: Timur Tabi <timur@freescale.com>
* Add support CONFIG_UEC_ETH3 in MPC83xxJoakim Tjernlund2008-01-08-0/+23
| | | | Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
* Fix numerous bugs in the 8568 UEC supportAndy Fleming2007-08-16-3/+3
| | | | | | | | | | | | | | | | | | | | | Actually, fixed a large bug in the UEC for *all* platforms. How did this ever work? uec_init() did not follow the spec for eth_init(), and returned 0 on success. Switch it to return the link like tsec_init() (and 0 on error) The immap for the 8568 was defined based on MPC8568, rather than CONFIG_MPC8568 CONFIG_QE was off CONFIG_ETHPRIME was set to "Freescale GETH". Now is "FSL UEC0" Fixed a comment about the ranges for CONFIG_ETHPRIME if TSEC_ENET is enabled Signed-off-by: Andy Fleming <afleming@freescale.com>
* Add support for UEC to 8568Andy Fleming2007-08-14-10/+17
| | | | | Signed-off-by: Haiying Wang <Haiying.Wang@freescale.com> Signed-off-by: Andy Fleming <afleming@freescale.com>
* mpc83xx: Fix alternating tx error / tx buffer not ready bug in QE UECEmilian Medve2007-03-02-1/+1
| | | | | | | | The problem is not gcc4 but the code itself. The BD_STATUS() macro can't be used for busy-waiting since it strips the 'volatile' property from the bd variable. gcc3 was working by pure luck. This is a follow on patch to "Fix the UEC driver bug of QE"
* mpc83xx: Add support for the MPC832XEMDS boardDave Liu2007-03-02-2/+9
| | | | | | This patch supports DUART, ETH3/4 and PCI etc. Signed-off-by: Dave Liu <daveliu@freescale.com>
* mpc83xx: Fix the UEC driver bug of QEDave Liu2007-03-02-8/+6
| | | | | | | | | | | | | | The patch prevents the GCC tool chain from striping useful code for optimization. It will make UEC ethernet driver workable, Otherwise the UEC will fail in tx when you are using gcc4.x. but the driver can work when using gcc3.4.3. CHANGELOG *Prevent the GCC from striping code for optimization, Otherwise the UEC will tx failed when you are using gcc4.x. Signed-off-by: Dave Liu <daveliu@freescale.com>
* mpc83xx: add QE ethernet supportDave Liu2006-11-03-0/+1266
this patch adds support for the QUICC Engine based UCC gigabit ethernet device.