diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2007-07-05 18:01:25 +0200 |
---|---|---|
committer | Sascha Hauer <sha@octopus.labnet.pengutronix.de> | 2007-07-05 18:01:25 +0200 |
commit | ca24324ce1388f7c6740c9b4f6acc119ab70c831 (patch) | |
tree | 24a79bd3db8491450a6c0fc8b4f424d51ea3dbd9 /drivers/net/at91_ether.c | |
parent | 4a01ad9260efb1ea23020d9cb8587e318082bbb5 (diff) | |
download | barebox-ca24324ce1388f7c6740c9b4f6acc119ab70c831.tar.gz barebox-ca24324ce1388f7c6740c9b4f6acc119ab70c831.tar.xz |
svn_rev_129
make it work again
Diffstat (limited to 'drivers/net/at91_ether.c')
-rw-r--r-- | drivers/net/at91_ether.c | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/drivers/net/at91_ether.c b/drivers/net/at91_ether.c index d2d3e3ab97..4c1da1178e 100644 --- a/drivers/net/at91_ether.c +++ b/drivers/net/at91_ether.c @@ -22,8 +22,10 @@ */ #include <at91rm9200_net.h> +#include <init.h> #include <net.h> #include <miiphy.h> +#include <driver.h> /* ----- Ethernet Buffer definitions ----- */ @@ -147,7 +149,7 @@ UCHAR at91rm9200_EmacWritePhy (AT91PS_EMAC p_mac, return TRUE; } -static int at91rm9200_eth_init (struct eth_device *ndev, bd_t * bd) +static int at91rm9200_eth_init (struct device_d *dev) { int i; @@ -205,7 +207,7 @@ static int at91rm9200_eth_init (struct eth_device *ndev, bd_t * bd) return 0; } -static int at91rm9200_eth_open (struct eth_device *ndev, bd_t * bd) +static int at91rm9200_eth_open (struct eth_device *ndev) { int ret; @@ -314,7 +316,6 @@ static int at91rm9200_set_mac_address(struct eth_device *eth, unsigned char *adr } struct eth_device at91rm9200_eth = { - .init = at91rm9200_eth_init, .open = at91rm9200_eth_open, .send = at91rm9200_eth_send, .recv = at91rm9200_eth_rx, @@ -323,3 +324,18 @@ struct eth_device at91rm9200_eth = { .set_mac_address = at91rm9200_set_mac_address, }; +static struct driver_d at91_eth_driver = { + .name = "at91_eth", + .probe = at91rm9200_eth_init, + .type = DEVICE_TYPE_ETHER, + .type_data = &at91rm9200_eth, +}; + +static int at91_eth_init(void) +{ + register_driver(&at91_eth_driver); + return 0; +} + +device_initcall(at91_eth_init); + |