summaryrefslogtreecommitdiff
path: root/drivers/qe
Commit message (Collapse)AuthorAgeLines
* UEC: Fix compiler warnings introduced by linux/mii.h changeKumar Gala2011-01-25-19/+9
| | | | | | | | | | | | | | | | | | | | | | | Patch 8ef583a0 [miiphy: convert to linux/mii.h] introduced the following compiler warnings in the uec ethernet driver: In file included from /local/home/galak/git/u-boot-85xx/include/miiphy.h:37:0, from uec.c:32: /local/home/galak/git/u-boot-85xx/include/linux/mii.h:133:0: warning: "LPA_1000FULL" redefined uec_phy.h:34:0: note: this is the location of the previous definition /local/home/galak/git/u-boot-85xx/include/linux/mii.h:134:0: warning: "LPA_1000HALF" redefined uec_phy.h:35:0: note: this is the location of the previous definition In file included from /local/home/galak/git/u-boot-85xx/include/miiphy.h:37:0, from uec_phy.c:27: /local/home/galak/git/u-boot-85xx/include/linux/mii.h:133:0: warning: "LPA_1000FULL" redefined uec_phy.h:34:0: note: this is the location of the previous definition /local/home/galak/git/u-boot-85xx/include/linux/mii.h:134:0: warning: "LPA_1000HALF" redefined uec_phy.h:35:0: note: this is the location of the previous definition Fix them be removing the duplication in the uec code and utlizing the linux/mii.h version instead. Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
* miiphy: convert to linux/mii.hMike Frysinger2011-01-09-52/+34
| | | | | | | | 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>
* Exclude drivers/qe/fdt.c without CONFIG_QESebastien Carlier2010-11-18-3/+1
| | | | | | | | | | | Previously with archive libraries fdt.o was compiled and included in qe.a and then discarded by the linker. With partial linking this results in unresolved symbols, which this commit fixes. This commit also cleans up a now-useless conditional in fdt.c. Signed-off-by: Sebastien Carlier <sebastien.carlier@gmail.com> Tested-by: Wolfgang Denk <wd@denx.de>
* Switch from archive libraries to partial linkingSebastien Carlier2010-11-17-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Before this commit, weak symbols were not overridden by non-weak symbols found in archive libraries when linking with recent versions of binutils. As stated in the System V ABI, "the link editor does not extract archive members to resolve undefined weak symbols". This commit changes all Makefiles to use partial linking (ld -r) instead of creating library archives, which forces all symbols to participate in linking, allowing non-weak symbols to override weak symbols as intended. This approach is also used by Linux, from which the gmake function cmd_link_o_target (defined in config.mk and used in all Makefiles) is inspired. The name of each former library archive is preserved except for extensions which change from ".a" to ".o". This commit updates references accordingly where needed, in particular in some linker scripts. This commit reveals board configurations that exclude some features but include source files that depend these disabled features in the build, resulting in undefined symbols. Known such cases include: - disabling CMD_NET but not CMD_NFS; - enabling CONFIG_OF_LIBFDT but not CONFIG_QE. Signed-off-by: Sebastien Carlier <sebastien.carlier@gmail.com>
* powerpc/fsl: Introduce common enum for PHY typesKumar Gala2010-10-20-26/+12
| | | | | | | | 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 PHY: Speed up initial PHY neg.Joakim Tjernlund2010-10-11-0/+9
| | | | | | | | | Instead of always performing an autoneg, check if the PHY already has a link and if it matches one of the requested modes. Initially only 100MbFD is optimized this way. Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
* UEC PHY: Remove strange 0.5 sec delayJoakim Tjernlund2010-10-11-1/+0
| | | | | | | | This udelay looks bogus and doesn't help my board. 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>
* 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-4/+4
| | | | | | | | | | 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>
* cmd_usage(): simplify return code handlingWolfgang Denk2010-07-24-6/+3
| | | | | | | | | | | | | | | | Lots of code use this construct: cmd_usage(cmdtp); return 1; Change cmd_usage() let it return 1 - then we can replace all these ocurrances by return cmd_usage(cmdtp); This fixes a few places with incorrect return code handling, too. Signed-off-by: Wolfgang Denk <wd@denx.de>
* Make sure that argv[] argument pointers are not modified.Wolfgang Denk2010-07-04-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The hush shell dynamically allocates (and re-allocates) memory for the argument strings in the "char *argv[]" argument vector passed to commands. Any code that modifies these pointers will cause serious corruption of the malloc data structures and crash U-Boot, so make sure the compiler can check that no such modifications are being done by changing the code into "char * const argv[]". This modification is the result of debugging a strange crash caused after adding a new command, which used the following argument processing code which has been working perfectly fine in all Unix systems since version 6 - but not so in U-Boot: int main (int argc, char **argv) { while (--argc > 0 && **++argv == '-') { /* ====> */ while (*++*argv) { switch (**argv) { case 'd': debug++; break; ... default: usage (); } } } ... } The line marked "====>" will corrupt the malloc data structures and usually cause U-Boot to crash when the next command gets executed by the shell. With the modification, the compiler will prevent this with an error: increment of read-only location '*argv' N.B.: The code above can be trivially rewritten like this: while (--argc > 0 && **++argv == '-') { char *arg = *argv; while (*++arg) { switch (*arg) { ... Signed-off-by: Wolfgang Denk <wd@denx.de> Acked-by: Mike Frysinger <vapier@gentoo.org>
* 83xx: UEC: Added support for bitBang MII driver access to PHYsRichard Retanubun2010-05-03-4/+49
| | | | | | | | | | | 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>
* Move arch/ppc to arch/powerpcStefan Roese2010-04-21-1/+1
| | | | | | | | | | | | | | | | | As discussed on the list, move "arch/ppc" to "arch/powerpc" to better match the Linux directory structure. Please note that this patch also changes the "ppc" target in MAKEALL to "powerpc" to match this new infrastructure. But "ppc" is kept as an alias for now, to not break compatibility with scripts using this name. Signed-off-by: Stefan Roese <sr@denx.de> Acked-by: Wolfgang Denk <wd@denx.de> Acked-by: Detlev Zundel <dzu@denx.de> Acked-by: Kim Phillips <kim.phillips@freescale.com> Cc: Peter Tyser <ptyser@xes-inc.com> Cc: Anatolij Gustschin <agust@denx.de>
* ppc: Move cpu/$CPU to arch/ppc/cpu/$CPUPeter Tyser2010-04-13-1/+1
| | | | Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
* 83xx, uec: split enet_interface in two variablesHeiko Schocher2010-01-31-109/+131
| | | | | | | | | | | | 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>
* mpc85xx: Configure QE USB for MPC8569E-MDS boardsAnton Vorontsov2009-10-27-0/+2
| | | | | | | | Setup QE pin multiplexing for USB function, configure needed BCSRs and add some fdt fixups. Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
* net: uec: Fix uccf.h and uec.h headers to include headers they depend onAnton Vorontsov2009-09-25-0/+4
| | | | | | | | Headers should include headers containing prototypes and defines they depend on, don't assume that they're included by somebody else. Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
* net: uec_phy: Implement TXID and RXID RGMII modes for Marvell PHYsAnton Vorontsov2009-09-25-2/+14
| | | | | | | This will be needed for MPC8360E-MDS boards with rev. 2.1 CPUs. Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com> Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
* UEC FIXED PHY: Determine fixed-phy port using UEC interface name.Richard Retanubun2009-08-10-17/+19
| | | | | | | | | | | Fixed a misunderstanding in the original implementation, 'devnum' that was used in the cpu/ppc4xx/4xx_enet.c implementation was NOT the PHY's SMI address, rather it was the number of the MAC interface on the CPU. The equivalent of this for uec_phy will be the UEC number stored in mii_info->dev->name. Usage example is updated for uec. Signed-off-by: Richard Retanubun <RichardRetanubun@RuggedCom.com> 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-2/+46
| | | | | 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/+58
| | | | | | | | | | | 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: Add more SNUM number for QEHaiying Wang2009-06-12-4/+12
| | | | | | | | | Some QE chips like 8569 need more SNUM numbers for supporting 4 UECs in RGMII- 1000 mode. 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: Change QE RISC ALLOCATION to support 4 RISCsHaiying Wang2009-06-12-12/+44
| | | | | | | | | 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-18/+18
| | | | | | Rename riscRx/riscTx to risc_rx/risc_tx to comply with Codingstyle. Signed-off-by: Haiying Wang <Haiying.Wang@freescale.com>
* General help message cleanupWolfgang Denk2009-06-12-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Many of the help messages were not really helpful; for example, many commands that take no arguments would not print a correct synopsis line, but "No additional help available." which is not exactly wrong, but not helpful either. Commit ``Make "usage" messages more helpful.'' changed this partially. But it also became clear that lots of "Usage" and "Help" messages (fields "usage" and "help" in struct cmd_tbl_s respective) were actually redundant. This patch cleans this up - for example: Before: => help dtt dtt - Digital Thermometer and Thermostat Usage: dtt - Read temperature from digital thermometer and thermostat. After: => help dtt dtt - Read temperature from Digital Thermometer and Thermostat Usage: dtt Signed-off-by: Wolfgang Denk <wd@denx.de>
* Update CHANGELOG, coding style cleanup.Wolfgang Denk2009-04-05-5/+6
|
* MPC85xx: Load and enable QE microcode patch in IRAMHaiying Wang2009-03-30-0/+10
| | | | | | | | For the silicon which doesn't have ROM support in QE, it always needs to load a pre-built ucode binary to IRAM so that QE can work. Signed-off-by: Haiying Wang <Haiying.Wang@freescale.com> Signed-off-by: Hillel Avni <Hillel.Avni@freescale.com>
* Merge branch 'master' of git://git.denx.de/u-boot-netWolfgang Denk2009-02-01-0/+59
|\
| * powerpc: net: support for the SMSC LAN8700 PHYHeiko Schocher2009-01-24-0/+59
| | | | | | | | | | Signed-off-by: Heiko Schocher <hs@denx.de> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
* | Command usage cleanupPeter Tyser2009-01-28-1/+1
| | | | | | | | | | | | | | | | Remove command name from all command "usage" fields and update common/command.c to display "name - usage" instead of just "usage". Also remove newlines from command usage fields. Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
* | Standardize command usage messages with cmd_usage()Peter Tyser2009-01-28-2/+2
|/ | | | Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
* drivers/qe/uec_phy.c: Added PHY-less (fixed PHY) driver.Richard Retanubun2008-11-09-0/+79
| | | | | | | | Copied over the fixed PHY driver as used in pp4xx/4xx_enet.c. This adds support for PHY-less MAC connections to the UEC. Signed-off-by: Richard Retanubun <RichardRetanubun@RuggedCom.com> Signed-off-by: Ben Warren <biggerbadderben@gmail.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/+34
| | | | | | | | | | | | | | 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-14/+2
| | | | 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-55/+55
| | | | | | | | | | | 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 Broadcom BCM5481 Gigabit PHYAnton Vorontsov2008-03-25-0/+41
| | | | | | | | | This patch adds basic support for Broadcom BCM5481 PHY. RXD-RXC delay quirk comes from MPC8360E-RDK BSP source, author is Peter Barada <peterb@logicpd.com>. Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
* uec: add support for RGMII_RXID interface modeAnton Vorontsov2008-03-25-0/+2
| | | | | | | PHY drivers will use it to setup software delay between RXD and RXC signals. Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
* uec: add support for gbit mii status readingsAnton Vorontsov2008-03-25-9/+24
| | | | Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
* net: uec_phy: actually increment the timeout counterKim Phillips2008-03-07-1/+2
| | | | | | | | allow u-boot to recover (and, e.g., switch to another interface) in the case where a PHY does not report autonegotiation is complete within its two second timeout value. Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
* fix QE firmware uploading limitTimur Tabi2008-03-03-1/+1
| | | | | | | Fix a typo in qe_upload_firmware() that prevented uploading firmware on systems with more than one RISC core. Signed-off-by: Timur Tabi <timur@freescale.com>
* net: uec_phy: handle 88e1111 rev.B2 erratum 5.6Kim Phillips2008-03-02-0/+8
| | | | | | | | | | erratum 5.6 states the autoneg completion bit is functional only if the autoneg bit is asserted. This fixes any secondarily-issued networking commands on non-gigabit links on the mpc8360 mds board. Signed-off-by: Kim Phillips <kim.phillips@freescale.com>