aboutsummaryrefslogtreecommitdiff
path: root/drivers/net
AgeCommit message (Collapse)Author
2011-06-22Add Ethernet hardware MAC address framework to usbnetSimon Glass
Built-in Ethernet adapters support setting the mac address by means of a ethaddr environment variable for each interface (ethaddr, eth1addr, eth2addr). This adds similar support to the USB network side, using the names usbethaddr, usbeth1addr, etc. They are kept separate since we don't want a USB device taking the MAC address of a built-in device or vice versa. TEST=build, test on harmony, with setenv usbethaddr c0:c1:c0:13:0b:b8, bootp, tftp ... Signed-off-by: Simon Glass <sjg@chromium.org>
2011-06-21macb: fix compile warningandreas.devel@googlemail.com
This patch fixes following compile warning: ---8<--- macb.c: In function 'macb_write_hwaddr': macb.c:525:2: warning: dereferencing type-punned pointer will break strict-aliasing rules --->8--- Signed-off-by: Andreas Bießmann <andreas.devel@gmail.com>
2011-06-21at91_emac: fix compile warningandreas.devel@googlemail.com
This patch removes the warning ---8<--- at91_emac.c: In function 'at91emac_write_hwaddr': at91_emac.c:487:2: warning: dereferencing type-punned pointer will break strict-aliasing rules --->8--- Signed-off-by: Andreas Bießmann <andreas.devel@gmail.com>
2011-06-21update arm/at91rm9200 work with rework rework110202Jens Scharsig
* convert at91rm9200ek and eb_cpux9k2 board to ATMEL_xxx name scheme * Fix: timer.c compile error io.h not found with arm/at91rm9200 * update arm920t/at91 to ATMEL_xxx name scheme * update arm920t/at91 soc lib * update at91_emac driver Signed-off-by: Jens Scharsig <js_at_ng@scharsoft.de> Tested-by: Andreas Bießmann <andreas.devel@gmail.com>
2011-05-31mvgbe: enable configurability of PORT_SERIAL_CONTROL_VALUEValentin Longchamp
This allows this configuration to be defined differently for some boards that request it. Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com> cc: Holger Brunck <holger.brunck@keymile.com> cc: Heiko Schocher <hs@denx.de> cc: Wolfgang Denk <wd@denx.de> cc: Detlev Zundel <dzu@denx.de> cc: Prafulla Wadaskar <prafulla@marvell.com>
2011-05-19Minor coding style cleanup.Wolfgang Denk
Signed-off-by: Wolfgang Denk <wd@denx.de>
2011-05-18ATMEL: fix related common atmel driver filesReinhard Meyer
Signed-off-by: Reinhard Meyer <u-boot@emk-elektronik.de>
2011-05-12net: xilinx emaclite: Fix return valuesMichal Simek
Fix return values for initialize/init/recv/send functions Signed-off-by: Michal Simek <monstr@monstr.eu>
2011-05-12NET: pass source IP address to packet handlersLuca Ceresoli
This is needed for the upcoming TFTP server implementation. This also simplifies PingHandler() and fixes rxhand_f documentation. Signed-off-by: Luca Ceresoli <luca.ceresoli@comelit.it> Cc: Wolfgang Denk <wd@denx.de> Acked-by: Detlev Zundel <dzu@denx.de>
2011-04-20tsec: Convert tsec to use PHY LibAndy Fleming
This converts tsec to use the new PHY Lib. All of the old PHY support is ripped out. The old MDIO driver is split off, and placed in fsl_mdio.c. The initialization is modified to initialize the MDIO driver as well. The powerpc config file is modified to configure PHYLIB if TSEC_ENET is configured. Signed-off-by: Mingkai Hu <Mingkai.hu@freescale.com> Signed-off-by: Andy Fleming <afleming@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org> Acked-by: Detlev Zundel <dzu@denx.de>
2011-04-20phylib: Add a bunch of PHY drivers from tsecAndy Fleming
The tsec driver had a bunch of PHY drivers already written. This converts them all into PHY Lib drivers, and serves as the first set of PHY drivers for PHY Lib. While doing that, cleaned up a number of magic numbers (though not all of them, as PHY vendors like to keep their numbers as magical as possible). Also, noticed that almost all of the vitesse/cicada PHYs had the same config/parse/startup functions, so those have been collapsed into one. Signed-off-by: Andy Fleming <afleming@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org> Acked-by: Detlev Zundel <dzu@denx.de>
2011-04-20Create PHY Lib for U-BootAndy Fleming
Extends the mii_dev structure to participate in a full-blown MDIO and PHY driver scheme. The mii_dev structure and miiphy calls are modified in such a way to allow the original mii command and miiphy infrastructure to work as before, but also to support a new set of APIs which allow (among other things) sharing of PHY driver code and 10G support The mii command will continue to support normal PHY management functions (Clause 22 of 802.3), but will not be changed to support 10G (Clause 45). The basic design is similar to PHY Lib from Linux, but simplified for U-Boot's network and driver infrastructure. We now have MDIO drivers and PHY drivers An MDIO driver provides: read write reset A PHY driver provides: (optionally): probe config - initial setup, starting of auto-negotiation startup - waiting for AN, and reading link state shutdown - any cleanup needed The ethernet drivers interact with the PHY Lib using these functions: phy_connect() phy_config() phy_startup() phy_shutdown() Each PHY driver can be configured separately, or all at once using config_phylib_all_drivers.h (added in the patch which adds the drivers) We also provide generic drivers for Clause 22 (10/100/1000), and Clause 45 (10G) PHYs. We also implement phy_reset(), and call it in phy_connect(). Because phy_reset() is essentially the same as miiphy_reset, but: a) must support 10G PHYs, and b) should use the phylib primitives, we implement miiphy_reset, using phy_reset(), but only when CONFIG_PHYLIB is set. Otherwise, we just use the old version. In this way, we save on compile size, even if we don't manage to save code size. Pulled ethtool.h and mdio.h from: git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6 782d640afd15af7a1faf01cfe566ca4ac511319d With many, many deletions so as to enable compilation under u-boot Signed-off-by: Andy Fleming <afleming@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org> Acked-by: Detlev Zundel <dzu@denx.de>
2011-04-20Remove instances of phy_read/writeAndy Fleming
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>
2011-04-20tsec: arrange the code to avoid useless function declarationMingkai Hu
This is merely a rearrangement. No changes to the code, except to remove now-useless declarations. Signed-off-by: Mingkai Hu <Mingkai.hu@freescale.com> Acked-by: Andy Fleming <afleming@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org> Acked-by: Detlev Zundel <dzu@denx.de>
2011-04-20tsec: use IO accessors for IO accessesMingkai Hu
Signed-off-by: Mingkai Hu <Mingkai.hu@freescale.com> Acked-by: Andy Fleming <afleming@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org> Acked-by: Detlev Zundel <dzu@denx.de>
2011-04-12Fix misc spelling errors found by lintianLoïc Minier
Signed-off-by: Loïc Minier <loic.minier@linaro.org>
2011-04-11Net: Add Intel E1000 82574L PCIe card supportRoy Zang
Add Intel E1000 82574L PCIe card support. Test on MPC8544DS and MPC8572 board. Add the missing contact information for future support. Signed-off-by: Roy Zang <tie-fei.zang@freescale.com> Acked-by: Kumar Gala <galak@kernel.crashing.org>
2011-04-11ea20: fix undefined PHY_* errorsBen Gardiner
This patch fixes ea20 after 8ef583a0351590a91394499eb5ca2ab8a703d959 where the u-boot custom PHY_ macros were replaced with those of linux/mii.h MII_ definitions except in the RMII support for davinci_emac. Probably also due to the merge path of changes in 2010.12. Signed-off-by: Ben Gardiner<bengardiner@nanometrics.ca> CC: Mike Frysinger <vapier@gentoo.org> Acked-by: Mike Frysinger <vapier@gentoo.org>
2011-04-04tsec: add AR8021 PHY supportLi Yang
Signed-off-by: Li Yang <leoli@freescale.com>
2011-03-21net: ftmac100: update get_timer() usagesPo-Yu Chuang
Use get_timer() the same way as drivers/net/ftgmac100.c Signed-off-by: Po-Yu Chuang <ratbert@faraday-tech.com> Reviewed-by: Macpaul Lin <macpaul@gmail.com> Tested-by: Macpaul Lin <macpaul@gmail.com>
2011-03-21net: ftmac100: remove unnecessary volatilesPo-Yu Chuang
Signed-off-by: Po-Yu Chuang <ratbert@faraday-tech.com> Reviewed-by: Macpaul Lin <macpaul@gmail.com> Tested-by: Macpaul Lin <macpaul@gmail.com>
2011-03-16net: sh_eth: add support for SH7757's ETHERYoshihiro Shimoda
SH7757 has ETHER and GETHER. This patch supports EHTER only. Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
2011-02-15net: ne2000: Add spport RTL-8019ASNobuhiro Iwamatsu
Add infomation of RTL-8016AS to hw_info. Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org> CC: Ben Warren <biggerbadderben@gmail.com>
2011-02-04Merge branch 'master' of git://git.denx.de/u-boot-shWolfgang Denk
2011-02-02net: sh_eth: add cache handlingYoshihiro Shimoda
Some CPU needs cache handling. So this patch add the config of CONFIG_SH_ETHER_CACHE_WRITEBACK, and it calls wback function. Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
2011-02-02DaVinci DM6467: Added ET1011C (LSI) PHY supportSandeep Paulraj
Added arch/arm/cpu/arm926ejs/davinci/et1011c.c for handling ET1011C gigabit phy. which overrides get_link_speed function from default implementation. This enables output of 125 MHz reference clock on SYS_CLK pin. Signed-off-by: Prakash PM <prakash.pm@ti.com> Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
2011-02-02DaVinci EMAC: Add name to Ethernet deviceSandeep Paulraj
Adds "DaVinci-EMAC" as the name of the device so that it gets printed as "Using DaVinci-EMAC device" during network access (dhcp, tftp) instead of empty name in "Using" statement.This name also gets reflected in 'ethact' env variable. Signed-off-by: Hemant Pedanekar <hemantp@ti.com> Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
2011-02-02DaVinci EMAC: Fix davinci_eth_gigabit_enableSandeep Paulraj
Enabling the gigabit was overwriting the previous configuration by setting up only GIGAFORCE and GIG bits of MAC control register. Modified to retain previous configuration while gigabit enabling. Signed-off-by: Prakash PM <prakash.pm@ti.com> Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
2011-02-02fec_mxc: add support for MX53 processorLiu Hui-R64343
This patch add FEC support for Freescale MX53 processor Signed-off-by: Jason Liu <r64343@freescale.com>
2011-01-18NET: lan91c96: Correct chip detect logicYanjun Yang
The lan91c96_detect_chip routine is not correct according to the manual. Signed-off-by: YanJun Yang <yangyj.ee@gmail.com>
2011-01-10LAN91C*: Change chip names to fit the eth_device struct sizeYanjun Yang
The eth_device.name field length is limited by NAMESIZE, which is 16 defined in include/net.h. Unfortunately, two of the names in lan91c96.c are beyond that. Signed-off-by: YanJun Yang <yangyj.ee@gmail.com>
2011-01-09ftgmac100: support of gigabit eth ftgmac100Macpaul Lin
Add Faraday's ftgmac100 (gigabit ethernet) MAC controller's driver. Signed-off-by: Macpaul Lin <macpaul@andestech.com>
2011-01-09miiphy: convert to linux/mii.hMike Frysinger
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>
2010-12-16Merge branch 'master' of ../master into nextWolfgang Denk
2010-12-13tsec: Revert to setting TBICR_ANEG_ENABLE by default for SGMIIKumar Gala
The following commit: commit 46e91674fb4b6d06c6a4984c0b5ac7d9a16923f4 Author: Peter Tyser <ptyser@xes-inc.com> Date: Tue Nov 3 17:52:07 2009 -0600 tsec: Force TBI PHY to 1000Mbps full duplex in SGMII mode Removed setting Auto-Neg by default, however this is believed to be proper default configuration for initialization of the TBI interface. Instead we explicitly set CONFIG_TSEC_TBICR_SETTINGS for the XPedite5370 & XPedite5500 boards that use a Broadcomm PHY which require Auto-Neg to be disabled to function properly. This addresses a breakage on the P2020 DS & MPC8572 DS boards when used with an SGMII riser card. We also remove setting CONFIG_TSEC_TBICR_SETTINGS on the P1_P2_RDB family of boards as now the default setting is sufficient for them. Additionally, we clean up the code a bit to remove an unnecessary second define. Signed-off-by: Kumar Gala <galak@kernel.crashing.org> Acked-by: Peter Tyser <ptyser@xes-inc.com> Tested-by: Peter Tyser <ptyser@xes-inc.com>
2010-12-09Merge branch 'master' of git://git.denx.de/u-boot-imxWolfgang Denk
2010-11-30da850: Add RMII support for EMACSudhakar Rajashekhara
This patch is a port of the work by Sudhakar Rajeshekhara in commit ab3effbcad8851cc65dc5241a01c064d2030a3b2 of git://arago-project.org/git/people/sandeep/u-boot-davinci.git. The da850 UI board has on it an RMII PHY which can be used if the MDC line to the MII PHY on the baseboard is disabled and the RMII PHY is enabled by configuring the values of some GPIO pins on the IO expander of the UI board. This patch implements disabling that line via GPIO2[6], configuring the UI board's IO expander and setting only the pinmux settings that are needed for RMII operation. Tested on da850evm by adding a define for CONFIG_DRIVER_TI_EMAC_USE_RMII. Signed-off-by: Sudhakar Rajashekhara <sudhakar.raj@ti.com> Signed-off-by: Ben Gardiner <bengardiner@nanometrics.ca> CC: Sandeep Paulraj <s-paulraj@ti.com> CC: Ben Warren <biggerbadderben@gmail.com> CC: Mike Frysinger <vapier@gentoo.org> CC: Sughosh Ganu <urwithsughosh@gmail.com> Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com>
2010-11-27824x: Cleanup for partial linking and --gc-sectionsWolfgang Denk
Signed-off-by: Wolfgang Denk <wd@denx.de> Acked-by: Stefan Roese <sr@denx.de>
2010-11-26e1000: fix compile warningWolfgang Denk
Get rid of compiler warning: e1000.c: In function 'e1000_transmit': e1000.c:5028: warning: passing argument 1 of 'virt_to_phys' discards qualifiers from pointer target type Signed-off-by: Wolfgang Denk <wd@denx.de> Acked-by: Stefan Roese <sr@denx.de>
2010-11-21imx: Get fec mac address from fuseLiu Hui-R64343
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>
2010-11-18GRETH: removed space in network driver device name.Daniel Hellstrom
Signed-off-by: Daniel Hellstrom <daniel@gaisler.com>
2010-11-18GRETH: fixed 2 decriptor table typosDaniel Hellstrom
Signed-off-by: Daniel Hellstrom <daniel@gaisler.com>
2010-11-18GRETH: Added extra RESET, this is needed if GRETH was stopped during an ↵Daniel Hellstrom
ethernet frame reception. Signed-off-by: Daniel Hellstrom <daniel@gaisler.com>
2010-11-18GRETH: Added autodetection of PHY address, or let BSP hardcode it.Daniel Hellstrom
Signed-off-by: Daniel Hellstrom <daniel@gaisler.com>
2010-11-18GRETH: made debug printouts use common debug() macro.Daniel Hellstrom
Signed-off-by: Daniel Hellstrom <daniel@gaisler.com>
2010-11-18GRETH: removed unneccesary register write and one clean up.Daniel Hellstrom
Signed-off-by: Daniel Hellstrom <daniel@gaisler.com>
2010-11-17net: e1000: typo using wrong argument to sizeofMatthew McClintock
Typo from 4b29bdb0ed08412d225a8be94f61fc6c37a59dd5 Signed-off-by: Matthew McClintock <msm@freescale.com>
2010-11-17Switch from archive libraries to partial linkingSebastien Carlier
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>
2010-11-14net: e1000: Add initialized eth_device & e1000_hw structureKumar Gala
nic and hw structures are allocated via malloc i.e. return memory is not zero initialized. Because of this few structure member like "function pointers" are initialized with garbage values. It may cause problem. for eg. during eth_initialize, dev->write_hwaddr is used. Signed-off-by: Kumar Gala <galak@kernel.crashing.org> Fixed typo. Signed-off-by: Wolfgang Denk <wd@denx.de>
2010-11-14net: uli526x: Add initialized eth_device structureNobuhiro Iwamatsu
uli526x driver does not have write_hwaddr function. However, eth stuff executes write_hwaddr function because eth_device structure has not been initialized. Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org> CC: Ben Warren <biggerbadderben@gmail.com>