9
0
Fork 0
Commit Graph

16 Commits

Author SHA1 Message Date
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 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
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
Jan Weitzel 09783b9c45 net: cpsw: Fix gmii_sel config
Prober slave_num is needed by cpsw_gmii_sel_am335x to calc reg value.

Signed-off-by: Jan Weitzel <j.weitzel@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-12-12 09:07:20 +01:00
Sascha Hauer 7cc4a2ad95 net: cpsw: straighten error path
This mainly has the effect of checking the return value of eth_register.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-11-27 10:42:53 +01:00
Sascha Hauer 046157602e net: cpsw: attach slave to edev->priv
An ethernet device belongs to a slave, so set edev->priv to the slave
and not to the cpsw.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-11-27 10:42:53 +01:00
Sascha Hauer 82bc71b820 net: cpsw: drop for_each_slave
We currently only use one slave, so drop for_each_slave and hardcode
slave[0] until we pass the proper context to the functions that makes
this hack unnecessary.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-11-27 10:42:53 +01:00
Sascha Hauer a722418645 net: cpsw: move eth_device into slave
An ethernet device is per slave, not per cpsw.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-11-27 10:42:53 +01:00
Sascha Hauer 9321538ee2 cpsw: Add devicetree probe support
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-11-27 10:42:53 +01:00
Sascha Hauer e586a64d3e net: cpsw: inline slave_data
Devicetree probed cpsw devices won't have platform_data, so inline
the fields from slave_data instead of keeping a pointer.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-11-22 15:35:12 +01:00
Alexander Shiyan 6a256321b8 Use new device_platform_driver() macro for drivers
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-13 09:23:28 +01:00
Jan Luebbe 5824325936 drivers: net: add driver for TI CPSW
Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-10 20:41:50 +01:00