summaryrefslogtreecommitdiffstats
path: root/drivers/net
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'next' of git://git.denx.de/u-bootWolfgang Denk2012-07-3010-248/+361
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 'next' of git://git.denx.de/u-boot: MPC8xx: Fixup warning in arch/powerpc/cpu/mpc8xx/cpu.c doc: cleanup - move board READMEs into respective board directories net: sh_eth: add support for SH7757's GETHER net: sh_eth: modify the definitions of regsiter net: sh_eth: add SH_ETH_TYPE_ condition net: sh_eth: clean up for the SH7757's code net: fec_mxc: Fix MDC for xMII net: fec_mxc: Fix setting of RCR for xMII net: nfs: make NFS_TIMEOUT configurable net: Inline the new eth_setenv_enetaddr_by_index function net: allow setting env enetaddr from net device setting net/designware: Consecutive writes to the same register to be avoided CACHE: net: asix: Fix asix driver to work with data cache on net: phy: micrel: make ksz9021 phy accessible net: abort network initialization if the PHY driver fails phylib: phy_startup() should return an error code on failure net: tftp: fix type of block arg to store_block Signed-off-by: Wolfgang Denk <wd@denx.de>
| * net: sh_eth: add support for SH7757's GETHERYoshihiro Shimoda2012-07-231-0/+9
| | | | | | | | | | | | | | | | | | SH7757 has 2 ETHERs and 2 GETHERs. This patch supports the SH7757's GETHER. If CONFIG_SH_ETHER_USE_GETHER is defined using SH7757, the driver handles the GETHER. Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Acked-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
| * net: sh_eth: modify the definitions of regsiterYoshihiro Shimoda2012-07-232-181/+258
| | | | | | | | | | | | | | | | | | The previous code had many similar definitions in each CPU. This patch borrows from the sh_eth driver of Linux kernel. Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Acked-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
| * net: sh_eth: add SH_ETH_TYPE_ conditionYoshihiro Shimoda2012-07-232-33/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | At the moment, the driver supports the following CPUs: - GETHER (Gigabit Ethernet) : SH7763, SH7734 - ETHER (Fast Ethernet) : SH7724, SH7757 And the driver had the following "#if": #if defined(CONFIG_CPU_SH7763) || defined(CONFIG_CPU_SH7734) #if !defined(CONFIG_CPU_SH7757) && !defined(CONFIG_CPU_SH7724) - Those are for GETHER #if defined(CONFIG_CPU_SH7724) || defined(CONFIG_CPU_SH7757) - This is for ETHER So, for clean up the code, this patch adds SH_ETH_TYPE_GETHER and SH_ETH_TYPE_ETHER. And then, the patch modifies the above "#if". Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Acked-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
| * net: sh_eth: clean up for the SH7757's codeYoshihiro Shimoda2012-07-232-20/+3
| | | | | | | | | | | | | | | | The SH7757's ETHER can work using the SH7724's setting. So, the patch modifies it. Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Acked-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
| * net: fec_mxc: Fix MDC for xMIIbenoit.thebaudeau@advans2012-07-191-1/+1
| | | | | | | | | | | | | | | | | | The MDC signal is available on all xMII (i.e. 'not 7-wire') interfaces, so mii_speed has to be set for all these interfaces, and not only for MII. Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com> Cc: Joe Hershberger <joe.hershberger@gmail.com> Cc: Stefano Babic <sbabic@denx.de>
| * net: fec_mxc: Fix setting of RCR for xMIIbenoit.thebaudeau@advans2012-07-191-5/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | At least on i.MX25, the RMII mode did not work, which is fixed by this patch. The MII_MODE bit of the FEC RCR register means xMII, i.e. 'not 7-wire', so set it accordingly. According to the xMII and 7-wire (aka GPSI) standards, full duplex should be available on xMII, but not on 7-wire, so set FCE accordingly. The FEC may support full duplex for 7-wire too, but the reference manual does not say that, so avoid an invalid assumption. Actually, the choice between half and full duplex also depends on the endpoint/switch/repeater configuration, so a config option could be added for that, but there has been no need for it so far. Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com> Cc: Joe Hershberger <joe.hershberger@gmail.com> Cc: Stefano Babic <sbabic@denx.de>
| * Merge branch 'next' of git://git.denx.de/u-boot-net into nextWolfgang Denk2012-07-129-11/+58
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 'next' of git://git.denx.de/u-boot-net: net: Inline the new eth_setenv_enetaddr_by_index function net: allow setting env enetaddr from net device setting net/designware: Consecutive writes to the same register to be avoided CACHE: net: asix: Fix asix driver to work with data cache on net: phy: micrel: make ksz9021 phy accessible net: abort network initialization if the PHY driver fails phylib: phy_startup() should return an error code on failure net: tftp: fix type of block arg to store_block Signed-off-by: Wolfgang Denk <wd@denx.de>
| | * net/designware: Consecutive writes to the same register to be avoidedDinh Nguyen2012-07-111-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit is an add-on to f6c4191f. There are a few registers where consecutive writes to the same location should be avoided or have a delay. According to Synopsys, here is a list of the registers and bit(s) where consecutive writes should be avoided or a delay is required: DMA Registers: Register 0 Bit 7 Register 6 All bits except for 24, 16-13, 2-1. GMAC Registers: Registers 0-3 All bits Registers 6-7 All bits Register 10 All bits Register 11 All bits except for 5-6. Registers 16-47 All bits Register 48 All bits except for 18-16, 14. Register 448 Bit 4. Register 459 Bits 0-3. Signed-off-by: Dinh Nguyen <dinguyen@altera.com> Reviewed-by: Matthew Gerlach <mgerlach@altera.com> Acked-by: Amit Virdi <amit.virdi@st.com>
| | * net: phy: micrel: make ksz9021 phy accessibleTroy Kisky2012-07-111-2/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Micrel accidentally used the same part number for the KS8721 and KSZ9021. So, both cannot be in the same build of u-boot. Add a config option to handle this. Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com> Acked-by: Vladimir Zapolskiy <vz@mleia.com>
| | * net: abort network initialization if the PHY driver failsTimur Tabi2012-07-116-6/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that phy_startup() can return an actual error code, check for that error code and abort network initialization if the PHY fails. Signed-off-by: Timur Tabi <timur@freescale.com> Acked-by: Nobuhiro Iwamamatsu <nobuhiro.iwamatsu.yj@renesas.com> (sh_eth part) Acked-by: Stephan Linz <linz@li-pro.net> (Xilinx part, xilinx_axi_emac and xilinx_ll_temac) Reviewed-by: Marek Vasut <marex@denx.de> (FEC part)
| | * phylib: phy_startup() should return an error code on failureTimur Tabi2012-07-111-1/+4
| | | | | | | | | | | | | | | | | | | | | phy_startup() calls the PHY driver's startup function, but it ignores the return code from that function, and so it never returns any failures. Signed-off-by: Timur Tabi <timur@freescale.com>
* | | Blackfin: bfin_mac: drop volatile markings on packet buffersMike Frysinger2012-07-191-2/+1
|/ / | | | | | | | | | | | | | | | | | | Now that common code doesn't declare these as volatile, we don't need to either anymore. This fixes the build warning: bfin_mac.c: In function 'bfin_EMAC_recv': bfin_mac.c:193:23: warning: assignment discards qualifiers from pointer target type Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* | net/sh-ether: Fix build by removing ECSIPR_BRCRXIP and otherNobuhiro Iwamatsu2012-07-101-4/+3
|/ | | | | | | | When support sh7734 of sh-ether, ECSIPR_BRCRXIP and other were removed. Therefore SH7757 and SH7724 can not build. This revise this probelem. Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org> Tested-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
* net: Multiple updates/enhancements to designware.cStefan Roese2012-07-072-69/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds the following changes to designware ethernet driver found on the ST SPEAr SoC: - Don't init MAC & PHY upon startup. This causes a delay, waiting for the auto negotiation to complete. And we don't want this delay to always happen. Especially not on platforms where ethernet is not used at all (e.g. booting via flash). Instead postpone the MAC / PHY configuration to the stage, where ethernet is first used. - Add possibility for board specific PHY init code. This is needed for example on the X600 board, where the Vitesse PHY needs to be configured for GMII mode. This board specific PHY init is done via the function designware_board_phy_init(). And this driver now adds a weak default which can be overridden by board code. - Use common functions miiphy_speed() & miiphy_duplex() to read link status from PHY. - Print status and progress of auto negotiation. - Print link status (speed, dupex) upon first usage. Signed-off-by: Stefan Roese <sr@denx.de> Cc: Amit Virdi <amit.virdi@st.com> Cc: Vipin Kumar <vipin.kumar@st.com> Cc: Joe Hershberger <joe.hershberger@gmail.com> Acked-by: Joe Hershberger <joe.hershberger@gmail.com>
* SPEAr: Add interface information in initializationVipin Kumar2012-07-072-1/+10
| | | | | | | | | | Few Designware peripheral registers need to be modified based on the ethernet interface selected by the board. This patch supports interface information in ethernet driver Signed-off-by: Vipin Kumar <vipin.kumar@st.com> Signed-off-by: Amit Virdi <amit.virdi@st.com> Signed-off-by: Stefan Roese <sr@denx.de>
* da850/omap-l138: Enable auto negotiation in RMII modeRajashekhara, Sudhakar2012-07-071-0/+8
| | | | | | | | | | | | On DA850/OMAP-L138 it was observed that in RMII mode, auto negotiation was not performed. This patch enables auto negotiation in RMII mode. Without this patch, EMAC initialization takes more time and sometimes tftp fails in RMII mode. Signed-off-by: Rajashekhara, Sudhakar <sudhakar.raj@ti.com> Signed-off-by: Lad, Prabhakar <prabhakar.lad@ti.com> Signed-off-by: Hadli, Manjunath <manjunath.hadli@ti.com>
* net: sh-eth: Add support Gigabit of SH7734Nobuhiro Iwamatsu2012-05-232-1/+11
| | | | | | | SH7734 support GMII. This add register infomation and the function which enable GMII. Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
* net: sh_eth: Add support SH7734 Ethernet deviceNobuhiro Iwamatsu2012-05-232-28/+74
| | | | | | | | SH7734 has one channel ethernet device. This support 10/100/1000Base, and RMII/MII/GMII. And this has the same structure as SH7763. Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
* net: Allow filtering on debug traces in the net subsystemJoe Hershberger2012-05-231-0/+4
| | | | | | | | | | | | Add several levels of DEBUG prints so that you can limit the noise to the severety of your problem. DEBUG_LL_STATE = Link local state machine changes DEBUG_DEV_PKT = Packets or info directed to the device DEBUG_NET_PKT = Packets on info on the network at large DEBUG_INT_STATE = Internal network state changes Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
* net: Make sure NetLoop is initialized when using NetConsoleJoe Hershberger2012-05-231-0/+6
| | | | | | | Fix NetConsole bug that causes first packet header to claim a source IP address of 0.0.0.0 Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
* net: Refactor to separate the UDP handler from the ARP handlerJoe Hershberger2012-05-231-2/+2
| | | | | | | | | | | Call a built-in dummy if none is registered... don't require protocols to register a handler (eliminating dummies) NetConsole now uses the ARP handler when waiting on arp (instead of needing a #define hack in arp.c) Clear handlers at the end of net loop Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> Acked-by: Simon Glass <sjg@chromium.org>
* net: Refactor to protect access to the NetState variableJoe Hershberger2012-05-231-3/+3
| | | | | | | Changes to NetState now go through an accessor function called net_set_state() Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
* net: cosmetic: Un-typedef IP_tJoe Hershberger2012-05-231-2/+2
| | | | | | | | Rename IP header related things to IP_UDP. The existing definition of IP_t includes UDP header, so name it to accurately describe the structure. Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
* net: Fix remaining API interface breakageJoe Hershberger2012-05-2317-36/+26
| | | | | | | | | | | These are all the files which use the API incorrectly but did not get built using MAKEALL -a powerpc|arm. I have no compiler for them, but the remaining issues should be far less than without this patch. Any outstanding issues are left to the maintainers of boards that use these drivers. Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
* drivers/net/rtl8169.c: Fix compile warningJoe Hershberger2012-05-221-1/+1
| | | | | | | | Fix this: rtl8169.c: In function 'rtl8169_initialize': rtl8169.c:907:13: warning: assignment from incompatible pointer type Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
* drivers/net/pcnet.c: Fix compile warningJoe Hershberger2012-05-221-4/+2
| | | | | | | | Fix this: pcnet.c: In function 'pcnet_initialize': pcnet.c:224:13: warning: assignment from incompatible pointer type Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
* drivers/net/xilinx_axi_emac.c: Fix compile warningStephan Linz2012-05-221-1/+1
| | | | | | | | Fix this: xilinx_axi_emac.c: In function 'xilinx_axiemac_initialize': xilinx_axi_emac.c:646: warning: assignment from incompatible pointer type Signed-off-by: Stephan Linz <linz@li-pro.net>
* drivers/net/xilinx_emaclite.c: Fix compile warningStephan Linz2012-05-221-3/+3
| | | | | | | | Fix this: xilinx_emaclite.c: In function 'xilinx_emaclite_initialize': xilinx_emaclite.c:371: warning: assignment from incompatible pointer type Signed-off-by: Stephan Linz <linz@li-pro.net>
* drivers/net/xilinx_ll_temac.c: Fix compile warningStephan Linz2012-05-224-8/+4
| | | | | | | | | Fix this: xilinx_ll_temac.c: In function 'xilinx_ll_temac_initialize': xilinx_ll_temac.c:332: warning: assignment from incompatible pointer type xilinx_ll_temac.c:340: warning: assignment from incompatible pointer type Signed-off-by: Stephan Linz <linz@li-pro.net>
* drivers/net/uli526x.c: Fix compile warningJoe Hershberger2012-05-221-4/+2
| | | | | | | | Fix this: uli526x.c: In function 'uli526x_initialize': uli526x.c:243:13: warning: assignment from incompatible pointer type Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
* drivers/net/tsi108_eth.c: Fix compile warningJoe Hershberger2012-05-221-9/+5
| | | | | | | | | | Fix this: tsi108_eth.c: In function 'tsi108_eth_initialize': tsi108_eth.c:745:13: warning: assignment from incompatible pointer type tsi108_eth.c: In function 'tsi108_eth_recv': tsi108_eth.c:989:4: warning: passing argument 1 of 'NetReceive' discards qualifiers from pointer target type Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
* drivers/net/rtl8139.c: Fix compile warningJoe Hershberger2012-05-221-2/+2
| | | | | | | | Fix this: rtl8139.c: In function 'rtl8139_initialize': rtl8139.c:234:13: warning: assignment from incompatible pointer type Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
* drivers/net/ns8382x.c: Fix compile warningJoe Hershberger2012-05-221-4/+2
| | | | | | | | Fix this: ns8382x.c: In function 'ns8382x_initialize': ns8382x.c:352:13: warning: assignment from incompatible pointer type Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
* drivers/net/natsemi.c: Fix compile warningJoe Hershberger2012-05-221-4/+2
| | | | | | | | Fix this: natsemi.c: In function 'natsemi_initialize': natsemi.c:338:13: warning: assignment from incompatible pointer type Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
* drivers/net/fm/eth.c: Fix compile warningJoe Hershberger2012-05-221-1/+1
| | | | | | | | Fix this: eth.c: In function 'fm_eth_initialize': eth.c:651:12: warning: assignment from incompatible pointer type Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
* drivers/net/e1000.c: Fix compile warningJoe Hershberger2012-05-221-3/+2
| | | | | | | | Fix this: e1000.c: In function 'e1000_initialize': e1000.c:5264:13: warning: assignment from incompatible pointer type Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
* drivers/net/smc91111.c: Fix compile warningJoe Hershberger2012-05-221-2/+1
| | | | | | | | | Fix this: smc91111.c: In function 'smc91111_initialize': smc91111.c:1363:12: warning: assignment from incompatible pointer type Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> Cc: Joe Hershberger <joe.hershberger@gmail.com>
* drivers/net/macb.c: Fix compile warningJoe Hershberger2012-05-221-2/+1
| | | | | | | | | Fix this: macb.c: In function 'macb_eth_initialize': macb.c:564:15: warning: assignment from incompatible pointer type Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> Cc: Joe Hershberger <joe.hershberger@gmail.com>
* drivers/net/lan91c96.c: Fix compile warningJoe Hershberger2012-05-221-2/+2
| | | | | | | | | Fix this: lan91c96.c: In function 'lan91c96_initialize': lan91c96.c:811:12: warning: assignment from incompatible pointer type Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> Cc: Joe Hershberger <joe.hershberger@gmail.com>
* drivers/net/ks8695eth.c: Fix compile warningJoe Hershberger2012-05-221-2/+1
| | | | | | | | | Fix this: ks8695eth.c: In function 'ks8695_eth_initialize': ks8695eth.c:236:12: warning: assignment from incompatible pointer type Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> Cc: Joe Hershberger <joe.hershberger@gmail.com>
* drivers/net/ftmac100.c: Fix compile warningJoe Hershberger2012-05-221-2/+1
| | | | | | | | | Fix this: ftmac100.c: In function 'ftmac100_initialize': ftmac100.c:266:12: warning: assignment from incompatible pointer type Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> Cc: Joe Hershberger <joe.hershberger@gmail.com>
* drivers/net/fec_mxc.c: Fix compile warningJoe Hershberger2012-05-221-1/+1
| | | | | | | | | Fix this: fec_mxc.c: In function 'fec_probe': fec_mxc.c:926:13: warning: assignment from incompatible pointer type Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> Cc: Joe Hershberger <joe.hershberger@gmail.com>
* drivers/net/enc28j60.c: Fix compile warningJoe Hershberger2012-05-221-1/+1
| | | | | | | | | Fix this: enc28j60.c: In function 'enc28j60_initialize': enc28j60.c:967:12: warning: assignment from incompatible pointer type Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> Cc: Joe Hershberger <joe.hershberger@gmail.com>
* drivers/net/eepro100.c: Fix compile warningJoe Hershberger2012-05-221-4/+3
| | | | | | | | | | | | | | | Fix this: eepro100.c: In function 'eepro100_initialize': eepro100.c:464:13: warning: assignment from incompatible pointer type eepro100.c: In function 'eepro100_recv': eepro100.c:694:4: warning: passing argument 1 of 'NetReceive' discards qualifiers from pointer target type include/net.h:438:13: note: expected 'uchar *' but argument is of type 'volatile u8 *' The use of a descriptor like this may mean DMA will update this at will Beware this may be a source of trouble on some boards Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> Cc: Joe Hershberger <joe.hershberger@gmail.com>
* drivers/net/dnet.c: Fix compile warningJoe Hershberger2012-05-221-2/+1
| | | | | | | | | Fix this: dnet.c: In function 'dnet_eth_initialize': dnet.c:380:15: warning: assignment from incompatible pointer type Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> Cc: Joe Hershberger <joe.hershberger@gmail.com>
* drivers/net/dm9000x.c: Fix compile warningJoe Hershberger2012-05-221-2/+1
| | | | | | | | | Fix this: dm9000x.c: In function 'dm9000_initialize': dm9000x.c:636:12: warning: assignment from incompatible pointer type Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> Cc: Joe Hershberger <joe.hershberger@gmail.com>
* drivers/net/dc2114x.c: Fix compile warningJoe Hershberger2012-05-221-2/+2
| | | | | | | | | Fix this: dc2114x.c: In function 'dc21x4x_initialize': dc2114x.c:305:15: warning: assignment from incompatible pointer type Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> Cc: Joe Hershberger <joe.hershberger@gmail.com>
* drivers/net/cs8900.c: Fix compile warningJoe Hershberger2012-05-221-2/+1
| | | | | | | | | Fix this: cs8900.c: In function 'cs8900_initialize': cs8900.c:326:12: warning: assignment from incompatible pointer type Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> Cc Joe Hershberger <joe.hershberger@gmail.com>
* drivers/net/calxedaxgmac.c: Fix compile warningJoe Hershberger2012-05-221-3/+3
| | | | | | | | | | | | Fix this: calxedaxgmac.c: In function 'xgmac_rx': calxedaxgmac.c:479:2: warning: passing argument 1 of 'NetReceive' discards qualifiers from pointer target type include/net.h:438:13: note: expected 'uchar *' but argument is of type 'volatile unsigned char *' calxedaxgmac.c: In function 'calxedaxgmac_initialize': calxedaxgmac.c:547:12: warning: assignment from incompatible pointer type Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> Cc: Joe Hershberger <joe.hershberger@gmail.com>
OpenPOWER on IntegriCloud