summaryrefslogtreecommitdiffstats
path: root/arch/arm/boards/at91sam9261ek
diff options
context:
space:
mode:
authorJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>2011-07-23 17:42:28 +0800
committerJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>2011-07-29 14:04:24 +0800
commit06c36cf09e08cfd054c2d1e61be8492c4e5dc929 (patch)
tree15b21f44075e7deeeabde516f9b55478dbcce050 /arch/arm/boards/at91sam9261ek
parent3465da7aa8821252f95aec5e8bb7e6a8f4f4a4f0 (diff)
downloadbarebox-06c36cf09e08cfd054c2d1e61be8492c4e5dc929.tar.gz
barebox-06c36cf09e08cfd054c2d1e61be8492c4e5dc929.tar.xz
dm9000: introduce add_dm9000_device to register dm9000 device
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Diffstat (limited to 'arch/arm/boards/at91sam9261ek')
-rw-r--r--arch/arm/boards/at91sam9261ek/init.c25
1 files changed, 2 insertions, 23 deletions
diff --git a/arch/arm/boards/at91sam9261ek/init.c b/arch/arm/boards/at91sam9261ek/init.c
index 812b39958b..627202f1c2 100644
--- a/arch/arm/boards/at91sam9261ek/init.c
+++ b/arch/arm/boards/at91sam9261ek/init.c
@@ -89,31 +89,9 @@ static void ek_add_device_nand(void)
*/
#if defined(CONFIG_DRIVER_NET_DM9000)
static struct dm9000_platform_data dm9000_data = {
- .buswidth = IORESOURCE_MEM_16BIT,
.srom = 0,
};
-static struct resource dm9000_resources[] = {
- [0] = {
- .start = AT91_CHIPSELECT_2,
- .size = 4,
- .flags = IORESOURCE_MEM,
- },
- [1] = {
- .start = AT91_CHIPSELECT_2 + 4,
- .size = 4,
- .flags = IORESOURCE_MEM,
- },
-};
-
-static struct device_d dm9000_dev = {
- .id = 0,
- .name = "dm9000",
- .num_resources = ARRAY_SIZE(dm9000_resources),
- .resource = dm9000_resources,
- .platform_data = &dm9000_data,
-};
-
/*
* SMC timings for the DM9000.
* Note: These timings were calculated for MASTER_CLOCK = 100000000 according to the DM9000 timings.
@@ -147,7 +125,8 @@ static void __init ek_add_device_dm9000(void)
/* Configure Interrupt pin as input, no pull-up */
at91_set_gpio_input(AT91_PIN_PC11, 0);
- register_device(&dm9000_dev);
+ add_dm9000_device(0, AT91_CHIPSELECT_2, AT91_CHIPSELECT_2 + 4,
+ IORESOURCE_MEM_16BIT, &dm9000_data);
}
#else
static void __init ek_add_device_dm9000(void) {}