9
0
Fork 0
Commit Graph

468 Commits

Author SHA1 Message Date
Sascha Hauer 874b8ac790 Merge branch 'for-next/net' 2014-07-04 17:27:11 +02:00
Antony Pavlov a7c925bf03 net: add RealTek RTL-8139 PCI Ethernet driver
This driver is based on Linux 2.6.39 8139too driver.

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-04 07:35:47 +02:00
Antony Pavlov 97bd0407b0 net: add ENC28J60 support
ENC28J60 is a stand-alone Ethernet controller with SPI Interface
and integrated 10BASE-T PHY.

This driver was ported from linux-3.15.

The most notable barebox driver version changes:
  * add device tree support;
  * drop netif_msg_*() debug level checking;
  * use IF_ENABLED for checking CONFIG_ENC28J60_WRITEVERIFY;
  * add mii_bus support.

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-07-02 07:47:58 +02:00
Sebastian Hesselbarth f38c708c2d net: phy: add support for Marvell PHY drivers
This adds initial support for Marvell PHY specific drivers. As a first
PHY, a driver for MV88E1121R is ported over from Linux.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-06-25 08:31:27 +02:00
Sebastian Hesselbarth 47fc75bc77 net: orion-gbe: extend RGMII detection to delayed modes
RGMII PHY modes include delayed interface modes RGMII_ID, RGMII_TXID,
and RGMII_RXID. Also check for those modes when setup RGMII mode in
port serial ctrl register.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-06-25 08:31:26 +02:00
Sebastian Hesselbarth 724876deab net: orion: generate unique port device names
Marvell Orion ethernet IP originally is multi-port capable, but SoCs
using the IP usually have multiple single-port controllers built in.
Currently, orion-gbe driver registers each port device with a constant
name, which causes a name conflict with multiple controller instances.

This patch uniquifies port device name generation by prepending
controller's base register address to resolve the name conflict.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-06-25 08:31:26 +02:00
Antony Pavlov 8e89bc594a treewide: remove address of the Free Software Foundation
The FSF address has changed; The FSF site says that
address is

  Free Software Foundation
  51 Franklin Street, Fifth Floor
  Boston, MA 02110-1301
  USA

(see http://www.fsf.org/about/contact/)

Instead of updating it each time the address changes,
just drop it completely treewide.

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-06-11 08:35:25 +02:00
Sascha Hauer 73339649ae Merge branch 'for-next/net-of-phy' 2014-06-04 21:03:49 +02:00
Sascha Hauer a3dfea9af8 Merge branch 'for-next/net'
Conflicts:
	drivers/net/dm9k.c
2014-06-04 21:03:45 +02:00
Sascha Hauer c3f5ce7308 net: phy: micrel: Add support for specifying pad skew values
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-05-23 15:40:52 +02:00
Sascha Hauer 54bbaafcbd net: phy: micrel: Add kwz9031 support
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-05-23 15:40:51 +02:00
Sascha Hauer 0955253ce1 net: fec_imx: Add devicetree support for mdio bus
The fec has a mdio bus. This adds support for a subnode
in which the phys on this bus can be specified.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-05-23 15:40:51 +02:00
Sascha Hauer 1607f679da net: phy: genphy: Make it work with of_set_phy_supported
phys start with features initialized from the phy driver
and are eventually limited by of_set_phy_supported. This
does not work with the genphy driver which starts with
no features and overwrites phydev->supported with the
values read from hardware in config_init. This overwrites
the features adjusted by of_set_phy_supported.
To fix this let the genphy driver start with full features
which are then only limited in config_init, but never
extended.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-05-23 15:40:51 +02:00
Sascha Hauer e2eb6e50f4 net: phy: genphy: always write MII_CTRL1000 when available
the phydev->supported field does not necessarily match the hardware
capabilities, it could be limited by the board to force the phy
to a lower speed. In this case make sure the gigabit advertise bits
are cleared on a gigabit phy.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-05-23 15:40:51 +02:00
Sascha Hauer 75635f6926 net: phy: remove now unused of_phy_device_connect
Since barebox handles phys from devicetree transparently we no longer
need of_phy_device_connect.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-05-23 15:40:51 +02:00
Sascha Hauer 7240f56d36 net: orion-gbe: use transparent-to-driver of mdio functions
barebox can transparently handle phys specified in the devicetree.
Use this functionality in the orion-gbe driver. This requires:

- add a device to the orion-gbe ports. This has the port device_node
  attached and is set as the parent of the ethernet device so that
  the ethernet code finds the correct device_node
- In the mdio-mvebu driver attach the device_node of the mdio device
  to the miibus device so that the phy code finds the correct node
- call phy_device_connect instead of of_phy_device_connect.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Tested-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
2014-05-23 15:40:34 +02:00
Sascha Hauer 4778c7da37 net: phy: Support limiting phy speed in the devicetree
Even when both the ethernet controller and the phy support certain
features a board may have additional limitations. Allow specifying
it in the devicetree.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-05-21 14:42:17 +02:00
Sascha Hauer d4d9fc125f net: fec_imx: check return value of registration functions
We do not care about releasing the resources in the error
path, but at least check the return value of eth_register
and mdiobus_register.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-05-21 14:40:56 +02:00
Sascha Hauer d4f202f30e net: fec_imx: mask mii register reads correctly
mii registers are 16bit wide, so mask out the higher bits.
The higher bits confuse mii-tool.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-05-21 14:40:52 +02:00
Sascha Hauer 9cbfe615f9 net: phy: Support finding a phy in the devicetree
When the ethernet device has a device_node then try finding
the associated phy via the phy-handle property.

This makes the phy handling via devicetree transparent to the
ethernet drivers.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-05-21 14:10:44 +02:00
Sascha Hauer 9b259eb3fd net: phy: register phys specified in devicetree
When a mdio bus has a device node attached then register the phys
specified there. This makes it possible to lookup the phys using
phandles later.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-05-21 14:10:39 +02:00
Sascha Hauer b90dc18054 net: phy: move setting of phy_map to phy_register_device
The phy_map should be valid once a phy_device is registered. This
allows registering phys outside of mdiobus_scan.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-05-21 14:10:35 +02:00
Sascha Hauer 3fcb734639 net: phy: factor out phy_device_attach function
phy_device_connect combines searching for a phy with actually attaching
it to the ethernet device. Factor out a phy_device_attach function to
have a function for each purpose. This makes the logic of phy_device_connect
simpler.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-05-21 14:10:29 +02:00
Beniamino Galvani 15b0abce26 net: arc_emac: disable interrupts
The driver doesn't use interrupts and Linux driver crashes when emac
interrupts are enabled at boot: keep them disabled.

Signed-off-by: Beniamino Galvani <b.galvani@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-05-20 07:44:42 +02:00
Beniamino Galvani b158af4f08 net: arc_emac: remove delay from mdio polling loop
Avoid unneeded delay when waiting for the completion of a mdio
operation and return as soon as possible.

Signed-off-by: Beniamino Galvani <b.galvani@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-05-20 07:44:41 +02:00
Michael Olbrich f104f55c04 net: dm9k: only read on packet for each call to dm9k_eth_rx()
Some users such as fs/nfs.c just save the pointer to the packet in the
handler and process it after net_poll() returns. This break when more than
one packet is received using the same buffer.

Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-05-19 09:38:43 +02:00
Franck Jullien b4ce62d3d2 drivers/net/ethoc: add mdio bus support
Signed-off-by: Franck Jullien <franck.jullien@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-05-16 08:02:59 +02:00
Sascha Hauer 26576f8ef5 net: cpsw: Allow multiple slaves
The driver is ready now for handling both slaved, so add support
for it.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-05-15 13:58:39 +02:00
Sascha Hauer 6322a0305f net: cpsw: Always write mac_control register
Instead of keeping track of the mac_control register value and
only writing to it when it changed just always write it. This is
more safe anyway since the mac_control register content is altered
in the soft_reset functions.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-05-15 13:58:39 +02:00
Sascha Hauer a1463175bd net: cpsw: use slave device for dev_dbg
Since the cpsw has two slaves which handle one network interface
each the slave number is interesting during debugging. use the
slave device for dev_dbg.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-05-15 13:58:39 +02:00
Sascha Hauer 6698b2dd51 net: cpsw: register slaves as devices
This makes it possible to directly call dev_dbg and friends
on the slave. Also the ethernet aliases in the devicetree
now match the devices.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-05-15 13:58:39 +02:00
Sascha Hauer 1655068ddd net: cpsw: Pass correct slave
Pass the current slave to cpsw_slave_init/cpsw_update_link,
not the first one.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-05-15 13:58:39 +02:00
Sascha Hauer 0ca1d8a456 net: phy: Print ethernet device in the link information
When multiple ethernet devices are in use it's interesting to know
which one has link.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-05-15 08:19:33 +02:00
Sascha Hauer 22b878d251 net: Pass eth_device to net_receive
So that barebox has the information which interface a packet
came from.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-05-15 08:15:21 +02:00
Franck Jullien ffce345bf6 driver/net: fix bus endianess access in ethoc.c
Signed-off-by: Franck Jullien <franck.jullien@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-05-14 09:05:03 +02:00
Sascha Hauer cdfca5dccb Merge branch 'for-next/rockchip' 2014-05-05 13:33:09 +02:00
Christoph Fritz 7af9c3a843 net cpsw: fix rx stability under heavy network load
RX DMA Head Descriptor Pointer can get 0 when there is a lot of traffic,
which results in a timeout error. A good way to provoke this error is by
sending lots of ARP requests. This patch makes sure that the RX DMA Head
Descriptor Pointer is set.

The origin driver, from which this is derived, already contains this fix.

Signed-off-by: Christoph Fritz <chf.fritz@googlemail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-05-05 09:19:18 +02:00
Beniamino Galvani 2766fbbf44 net: add ARC EMAC driver
This patch adds support for the Synopsys 10/100 Mbps Ethernet MAC used
on some ARC devices and on Rockchip SoCs.

Signed-off-by: Beniamino Galvani <b.galvani@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-04-29 08:12:32 +02:00
Antony Pavlov 9b2fb23ea9 net: usb: asix: fix formating
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-04-23 14:01:45 +02:00
Alexander Shiyan 8d5f1bdc9a drivers: treewide: Kill empty remove() implementations
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-04-02 07:55:26 +02:00
Sascha Hauer a8a08f88cc Merge branch 'for-next/misc'
Conflicts:
	common/environment.c
2014-03-07 09:25:09 +01:00
Sebastian Hesselbarth 1cae0ff619 net: orion: add ethernet driver
This adds a driver for the Ethernet ip found on Marvell Orion SoCs,
which is derived from Marvell Discovery System Controllers (MV643xx).
It is partially based on the corresponding u-boot driver.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Michael Grzeschik <mgr@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-02-10 09:09:03 +01:00
Sebastian Hesselbarth 0066844fb1 net: phy: add mvebu mdio bus driver
This adds a driver for the mdio bus found on Marvell Orion SoCs as
part of the GBE device and Marvell Armada 370/XP as part of Neta
eth device. Both drivers can share this code, so make it available
independently.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Michael Grzeschik <mgr@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-02-10 09:09:03 +01:00
Sebastian Hesselbarth 29af281cb1 net: phy: add of_phy_device_connect
This implements a of_phy_device_connect to allow DT enabled drivers
to connect to a PHY device by using the PHY's DT node only. It
currently assumes that each PHY node is a child of the corresponding
mdio bus.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-02-10 09:08:51 +01:00
Sebastian Hesselbarth 7ccd47fd5c net: reorder Kconfig and Makefile alphabetically
This reorders Kconfig and Makefile for drivers/net alphabetically.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-02-10 09:08:51 +01:00
Lucas Stach 8850df8cee net: usb: asix: properly propagate error code
Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-02-10 08:49:55 +01:00
Lucas Stach 4a5f389d1d net: usb: smsc95xx: fix wrong phy reset condition
Signed-off-by: Lucas Stach <dev@lynxeye.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-02-10 08:49:55 +01:00
Philipp Zabel 7a150c5fb1 net usb asix: add AX88772B USB ID
Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-01-29 10:14:37 +01:00
Philipp Zabel 4eabf125fb net usb asix: read MAC from EEPROM on AX88772B
Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-01-29 10:14:37 +01:00
Marek Vasut f5fa816cff net usb asix: Use only 11 bits of header for data size
The AX88772B uses only 11 bits of the header for the actual size. The other bits
are used for something else. This causes dmesg full of messages:

	asix_rx_fixup() Bad Header Length

This patch trims the check to only 11 bits. I believe on older chips, the
remaining 5 top bits are unused.

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2014-01-23 08:10:06 +01:00