summaryrefslogtreecommitdiff
path: root/drivers/net
AgeCommit message (Collapse)Author
2011-02-15HACK: smc911x.h register access change for minikitAlessandro Rubini
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
2010-01-05NET: Move MDIO regs out of TSEC SpaceSandeep Gopalpet
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>
2009-12-13net: dm9000x: fix debug outputThomas Weber
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>
2009-12-13fec_mxc: incomplete error handlingJohn Ogness
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>
2009-12-13net: e1000: Add support for the Intel 82546GB controllerReinhard Arlt
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>
2009-12-13NET: LAN91C96 CONFIG_NET_MULTIifyNishanth Menon
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>
2009-12-07smc911x: fix typo in smc911x_handle_mac_address nameMike Rapoport
Signed-off-by: Mike Rapoport <mike@compulab.co.il>
2009-11-12smc911x: make smc911x_initialize return correct valueMike Rapoport
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>
2009-11-11mxc_fec: avoid free() calls to already freed pointers.javier Martin
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>
2009-11-11mxc_fec: fix some erroneous PHY accesses.javier Martin
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>
2009-11-09SMC91111: Clean up SMC_inx macros on xsengine and xaeniaxBen Warren
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>
2009-11-09Fix CS8900 regression on impa7 boardBen Warren
The following error was seen on impa7 board, due to its use of a 32-bit bus on CS8900. cs8900.c:137:37: error: macro "get_reg_init_bus" passed 2 arguments, but takes just 1 This patch gives the macro the correct number of arguments Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2009-11-09Fix cs8900 dev->priv not init issueHui.Tang
Ensure all CS8900 data structures are assigned before accessing device Signed-off-by: Hui.Tang <zetalabs@gmail.com> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2009-10-29Fix DM9000 MAC address handlingBen Warren
Proper behavior is to pull MAC address from NVRAM in the initialization() an stuff it in dev->address, then program the device from dev->address in the init() function. Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2009-10-28Coding Style cleanup; update CHANGELOG, prepare -rc1Wolfgang Denk
Signed-off-by: Wolfgang Denk <wd@denx.de>
2009-10-27drivers/net/phy/miiphybb.c: fix warning: no newline at end of fileWolfgang Denk
Add missing newline. Signed-off-by: Wolfgang Denk <wd@denx.de> Cc: Luigi Mantellini <luigi.mantellini@idf-hit.com> Cc: Ben Warren <biggerbadderben@gmail.com>
2009-10-24Merge branch 'master-sync' of git://git.denx.de/u-boot-armWolfgang Denk
2009-10-24ARM: OMAP3: Refactors the SM911x driverSteve Sakoman
Move the test up in the function to not hang on systems without ethernet. Signed-off-by: Steve Sakoman <sakoman@gmail.com> Acked-by: Ben Warren <biggerbadderben@gmail.com>
2009-10-19smc911x: add support for LAN9220Daniel Mack
Signed-off-by: Daniel Mack <daniel@caiaq.de> Cc: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2009-10-13SMC911X: Add chip auto detectionOlof Johansson
Refactor the smc911x driver to allow for detecting when the chip is missing. I.e. the detect_chip() function is called earlier and will abort gracefully when the Chip ID read returns all 1's. Signed-off-by: Olof Johansson <olof@lixom.net> Acked-by: Dirk Behme <dirk.behme@googlemail.com> Acked-by: Ben Warren <biggerbadderben@gmail.com>
2009-10-10Rewrite the miiphybb (Bit-banged MII bus driver) in order to support an ↵Luigi 'Comio' Mantellini
arbitrary number of mii buses. This feature is useful when your board uses different mii buses for different phys and all (or a part) of these buses are implemented via bit-banging mode. The driver requires that the following macros should be defined into the board configuration file: CONFIG_BITBANGMII - Enable the miiphybb driver CONFIG_BITBANGMII_MULTI - Enable the multi bus support If the CONFIG_BITBANGMII_MULTI is not defined, the board's config file needs to define at least the following macros: MII_INIT - Generic code to enable the MII bus (optional) MDIO_DECLARE - Declaration needed to access to the MDIO pin (optional) MDIO_ACTIVE - Activate the MDIO pin as out pin MDIO_TRISTATE - Activate the MDIO pin as input/tristate pin MDIO_READ - Read the MDIO pin MDIO(v) - Write v on the MDIO pin MDC_DECLARE - Declaration needed to access to the MDC pin (optional) MDC(v) - Write v on the MDC pin The previous macros make the driver compatible with the previous version (that didn't support the multi-bus). When the CONFIG_BITBANGMII_MULTI is also defined, the board code needs to fill the bb_miiphy_buses[] array with a record for each required bus and declare the bb_miiphy_buses_num variable with the number of mii buses. The record (struct bb_miiphy_bus) has the following fields/callbacks (see miiphy.h for details): char name[] - The symbolic name that must be equal to the MII bus registered name int (*init)() - Initialization function called at startup time (just before the Ethernet initialization) int (*mdio_active)() - Activate the MDIO pin as output int (*mdio_tristate)() - Activate the MDIO pin as input/tristate pin int (*set_mdio)() - Write the MDIO pin int (*get_mdio)() - Read the MDIO pin int (*set_mdc)() - Write the MDC pin int (*delay)() - Delay function void *priv - Private data used by board specific code The board code will look like: struct bb_miiphy_bus bb_miiphy_buses[] = { { .name = miibus#1, .init = b1_init, .mdio_active = b1_mdio_active, ... }, { .name = miibus#2, .init = b2_init, .mdio_active = b2_mdio_active, ... }, ... int bb_miiphy_buses_num = sizeof(bb_miiphy_buses) / sizeof(bb_miiphy_buses[0]); Signed-off-by: Luigi 'Comio' Mantellini <luigi.mantellini@idf-hit.com> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2009-10-09Merge branch 'reloc'Wolfgang Denk
2009-10-07ppc_4xx: Apply new HW register namesNiklaus Giger
Modify all existing *.c files to use the new register names as seen in the AMCC manuals. Signed-off-by: Niklaus Giger <niklaus.giger@member.fsf.org> Signed-off-by: Stefan Roese <sr@denx.de>
2009-10-04net: kirkwood_egiga.c: fixed build warningPrafulla Wadaskar
if link up detection code is disabled through config option, it gives build warning. This patch fixes the same Signed-off-by: Prafulla Wadaskar <prafulla@marvell.com> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2009-10-04Convert SMC91111 Ethernet driver to CONFIG_NET_MULTI APIBen Warren
All in-tree boards that use this controller have CONFIG_NET_MULTI added Also: - changed CONFIG_DRIVER_SMC91111 to CONFIG_SMC91111 - cleaned up line lengths - modified all boards that override weak function in this driver - modified all eeprom standalone apps to work with new driver - updated blackfin standalone EEPROM app after testing Signed-off-by: Ben Warren <biggerbadderben@gmail.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-10-04net: phy: mv88e61xx.c : fixed build warningPrafulla Wadaskar
following build warning was observed mv88e61xx.c: In function ‘mv88e61xx_busychk’: mv88e61xx.c:208: warning: dereferencing type-punned pointer will break strict-aliasing rules This patch fixes the same Patch tested for rd6281a board build Signed-off-by: Prafulla Wadaskar <prafulla@marvell.com> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2009-10-04net: Fix problem with 405EZ ethernet interruptJames Clough
On 405EZ the RX-/TX-interrupts are coalesced into one IRQ bit in the UIC. We need to acknowledge the RX-/TX-interrupts in the SDR0_ICINTSTAT reg as well. This problem was introduced with commit d1631fe1 [ppc4xx: Consolidate PPC4xx UIC defines] Signed-off-by: James Clough <james@rtetc.com> Signed-off-by: Stefan Roese <sr@denx.de> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2009-10-03tsec: Remove PHY command relocation fixupsPeter Tyser
Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
2009-09-15Merge branch 'master' of git://git.denx.de/u-boot-microblazeWolfgang Denk
2009-09-15Merge branch 'master' of git://git.denx.de/u-boot-ppc4xxWolfgang Denk
2009-09-15sk98lin: fix compile warningsWolfgang Denk
Fix warnings: skge.c: In function 'BoardInitMem': skge.c:1389: warning: dereferencing type-punned pointer will break strict-aliasing rules skge.c:1390: warning: dereferencing type-punned pointer will break strict-aliasing rules skge.c:1391: warning: dereferencing type-punned pointer will break strict-aliasing rules skgesirq.c: In function 'SkGePortCheckUpXmac': skgesirq.c:1301: warning: dereferencing type-punned pointer will break strict-aliasing rules skgesirq.c:1301: warning: dereferencing type-punned pointer will break strict-aliasing rules skgesirq.c:1398: warning: dereferencing type-punned pointer will break strict-aliasing rules skgesirq.c:1398: warning: dereferencing type-punned pointer will break strict-aliasing rules skrlmt.c: In function 'SkRlmtInit': skrlmt.c:661: warning: dereferencing type-punned pointer will break strict-aliasing rules skxmac2.c: In function 'SkMacPromiscMode': skxmac2.c:753: warning: dereferencing type-punned pointer will break strict-aliasing rules skxmac2.c:753: warning: dereferencing type-punned pointer will break strict-aliasing rules skxmac2.c: In function 'SkMacHashing': skxmac2.c:803: warning: dereferencing type-punned pointer will break strict-aliasing rules skxmac2.c:803: warning: dereferencing type-punned pointer will break strict-aliasing rules skxmac2.c: In function 'SkMacFlushTxFifo': skxmac2.c:1115: warning: dereferencing type-punned pointer will break strict-aliasing rules skxmac2.c:1115: warning: dereferencing type-punned pointer will break strict-aliasing rules skxmac2.c: In function 'SkMacFlushRxFifo': skxmac2.c:1145: warning: dereferencing type-punned pointer will break strict-aliasing rules skxmac2.c:1145: warning: dereferencing type-punned pointer will break strict-aliasing rules skxmac2.c: In function 'SkXmInitPauseMd': skxmac2.c:1987: warning: dereferencing type-punned pointer will break strict-aliasing rules skxmac2.c:1987: warning: dereferencing type-punned pointer will break strict-aliasing rules skxmac2.c: In function 'SkXmOverflowStatus': skxmac2.c:4236: warning: dereferencing type-punned pointer will break strict-aliasing rules skxmac2.c:4236: warning: dereferencing type-punned pointer will break strict-aliasing rules skxmac2.c:4242: warning: dereferencing type-punned pointer will break strict-aliasing rules skxmac2.c:4242: warning: dereferencing type-punned pointer will break strict-aliasing rules Signed-off-by: Wolfgang Denk <wd@denx.de> Cc: Ben Warren <biggerbadderben@gmail.com>
2009-09-15drivers/net/natsemi.c: fix compile warningWolfgang Denk
Fix warning: natsemi.c:757: warning: dereferencing type-punned pointer will break strict-aliasing rules Signed-off-by: Wolfgang Denk <wd@denx.de> Cc: Ben Warren <biggerbadderben@gmail.com>
2009-09-14net: emaclite: Cleanup license to be GPL compatibleMichal Simek
Signed-off-by: Stephen Neuendorffer <stephen.neuendorffer@xilinx.com> Signed-off-by: Michal Simek <monstr@monstr.eu>
2009-09-14net: Remove old Xilinx Emac driverMichal Simek
Signed-off-by: Michal Simek <monstr@monstr.eu>
2009-09-11ppc4xx: Big cleanup of PPC4xx definesStefan Roese
This patch cleans up multiple issues of the 4xx register (mostly DCR, SDR, CPR, etc) definitions: - Change lower case defines to upper case (plb4_acr -> PLB4_ACR) - Change the defines to better match the names from the user's manuals (e.g. cprpllc -> CPR0_PLLC) - Removal of some unused defines Please test this patch intensive on your PPC4xx platform. Even though I tried not to break anything and tested successfully on multiple 4xx AMCC platforms, testing on custom platforms is recommended. Signed-off-by: Stefan Roese <sr@denx.de>
2009-09-04Use different PBA value for E1000 PCI and PCIe cardsRoy Zang
Signed-off-by: Roy Zang <tie-fei.zang@freescale.com> Acked-by: André Schwarz <andre.schwarz@matrix-vision.de>
2009-08-25net: tsec - handle user interrupt while waiting for PHY auto negotiation to ↵Kim Phillips
complete if you don't have firmware installed for the PHY to come to life, this wait can be painful - let's give the option to avoid it if we want. Signed-off-by: Kim Phillips <kim.phillips@freescale.com> Acked-by: Andy Fleming <afleming@freescale.com> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2009-08-25Add debug message for Blackfin Ethernet Rx function.Robin Getz
Add a simple print for the Blackfin's Ethernet Rx function, so we can debug incomming Ethernet functions easier. Signed-off-by: Robin Getz <rgetz@blackfin.uclinux.org> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2009-08-25Convert CS8900 Ethernet driver to CONFIG_NET_MULTI APIBen Warren
All in-tree boards that use this controller have CONFIG_NET_MULTI added Also: - changed CONFIG_DRIVER_CS8900 to CONFIG_CS8900 - changed CS8900_BASE to CONFIG_CS8900_BASE - changed CS8900_BUS?? to CONFIG_CS8900_BUS?? - cleaned up line lengths - modified VCMA9 command function that accesses the device - removed MAC address initialization from lib_arm/board.c Signed-off-by: Ben Warren <biggerbadderben@gmail.com> Tested-by: Wolfgang Denk <wd@denx.de> Acked-by: Wolfgang Denk <wd@denx.de>
2009-08-21tsec: Wait for auto-negotiation to complete without linkPeter Tyser
Previously, waiting for auto-negotiation would only occur if a valid link had been detected. Problems arose when attempting to use a tsec immediately after bootup but before link was achieved, eg: => dhcp Auto-neg error, defaulting to 10BT/HD eTSEC1: No link. Auto-neg error, defaulting to 10BT/HD eTSEC2: No link. => With this patch applied the same operation as above resulted in: => dhcp Waiting for PHY auto negotiation to complete. done Enet starting in 1000BT/FD Speed: 1000, full duplex Signed-off-by: Peter Tyser <ptyser@xes-inc.com> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2009-08-21arm: kirkwood: See to it that sent data is 8-byte alignedSimon Kagstrom
U-boot might use non-8-byte-aligned addresses for sending data, which the kwgbe_send doesn't accept (bootp does this for me). This patch copies the data to be sent to a malloced temporary buffer if it is non-aligned. Signed-off-by: Simon Kagstrom <simon.kagstrom@netinsight.net> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2009-08-21Wait for the link to come up on kirkwood network initSimon Kagstrom
This patch makes the device wait for up to 5 seconds for the link to come up, similar to what many of the other network drivers do. This avoids confusing situations where, e.g., a tftp fails when initiated early after U-boot has started (before the link has come up). Signed-off-by: Simon Kagstrom <simon.kagstrom@netinsight.net> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2009-08-21arm:kirkwood Define kirkwood phy address magic numberSimon Kagstrom
Signed-off-by: Simon Kagstrom <simon.kagstrom@netinsight.net> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2009-08-21e1000: fix PCI memory addressingTimur Tabi
The Intel E1000 driver was making assumptions about the relationship between some virtual, physical, and PCI addresses. Also fix some bad usage of the DEBUGOUT macro Signed-off-by: Timur Tabi <timur@freescale.com> Acked-by: Kumar Gala <galak@kernel.crashing.org> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2009-08-10net: kirkwood: updates: used eth_setenv_enetaddr apiPrafulla Wadaskar
eth_setenv_enetaddr is avaible by upper layer using this saves 204 bytes on total image size used Local OUI instead of Marvell OUI for random MAC address generation logic Signed-off-by: Prafulla Wadaskar <prafulla@marvell.com> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2009-08-10Fix E1000 build warning on AP1000 boardRoy Zang
Fix E1000 build warning on AP1000 board Fix the build warning on AP1000 board: e1000.c:131: warning: 'e1000_read_eeprom' used but never defined e1000.c:2012: warning: 'e1000_set_phy_mode' defined but not used Signed-off-by: Roy Zang <tie-fei.zang@freescale.com> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2009-08-10net: phy: bugfixes: mv88E61xx compiler warnings fixedPrafulla Wadaskar
1. mv88E61xx driver compiler warnings fixed 2. idstr if-else statements changed to switch() construct and added default case too. This fixed idstr may be uninitialized warning Signed-off-by: Prafulla Wadaskar <prafulla@marvell.com> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2009-08-10arm: A320: driver for FTMAC100 ethernet controllerPo-Yu Chuang
This patch adds an FTMAC100 ethernet driver for Faraday A320 evaluation board. Signed-off-by: Po-Yu Chuang <ratbert@faraday-tech.com> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2009-08-09Dual-license IBM code contributionsJosh Boyer
It was brought to our attention that U-Boot contains code derived from the IBM OpenBIOS source code originally provided with some of the older PowerPC 4xx development boards. As a result, the original license of this code has been carried in the various files for a number of years in the U-Boot project. IBM is dual-licensing the IBM code contributions already present in U-Boot under either the terms of the GNU General Public License version 2, or the original code license already present. Signed-off-by: Josh Boyer <jwboyer@linux.vnet.ibm.com>
2009-08-08Add Intel E1000 PCIE card supportRoy Zang
Based on Intel PRO/1000 Network Driver 7.3.20-k2 Add Intel E1000 PCIE card support. The following cards are added: INTEL_82571EB_COPPER INTEL_82571EB_FIBER, INTEL_82571EB_SERDES INTEL_82571EB_QUAD_COPPER INTEL_82571PT_QUAD_COPPER INTEL_82571EB_QUAD_FIBER INTEL_82571EB_QUAD_COPPER_LOWPROFILE INTEL_82571EB_SERDES_DUAL INTEL_82571EB_SERDES_QUAD INTEL_82572EI_COPPER INTEL_82572EI_FIBER INTEL_82572EI_SERDES INTEL_82572EI INTEL_82573E INTEL_82573E_IAMT INTEL_82573L INTEL_82546GB_QUAD_COPPER_KSP3 INTEL_80003ES2LAN_COPPER_DPT INTEL_80003ES2LAN_SERDES_DPT INTEL_80003ES2LAN_COPPER_SPT INTEL_80003ES2LAN_SERDES_SPT 82571EB_COPPER dual ports, 82572EI single port, 82572EI_COPPER single port PCIE cards and 82545EM_COPPER, 82541GI_LF pci cards are tested on both P2020 board and MPC8544DS board. Signed-off-by: Roy Zang <tie-fei.zang@freescale.com> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>