summaryrefslogtreecommitdiff
path: root/drivers/net
Commit message (Collapse)AuthorAgeLines
* dm9000x.c: fix compile problemsWolfgang Denk2010-05-26-6/+6
| | | | | | | Use readX() / writeX() accessors instead of inX() / outX(). Suggested-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Wolfgang Denk <wd@denx.de>
* lan91c96, smc911x: remove useless free(ptr) calls on NULL ptrSerge Ziryukin2010-05-17-2/+0
| | | | Signed-off-by: Serge Ziryukin <ftrvxmtrx@gmail.com>
* Blackfin: bfin_mac: hook up new write_hwaddr functionMike Frysinger2010-05-03-15/+16
| | | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
* net: ethoc: add write_hwaddr supportThomas Chou2010-05-03-3/+3
| | | | | Signed-off-by: Thomas Chou <thomas@wytron.com.tw> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
* net: altera_tse: add write_hwaddr supportThomas Chou2010-05-03-28/+35
| | | | | Signed-off-by: Thomas Chou <thomas@wytron.com.tw> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
* net: fec_mxc: add write_hwaddr supportHeiko Schocher2010-05-03-1/+1
| | | | | | | tested on the magnesium board. Signed-off-by: Heiko Schocher <hs@denx.de> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
* net:kirkwood_egiga.c: MAC addresses programming using write_hwaddrPrafulla Wadaskar2010-05-03-0/+11
| | | | | | | | | Added a new function kwgbe_write_hwaddr for programming egiga controller's hardware address. This function will be called for each egiga port being used Signed-off-by: Prafulla Wadaskar <prafulla@marvell.com> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
* net: add altera triple speeds ethernet mac driverThomas Chou2010-05-03-0/+1430
| | | | | | | | This driver supports the Altera triple speeds 10/100/1000 ethernet mac. Signed-off-by: Thomas Chou <thomas@wytron.com.tw> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
* net: add opencore 10/100 ethernet mac driverThomas Chou2010-05-03-0/+512
| | | | | | | | This patch ports the opencore 10/100 ethernet mac driver ethoc.c from linux kernel to u-boot. Signed-off-by: Thomas Chou <thomas@wytron.com.tw> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
* smc911x driver frame alignment patchValentin Yakovenkov2010-05-03-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SMSC911x chips have alignment function to allow frame payload data (which comes after 14-bytes ethernet header) to be aligned at some boundary when reading it from fifo (usually - 4 bytes boundary). This is done by inserting fake zeros bytes BEFORE actual frame data when reading from SMSC's fifo. This function controlled by RX_CFG register. There are bits that represents amount of fake bytes to be inserted. Linux uses alignment of 4 bytes. Ethernet frame header is 14 bytes long, so we need to add 2 fake bytes to get payload data aligned at 4-bytes boundary. Linux driver does this by adding IP_ALIGNMENT constant (defined at skb.h) when calculating fifo data length. All network subsystem of Linux uses this constant too when calculating different offsets. But u-boot does not use any packet data alignment, so we don't need to add anything when calculating fifo data length. Moreover, driver zeros the RX_CFG register just one line up, so chip does not insert any fake data at the beginig. So calculated data length is always bigger by 1 word. It seems that at almost every packet read we get an underflow condition at fifo and possible corruption of data. Especially at continuous transfers, such as tftp. Just after removing this magic addition, I've got tftp transfer speed as it aught to be at 100Mbps. It was really slow before. It seems that fifo underflow occurs only when using byte packing on 32-bit blackfin bus (may be because of very small delay between reads). Signed-off-by: Valentin Yakovenkov <yakovenkov@niistt.ru> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
* net: Kirkwood_egiga.c bugfixes for rx pathPrafulla Wadaskar2010-05-03-4/+5
| | | | | | | | | Cosmetic changes: Few comments updated Functionality: Rx packet frame size is programming should be done when port is in disabled state. this is corrected Signed-off-by: Prafulla Wadaskar <prafulla@marvell.com> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
* fec_mxc.c: Fix MX27 FEC MAC validity checkEric Jarrige2010-05-03-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>
* tsec: Wait for both RX and TX to stopAndy Fleming2010-05-03-1/+2
| | | | | | | | | When gracefully stopping the controller, the driver was continuing if *either* RX or TX had stopped. We need to wait for both, or the controller could get into an invalid state. Signed-off-by: Andy Fleming <afleming@freescale.com> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
* net: dm9000x: use standard I/O accessorsMike Frysinger2010-05-03-6/+6
| | | | | | | | | | The current dm9000x driver accesses its memory mapped registers directly instead of using the standard I/O accessors. This can cause problems on Blackfin systems as the accesses can get out of order. So convert the direct volatile dereferences to use the normal in/out macros. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
* mpc512x_fec: Move PHY initialization from probe into init routine.Detlev Zundel2010-05-03-22/+7
| | | | | | | This saves the autonegotation delay when not using ethernet in U-Boot Signed-off-by: Detlev Zundel <dzu@denx.de> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
* fec_mxc don't use internal eeprom on MX25John Rigby2010-05-03-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>
* fix lockup in mcfmii/mii_discover_phy() in case communication failsWolfgang Wegner2010-05-03-22/+23
| | | | | Signed-off-by: Wolfgang Wegner <w.wegner@astro-kom.de> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
* Remove unused "local_crc32" function.Detlev Zundel2010-05-03-80/+2
| | | | | | | For code archeologists, this is a nice example of copy and paste history. Signed-off-by: Detlev Zundel <dzu@denx.de> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
* net: Kirkwood_egiga.c: fixed build warningsPrafulla Wadaskar2010-05-03-3/+3
| | | | | | | | | | | | This patch fixes following build warnings for kirkwood_egiga.c kirkwood_egiga.c: In function "kwgbe_init": kirkwood_egiga.c:448: warning: dereferencing type-punned pointer will break strict-aliasing rules kirkwood_egiga.c: In function "kwgbe_recv": kirkwood_egiga.c:609: warning: dereferencing type-punned pointer will break strict-aliasing rules Signed-off-by: Prafulla Wadaskar <prafulla@marvell.com> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
* Merge branch 'next'Wolfgang Denk2010-04-01-8/+2
|\
| * mpc5xxx: Remove all references to MGT5100Detlev Zundel2010-03-21-8/+2
| | | | | | | | | | | | We do not support a processor that never reached a real customer. Signed-off-by: Detlev Zundel <dzu@denx.de>
* | net, fec_mxc: only setup the device enetaddr with eeprom valueHeiko Schocher2010-03-31-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>
* mpc82xx: Remove SL8245 board and the now orpahned sk98lin network driver.Detlev Zundel2010-03-12-45428/+0
| | | | | | | | | This code has compile problems and the company does not even exist any more. So we take the liberty to drop support for it. Signed-off-by: Detlev Zundel <dzu@denx.de> CC: Wolfgang Denk <wd@denx.de> CC: Ben Warren <biggerbadderben@gmail.com>
* fec_mxc: add MX25 supportJohn Rigby2010-03-07-3/+60
| | | | | | | | 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-07-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-06-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>
* NET: kirkwood-egiga smi access fixSiddarth Gore2010-02-06-6/+7
| | | | | | | | | | | | Although the datasheet mentions seperate smi registers for each port, using Port 1 smi register to access ethernet phys does not work. Hence only Port 0 smi register should be used to access all devices connected to the smi bus. This behavior is consistant with the mv643xx driver in the linux kernel. Signed-off-by: Siddarth Gore <gores@marvell.com> Acked-by: Prafulla Wadaskar <prafulla@marvell.com> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
* new at91_emac network driver (NET_MULTI api)Jens Scharsig2010-01-31-0/+499
| | | | | | | | | | | | * add's at91_emac (AT91RM9200) network driver (NET_MULTI api) * enable driver with CONFIG_DRIVER_AT91EMAC * generic PHY initialization * modify AT91RM9200 boards to use NET_MULTI driver * the drivers has been tested with LXT971 Phy and DM9161 Phy at MII and RMII interface Signed-off-by: Jens Scharsig <js_at_ng@scharsoft.de> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
* Add EP93xx ethernet driverMatthias Kaehlcke2010-01-31-0/+798
| | | | | | | Added ethernet driver for EP93xx SoCs Signed-off-by: Matthias Kaehlcke <matthias@kaehlcke.net> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
* TI: DaVinci: Updating EMAC driver for DM365, DM646x and DA8XXNick Thompson2010-01-31-95/+171
| | | | | | | | | The EMAC IP on DM365, DM646x and DA830 is slightly different from that on DM644x. This change updates the DaVinci EMAC driver so that EMAC becomes operational on SOCs with EMAC v2. Signed-off-by: Nick Thompson <nick.thompson@ge.com> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
* macb: Fix mii_phy_read and mii_phy_write functionsSemih Hazar2010-01-31-77/+33
| | | | | | | | | | | Enabling CONFIG_CMD_MII in AVR32 boards was not possible due to compile errors. This patch fixes miiphy_read and miiphy_write functions and registers them properly. Signed-off-by: Semih Hazar <semih.hazar@indefia.com> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
* tsec: Add TSEC_FIBER flagPeter Tyser2010-01-31-2/+4
| | | | | | | | | | | | The TSEC_FIBER flag should be set when a PHY is operating with an external fiber interface. Currently it is only used to notify a user that the PHY is operating in fiber mode. A short description was also added to the other TSEC flag defines so that it is clear how they differ from one another. Signed-off-by: Peter Tyser <ptyser@xes-inc.com> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
* tsec: Add support for using the BCM5482 PHY in fiber modePeter Tyser2010-01-31-4/+106
| | | | | | | | | The BCM5482 PHY supports both copper and fiber as an ethernet medium. By enabling its copper/fiber mode auto-detection feature it can dynamically determine if it should be configured for copper or fiber. Signed-off-by: Peter Tyser <ptyser@xes-inc.com> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
* tsec: General cleanupPeter Tyser2010-01-31-345/+326
| | | | | | | | | | | - Cleanup formatting of phy_info structures - Fix lines > 80 chars - Fix some random indentation inconsistencies Signed-off-by: Peter Tyser <ptyser@xes-inc.com> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
* tsec: Make functions/data static when possiblePeter Tyser2010-01-31-43/+47
| | | | | | | This is generally good practice and saves ~150 bytes. Signed-off-by: Peter Tyser <ptyser@xes-inc.com> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
* tsec: Clean up Broadcom PHY status parsingPeter Tyser2010-01-31-43/+34
| | | | | | | | | | | | | | | | - Remove unnecessary printing "Enet starting in <speed>/<duplex>" This same information is already printed during normal ethernet operation in the form "Speed: 1000, full duplex". - Add a check for link before determining link speed and duplex If there is no link, speed/duplex don't matter. This also removes the annoying and unneeded "Auto-neg error, defaulting to 10BT/HD" message that occurs when no link is detected. - Whitespace and line > 80 characters cleanup Signed-off-by: Peter Tyser <ptyser@xes-inc.com> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
* tsec: Force TBI PHY to 1000Mbps full duplex in SGMII modePeter Tyser2010-01-31-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | In SGMII mode the link between a processor's internal TBI PHY and an external PHY should always be 1000Mbps, full duplex. Also, the SGMII interface between an internal TBI PHY and external PHY does not support in-band auto-negotation. Previously, when configured for SGMII mode a TBI PHY would attempt to restart auto-negotation during initializtion. This auto-negotation between a TBI PHY and external PHY would fail and result in unusable ethernet operation. Forcing the TBI PHY and and external PHY to link at 1000Mbps full duplex in SGMII mode resolves this issue of auto-negotation failing. Note that 10Mbps and 100Mbps operation is still possible on the external side of the external PHY even when SGMII is operating at 1000Mbps. The SGMII interface still operates at 1000Mbps, but each byte of data is repeated 100 or 10 times for 10/100Mbps and the external PHY handles converting this data stream into proper 10/100Mbps signalling. Signed-off-by: Peter Tyser <ptyser@xes-inc.com> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
* NET: Fix MAC addr handling for smc911xSeunghyeon Rhee2010-01-31-6/+9
| | | | | | | | | | | | | | | | | | | This patch turns off MAC address mismatch warning when optional eeprom programmed with MAC address is not available. In that case, smc911x's MAC address register has its default value ff:ff:ff:ff:ff:ff and it's not a valid address. This makes eth_initialize() show the warning which has no meaningful information while environment variable ethaddr overrides the address read from the register. If there's no eeprom and the value of MAC address register is not valid after initialization, dev->enetaddr had better not be updated and maintain its initial value 00:00:00:00:00:00, which I think is what eth_initialize() expects. This is not a bug fix. Even without this patch, the driver works fine. It's just for enhancing the way of displaying messages. Signed-off-by: Seunghyeon Rhee <seunghyeon@lpmtec.com> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
* cs8900_initialize() cleanupMatthias Kaehlcke2010-01-31-2/+1
| | | | | | | cs8900_initialize(): remove unecessary calls to free() and fix memory leak Signed-off-by: Matthias Kaehlcke <matthias@kaehlcke.net> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
* netconsole: mark local funcs with staticMike Frysinger2010-01-18-5/+5
| | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* NET: Move MDIO regs out of TSEC SpaceSandeep Gopalpet2010-01-05-11/+10
| | | | | | | | | | | | | | | | | Moved the mdio regs out of the tsec structure,and provided different offsets for tsec base and mdio base so that provision for etsec2.0 can be provided. This patch helps in providing the support for etsec2.0 In etsec2.0, the MDIO register space and the etsec reg space are different. Also, moved the TSEC_BASE_ADDR and MDIO_BASE_ADDR definitons into platform specific files. Signed-off-by: Sandeep Gopalpet <sandeep.kumar@freescale.com> Acked-by: Kim Phillips <kim.phillips@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
* net: dm9000x: fix debug outputThomas Weber2009-12-13-1/+1
| | | | | | | | commit 60f61e6d7655400bb785a2ef637581679941f6d1 breaks compile with gcc by introducing __func__ instead of constant string "func" in the macro call but missed to change the macro. Signed-off-by: Thomas Weber <weber@corscience.de> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
* fec_mxc: incomplete error handlingJohn Ogness2009-12-13-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>
* net: e1000: Add support for the Intel 82546GB controllerReinhard Arlt2009-12-13-0/+1
| | | | | | | | | This chip is equipped for example on the esd PMC-ETH2-GB board. So let's add it to the list of supported chips to the e1000 driver. Signed-off-by: Reinhard Arlt <reinhard.arlt@esd.eu> Signed-off-by: Stefan Roese <sr@denx.de> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
* NET: LAN91C96 CONFIG_NET_MULTIifyNishanth Menon2009-12-13-329/+235
| | | | | | | | | | | | | Make the lan91c96 driver capable of CONFIG_NET_MULTI to be clean for the new arch, add a a lil detect function Most of the formatting change was done to keep checkpatch silent, but a few functions and #if 0ed code which does not make sense for NET_MULTI have been removed Now, use the lan91c96_initialize() function to init the driver Signed-off-by: Nishanth Menon <nm@ti.com> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
* smc911x: fix typo in smc911x_handle_mac_address nameMike Rapoport2009-12-07-2/+2
| | | | Signed-off-by: Mike Rapoport <mike@compulab.co.il>
* smc911x: make smc911x_initialize return correct valueMike Rapoport2009-11-12-2/+2
| | | | | | | | | Make smc911x_initialize return -1 on error and number of interfaces detected otherwise. Signed-off-by: Mike Rapoport <mike@compulab.co.il> Acked-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
* mxc_fec: avoid free() calls to already freed pointers.javier Martin2009-11-11-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-11-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>
* SMC91111: Clean up SMC_inx macros on xsengine and xaeniaxBen Warren2009-11-09-4/+4
| | | | | | | | | | | | | | | | This patch fixes the following warnings: Configuring for xaeniax board... smc91111_eeprom.c: In function 'print_macaddr': smc91111_eeprom.c:278: warning: suggest parentheses around + or - in operand of & smc91111_eeprom.c:281: warning: suggest parentheses around + or - in operand of & ... Configuring for xsengine board... smc91111_eeprom.c: In function 'print_macaddr': smc91111_eeprom.c:278: warning: suggest parentheses around + or - inside shift smc91111_eeprom.c:281: warning: suggest parentheses around + or - inside shift Signed-off-by: Ben Warren <biggerbadderben@gmail.com>