summaryrefslogtreecommitdiffstats
path: root/drivers/net
Commit message (Collapse)AuthorAgeFilesLines
* net: e1000: correct function signature of set_ethaddrLucas Stach2015-09-091-1/+1
| | | | | Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/ppc'Sascha Hauer2015-08-061-1/+1
|\
| * PPC/MPC52xx: unify header file name for clock APIJuergen Borleis2015-08-031-1/+1
| | | | | | | | | | | | | | | | In preparation to re-use the i.MX I2C driver for the MPC5200 SoC use clock.h instead of clocks.h for the clock API. Signed-off-by: Juergen Borleis <jbe@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/net'Sascha Hauer2015-08-062-35/+4
|\ \ | |/ |/|
| * net: phy: at803x: Use genphy_config_initSascha Hauer2015-07-292-35/+4
| | | | | | | | | | | | | | | | Based on the Linux commit: 6ff01db net: phy: at803x: use genphy_config_init() Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | net: enc28j60: fix set mac function signatureLucas Stach2015-07-291-1/+1
|/ | | | | | | | | | Fixes: drivers/net/enc28j60.c: In function 'enc28j60_probe': drivers/net/enc28j60.c:947:20: warning: assignment from incompatible pointer type edev->set_ethaddr = enc28j60_set_ethaddr; Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* net: smc911x: Add device tree supportSascha Hauer2015-06-261-0/+6
| | | | | | | There should probably be more compatible entries, but this is what the kernel driver matches for. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* net: Make set_ethaddr argument constSascha Hauer2015-06-2627-27/+27
| | | | | | | The set_ethaddr callback should not modify the MAC address passed to it, so make it const. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/mips'Sascha Hauer2015-06-091-18/+120
|\
| * net: dm9k: fix reset routineAntony Pavlov2015-05-121-2/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Based on Linux's commit: commit 09ee9f87d02e779e4fc3f5c29212c733d6d6e349 Author: Michael Abbott <michael.abbott@diamond.ac.uk> Date: Wed Oct 16 11:41:33 2013 +0300 dm9000: Implement full reset of DM9000 network device A Davicom application note for the DM9000 network device recommends performing software reset twice to correctly initialise the device. Without this reset some devices fail to initialise correctly on system startup. N.B. DM9000B on MIPS Creator CI20 board needs additional workaround (see the 'Make all GPIO pins outputs' and 'Power internal PHY' lines). This workaround was taken from this U-boot's commit: commit fbcb7ece0ea1e364180f1cf963e0fa0ce7f6560d Author: Remy Bohmer <linux@bohmer.net> Date: Tue Jun 3 15:26:24 2008 +0200 DM9000: Improve eth_reset() routine According to the application notes of the DM9000 v1.22 chapter 5.2 bullet 2, the reset procedure must be done twice to properly reset the DM9000 by means of software. This errata is not needed anymore for the DM9000A, but it does not bother it. This change has been tested with DM9000A, DM9000E, DM9000EP. Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * net: dm9k: add device tree supportAntony Pavlov2015-05-121-16/+87
| | | | | | | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * net: dm9k: show only one phy on miibusAntony Pavlov2015-05-121-0/+10
| | | | | | | | | | Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'pu/am335x'Sascha Hauer2015-05-282-5/+50
|\ \ | |/ |/|
| * net: cpsw: unregister device on remove callbackSascha Hauer2015-04-281-5/+39
| | | | | | | | | | | | | | | | | | | | The CPSW uses DMA, so we should quiesce the device before leaving barebox. This patch unregisters the CPSW properly on the device remove callback. To do this we have to fix the error path in cpsw_slave_setup, since this function can fail and we need a known slave status in the remove function. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * net: phy: Add missing phy_unregister_deviceSascha Hauer2015-04-281-0/+11
| | | | | | | | | | | | The counterpart of phy_register_device is missing. Add it. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/of-device-id'Sascha Hauer2015-05-062-8/+8
|\ \
| * | of: use 'const void *' for struct of_device_id.dataAntony Pavlov2015-04-302-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since 2011 barebox' of_device_id struct uses unsigned long type for data field: struct of_device_id { char *compatible; unsigned long data; }; Almost always struct of_device_id.data field are used as pointer and need 'unsigned long' casting. E.g. see 'git grep -A 4 of_device_id drivers/' output: drivers/ata/sata-imx.c:static __maybe_unused struct of_device_id imx_sata_dt_ids[] = { drivers/ata/sata-imx.c- { drivers/ata/sata-imx.c- .compatible = "fsl,imx6q-ahci", drivers/ata/sata-imx.c- .data = (unsigned long)&data_imx6, drivers/ata/sata-imx.c- }, { Here is of_device_id struct in linux kernel v4.0: struct of_device_id { char name[32]; char type[32]; char compatible[128]; const void *data; }; Changing of_device_id.data type to 'const void *data' will increase barebox' linux kernel compatibility and decrease number of 'unsigned long' casts. Part of the patch was done using the 'coccinelle' tool with the following semantic patch: @rule1@ identifier dev; identifier type; identifier func; @@ func(...) { <... - dev_get_drvdata(dev, (unsigned long *)&type) + dev_get_drvdata(dev, (const void **)&type) ...> } @rule2@ identifier dev; identifier type; identifier func; identifier data; @@ func(...) { <... - dev_get_drvdata(dev, (unsigned long *)&type->data) + dev_get_drvdata(dev, (const void **)&type->data) ...> } Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/mvebu'Sascha Hauer2015-05-061-0/+31
|\ \ \
| * | | net: phy: Support Marvell 88E1318S PHYSebastian Hesselbarth2015-04-271-0/+31
| | |/ | |/| | | | | | | | | | | | | | | | This adds support for the Marvell 88E1318S Gigabit Ethernet PHY. Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | Merge branch 'for-next/misc'Sascha Hauer2015-05-062-1/+8
|\ \ \
| * | | net: fec: Fix RGMII-IDMarkus Pargmann2015-05-011-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | RGMII-ID just defines transmitter internal delays. Otherwise it is the same as RGMII. As the differences only influence the behaviour of the phy, the fec driver should handle it the same way as RGMII. Signed-off-by: Markus Pargmann <mpa@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * | | net: usb: asix: Add D-link DUB-E100 H/W Ver C1 supportMayur Nande2015-04-281-0/+4
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Hello! This patch adds support for USB ethernet adapter D-Link DUB-E100 H/W Rev C1. I tested this on Beagleboneblack Rev A6A and our custom h/w based on i.mx6 Phytec phycore module. More information about the adapter is here: http://us.dlink.com/products/connect/high-speed-usb-2-0-fast-ethernet-adapter/ Signed-off-by: Mayur Nande <mayur.nande@medel.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | / net: phy: Do not double remove phy deviceSascha Hauer2015-05-051-0/+2
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes: 80264a8 driver: Call bus->remove instead of driver->remove On mvebu it happens that: Upon device shutdown, when iterating through the active device list, the phy0 device is removed before mdio-mvebu. Then, when the mdio bus device is removed, the phy0 device is removed again, here: mdio_bus_remove(on mdio-mvebu) mvebu_mdio_remove mdiobus_unregister unregister_device mdio_bus_remove(on phy0) Fix this by setting the mdio busses phy_map[phy->addr] to NULL when unregistering the phy device, so that mdiobus_unregister no longer finds a valid phy_device when iterating over the busses device list. Reported-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Tested-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
* | net: e1000: add HAS_DMA dependencyAntony Pavlov2015-04-281-0/+1
|/ | | | | | | | | | | | | | | | | The e1000 driver uses the dma coherent functions and thus can only be build for architectures implementing them. Here is mips malta build error log: drivers/built-in.o: In function `e1000_transmit': drivers/net/e1000.c:(.text.e1000_transmit+0x80): undefined reference to `dma_sync_single_for_device' drivers/built-in.o: In function `e1000_poll': drivers/net/e1000.c:(.text.e1000_poll+0x60): undefined reference to `dma_sync_single_for_cpu' Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/pxa'Sascha Hauer2015-04-131-0/+29
|\
| * net: smc1111: add a quirk for pxa pxa27x platformsRobert Jarzmik2015-04-131-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | As hinted in the linux kernel driver, pxa platforms such as mainstone, stargate and idp have a broken design, where half-word writes not aligned to a word address are not working. This patch is a taking back the half-word write accessor for this specific case from the linux kernel. Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/net'Sascha Hauer2015-04-134-0/+6557
|\ \ | |/ |/|
| * net: Add Intel e1000 driverSascha Hauer2015-04-034-0/+6557
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds the Intel e1000 driver from U-Boot. The driver looks in parts quite similar to the kernel driver, I don't know whether one is derived from the other or if they both just have the same origin. Many coding style related issues are fixed, the code is simplified in several places. All features of the original driver should still be there, only fiber support is disabled since it's quite unlikely that this is used in barebox. The driver has been tested with the i.MX6 PCIe driver and a I210 e1000 device (0x8086:0x1533) Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | net: smc1111: fix platform data initializationsRobert Jarzmik2015-04-131-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | The configuration and control setup introduced in commit "extend the driver for 91c94 and 91c96 support" suffers from a typo defect, which makes the commit broken. The typo happens to be in barebox tree, while it's not in the tested patches I had, and there was a mismatch in my former submission, which is fixed by this patch. Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | net: mvneta: Fix transmit errors due to dirty txdescSebastian Hesselbarth2015-04-131-1/+1
|/ | | | | | | | | | | | Marvell Neta's transmit descriptor (txdesc) is allocated by dma_alloc_coherent() but not zeroed before calling mvneta_send the first time. This can cause spurious transmit errors due to improperly set bits in txdesc's cmd_sts field. Fix initial transmit errors by always writing whole cmd_sts field instead of ORing the bits. Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* net: mvneta: convert to streaming DMA opsLucas Stach2015-03-161-4/+7
| | | | | | | | | Move to the common streaming DMA ops in order to get rid of the direct usage of the ARM MMU functions for the cache maintenance. Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/streaming-dma'Sascha Hauer2015-03-0914-78/+133
|\ | | | | | | | | Conflicts: drivers/mci/dw_mmc.c
| * net: xgmac: convert to streaming DMA opsLucas Stach2015-03-061-3/+8
| | | | | | | | | | | | | | | | | | Move to the common streaming DMA ops in order to get rid of the direct usage of the ARM MMU functions for the cache maintenance. Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * net: rtl8169: convert to streaming DMA opsLucas Stach2015-03-062-17/+14
| | | | | | | | | | | | | | | | | | Move to the common streaming DMA ops in order to get rid of the direct usage of the ARM MMU functions for the cache maintenance. Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * net: orion-gbe: convert to streaming DMA opsLucas Stach2015-03-061-5/+8
| | | | | | | | | | | | | | | | | | Move to the common streaming DMA ops in order to get rid of the direct usage of the ARM MMU functions for the cache maintenance. Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * net: macb: convert to streaming DMA opsLucas Stach2015-03-061-2/+6
| | | | | | | | | | | | | | | | | | Move to the common streaming DMA ops in order to get rid of the direct usage of the ARM MMU functions for the cache maintenance. Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * net: fec: convert to streaming DMA opsLucas Stach2015-03-061-4/+9
| | | | | | | | | | | | | | | | | | Move to the common streaming DMA ops in order to get rid of the direct usage of the ARM MMU functions for the cache maintenance. Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * net: designware: convert to streaming DMA opsLucas Stach2015-03-061-8/+11
| | | | | | | | | | | | | | | | | | Move to the common streaming DMA ops in order to get rid of the direct usage of the ARM MMU functions for the cache maintenance. Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * net: davinci_emac: convert to streaming DMA opsLucas Stach2015-03-061-4/+5
| | | | | | | | | | | | | | | | | | Move to the common streaming DMA ops in order to get rid of the direct usage of the ARM MMU functions for the cache maintenance. Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * net: at91_ether: convert to streaming DMA opsLucas Stach2015-03-061-2/+8
| | | | | | | | | | | | | | | | | | Move to the common streaming DMA ops in order to get rid of the direct usage of the ARM MMU functions for the cache maintenance. Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * net: cpsw: convert to streaming DMA opsLucas Stach2015-03-061-5/+7
| | | | | | | | | | | | | | | | | | Move to the common streaming DMA ops in order to get rid of the direct usage of the ARM MMU functions for the cache maintenance. Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * net: arc-emac: convert to streaming DMA opsLucas Stach2015-03-061-6/+10
| | | | | | | | | | | | | | | | | | Move to the common streaming DMA ops in order to get rid of the direct usage of the ARM MMU functions for the cache maintenance. Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * ARM: move DMA alloc functions to dma.hLucas Stach2015-03-0611-0/+11
| | | | | | | | | | | | | | | | | | | | This better separates the DMA from the MMU functionality. Also move all drivers that only depends on asm/mmu.h for the alloc functions over to the common header. Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * ARM: change dma_alloc/free_coherent to match other architecturesLucas Stach2015-03-069-21/+35
| | | | | | | | | | | | | | | | | | As a lot drivers currently rely on the 1:1 virt->phys mapping on ARM we define DMA_ADDRESS_BROKEN to mark them. In order to use them on other architectures with a different mapping they need proper fixing. Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * NIOS2: use dma_addr_t in dma_alloc_coherentLucas Stach2015-03-061-1/+1
| | | | | | | | | | | | | | | | | | This allows to consolidate the prototype of this function across architectures. Also guard against calles that pass in NULL as the dma handle pointer. Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/rockchip'Sascha Hauer2015-03-091-7/+17
|\ \ | | | | | | | | | | | | Conflicts: arch/arm/Kconfig
| * | NET: arc_emac: Update for newer DTS, support for Rockchip .compatibleAndrey Panov2015-03-051-7/+17
| |/ | | | | | | | | Signed-off-by: Andrey Panov <rockford@yandex.ru> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/misc'Sascha Hauer2015-03-091-0/+3
|\ \ | |/ |/|
| * net: designware: don't depend on CONFIG_OFTREELucas Stach2015-03-021-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | This driver is written in a way that is should also work without DT, but it had a compile time dependency on CONFIG_OFTREE. Fixes: drivers/built-in.o: In function `dwc_probe_dt': drivers/net/designware.c:413: undefined reference to `of_get_phy_mode' Signed-off-by: Lucas Stach <dev@lynxeye.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | net: cpsw: prevent stray cache writebackLucas Stach2015-03-031-0/+1
| | | | | | | | | | | | | | | | | | | | The cache should be invalidated when transfering ownership of a buffer to the device. Otherwise the writeback of dirty cache lines can corrupt the hardware written data. Signed-off-by: Lucas Stach <l.stach@pengutronix.de> Tested-by: Jan Weitzel <j.weitzel@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>