9
0
Fork 0
Commit Graph

24 Commits

Author SHA1 Message Date
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
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
Josh Cartwright 28acd8331d macb: rename platform data
The macb/gem core is used by the Zynq SoC.  In preparation of sharing
the macb driver between at91 and Zynq, rename the platform data to
'struct macb_platform_data', and move the definition to a common
location.

Signed-off-by: Josh Cartwright <joshc@eso.teric.us>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-04-03 17:21:51 +02: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
Jean-Christophe PLAGNIOL-VILLARD f7e3126619 macb: allow to pass the phy interface
as we will add later the GMAC IP verion support (GEM)

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-01-29 11:44:49 +01:00
Jean-Christophe PLAGNIOL-VILLARD c811546712 macb/ether: split flags for drivers and phylib
as in the kernel use is_rmii
flags for pinctrl
phy_flags for phylib flags

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-11-19 10:19:08 +01:00
Jean-Christophe PLAGNIOL-VILLARD 3c5327e660 switch all platform_bus device/driver registering to platform_driver/device_register
now register_driver and register_device are for bus only usage.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2012-10-04 15:19:12 +02:00
Sascha Hauer d1e65d2a7b Merge branch 'for-next/remove-fsf-address'
Conflicts:
	drivers/net/miidev.c
	include/miidev.h
2012-10-03 21:12:48 +02:00
Jean-Christophe PLAGNIOL-VILLARD 2263e27814 net: introduce phylib
Adapt phylib from linux

switch all the driver to it
reimplement mii bus

This will allow to have
 - phy drivers
 - to only connect the phy at then opening of the device
 - if the phy is not ready or not up fail on open

Same behaviour as in linux and will allow to share code and simplify porting.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2012-09-25 08:18:58 +02:00
Sascha Hauer 77322aa896 Treewide: remove address of the Free Software Foundation
The FSF address has changed in the past. Instead of updating it
each time the address changes, just drop it completely treewide.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-09-17 10:57:41 +02:00
Jean-Christophe PLAGNIOL-VILLARD 2452210ac9 net: at91_ether re-implement against new at91rm9200 api
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-04-02 10:26:14 +02:00
Sascha Hauer 6d16fbdcd4 net: make the ethernet device a child of the hardware device
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-08-15 09:48:03 +02:00
Krzysztof Halasa c5baa0edc4 Fix error handling with malloc, memalign etc. Introduce xmemalign().
The idea is to panic() when there is no memory available for normal
operation. Exception: code which can consume arbitrary amount of RAM
(example: files allocated in ramfs) must report error instead of panic().

This patch also fixes code which didn't check for NULL from malloc() etc.

Usage: malloc(), memalign() return NULL when out of RAM.
xmalloc(), xmemalign() always return non-NULL or panic().

Signed-off-by: Krzysztof Hałasa <khc@pm.waw.pl>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-01-07 10:21:22 +01:00
Jean-Christophe PLAGNIOL-VILLARD 12f396a8b0 net: rework the mii support
this rework is done in order to add a phylib and allow to have phy driver support

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-08-27 14:36:03 +02:00
Sascha Hauer c70689d727 network drivers: call net_receive directly instead of NetReceive
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-06-17 08:28:25 +02:00
Sascha Hauer 2f8df2a003 add a device_d to ethernet devices
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-07-21 16:41:46 +02:00
Sascha Hauer 6e921fcb3c Get rid of DEVICE_TYPE_ETHER usage
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-07-21 16:41:45 +02:00
sascha 1b272d80f1 change functions containing 'mac' or 'enet' in its name to 'ethaddr'.
change the parameter name for ethernet devices to 'ethaddr' aswell.
2007-10-18 11:17:16 +02:00
Sascha Hauer 381840e830 svn_rev_310
use type_data instead of pric for edev
2007-07-05 18:01:42 +02:00
Sascha Hauer 5909668c9f svn_rev_251
make it work again
2007-07-05 18:01:36 +02:00
Sascha Hauer ca24324ce1 svn_rev_129
make it work again
2007-07-05 18:01:25 +02:00
Sascha Hauer 3533c30ef4 svn_rev_107
removed ifdefs
2007-07-05 18:01:23 +02:00
Sascha Hauer f6508e1c4b svn_rev_095
Currently U-Boot uses globally defined eth_* functions. This is
horribly unflexible. This patch replaces the global functions
with pointers from structs. We could also use CONFIG_NET_MULTI,
but this has other implications, though we should merge this
some day.
Also, U-Boot has no unique way to handle MAC addresses. Each and
every board and network driver uses it's own mechanism to set the
MAC address. There are several problems which I've for too often.
For example everything goes well if we boot from network, but when
we boot from flash U-Boot forgets to set the MAC address and the
linux network driver has none.
This patch adds [gs]et_mac_address to the eth_device struct and
handles it as follows:
- First try to get a valid MAC address from the EEPROM and set
  'ethaddr' accordingly.
- If no valid MAC address is found in the EEPROM (or no EEPROM is
  connected), we set the devices MAC address from 'ethaddr'
This is done in eth_initialize which is called on startup for
every board.
2007-07-05 18:01:22 +02:00
Sascha Hauer 8b4976503c svn_rev_061
rename
2007-07-05 18:01:18 +02:00