9
0
Fork 0
Commit Graph

25 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
Jean-Christophe PLAGNIOL-VILLARD 7e6b99fd09 smc91111: add fixup for qemu phy support
as today qemu does not support phy, it will return always 0x0 to any read
on the mii bus. So the phy_id is 0 and the link is donw.

To have the norwork running on versatilpb & other qenu board for the link up
at 100Mbps.

Only enable if qemu_fixup is set.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-09-22 16:48:03 +02:00
Sascha Hauer 2e6bbb4065 remove unused debug Kconfig options
ENABLE_DEVICE_NOISE is used only in two network drivers and is
otherwise unused. ENABLE_FLASH_NOISE is completely unused.
ENABLE_PARTITION_NOISE enables DEBUG in the partition command,
but this code has no debug messages at all.

Remove all this.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-06-23 21:37:12 +02:00
Jean-Christophe PLAGNIOL-VILLARD dc62dd48d8 smc911111: fix send and recv return value
on error send error code and 0 on success

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2013-02-26 11:05:02 +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
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
Sascha Hauer e609cbe1e5 net drivers: remove unused type_data
Many net drivers set dev->type_data without ever using it, so
just remove it.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2012-02-25 15:16:26 +01:00
Sascha Hauer 3ee7877a48 introduce io.h
To allow for some generic io accessors introduce io.h and use
this instead of asm/io.h throughout the tree.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-09-22 19:03:05 +02:00
Sascha Hauer 8fddb2edf6 net mii: add a parent pointer to miidevs and set it to the hardware device
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-08-15 09:48:03 +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
Sascha Hauer 07506a2282 smc91111: switch to resources
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2011-07-28 15:39:41 +02:00
Marek Belisko 52f5f20baa smc91111: Various sparse fixes.
Patch fix all similar warnings found by sparse:
drivers/net/smc91111.c:488:9:
warning: incorrect type in argument 1 (different base types)
	expected void const volatile [noderef] <asn:2>*<noident>
	got unsigned long [unsigned] offset

Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-11-19 09:35:09 +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
Marc Kleine-Budde 4903636f98 smc91111: fix odering of mac address read from EEPROM
On my little endian PXA270, the ethernet address is byte swapped:

correct ethernet address: 00:50:c2:80:a7:bd
broken  ethernet address: 50:00:80:c2:bd:a7

The correct value is what the sticker on the baoard and the linux driver
says. This patch fixes the problem by reading the ethaddr byte-wise from
the eeprom.

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2010-02-01 16:27:35 +01:00
Sascha Hauer a3ffa97f40 rename U-Boot-v2 project to barebox
This has been done with the following script:

find -path ./.git -prune -o -type f -print0 | xargs -0 -r sed -i \
	-e 's/u2boot/barebox/g' \
	-e 's/U2Boot/barebox/g' \
	-e 's/U-boot V2/barebox/g' \
	-e 's/u-boot v2/barebox/g' \
	-e 's/U-Boot V2/barebox/g' \
	-e 's/U-Boot-v2/barebox/g' \
	-e 's/U_BOOT/BAREBOX/g' \
	-e 's/UBOOT/BAREBOX/g' \
	-e 's/uboot/barebox/g' \
	-e 's/u-boot/barebox/g' \
	-e 's/u_boot/barebox/g' \
	-e 's/U-Boot/barebox/g' \
	-e 's/U-boot/barebox/g' \
	-e 's/U-BOOT/barebox/g'

find -path ./.git -prune -o \( -name "*u-boot*" -o -name "*uboot*" -o -name "*u_boot*" \) -print0 | \
	xargs -0 -r rename 's/u[-_]?boot/barebox/'

It needs some manual fixup following in the next patch

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-12-15 10:18:30 +01:00
Sascha Hauer 58f5a971fa cdev fixes for new boards
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-07-21 16:55:49 +02:00
Sascha Hauer 001fd57523 smc91111: use miiphy functions for autonegotiation
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
2009-07-09 15:22:43 +02:00
Juergen Beisert bf9679991a Adding the network driver for the SMSC91C111 ethernet device.
Signed-off-by: Juergen Beisert <j.beisert@pengutronix.de>
2009-07-01 14:36:40 +02:00
Sascha Hauer c1711479b0 remove unported includes and drivers 2007-09-21 14:14:05 +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 6f5a40d81a svn_rev_057
move all ethernet drivers to drivers/net
2007-07-05 18:01:18 +02:00