diff options
author | Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> | 2011-07-21 14:07:35 +0800 |
---|---|---|
committer | Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> | 2011-07-22 18:30:51 +0800 |
commit | 6f3aa8231064b9ea0b165423702265a7989294b7 (patch) | |
tree | 601fce4421191bed7dd4ee0f062e87237909a0fe /arch/arm/boards/at91rm9200ek | |
parent | 4b193e0755e6a3ca580dd08c4633b79312e72cd4 (diff) | |
download | barebox-6f3aa8231064b9ea0b165423702265a7989294b7.tar.gz barebox-6f3aa8231064b9ea0b165423702265a7989294b7.tar.xz |
at91: switch to add_generic_device
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Diffstat (limited to 'arch/arm/boards/at91rm9200ek')
-rw-r--r-- | arch/arm/boards/at91rm9200ek/init.c | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/arch/arm/boards/at91rm9200ek/init.c b/arch/arm/boards/at91rm9200ek/init.c index 2b16980527..3ef41a2d76 100644 --- a/arch/arm/boards/at91rm9200ek/init.c +++ b/arch/arm/boards/at91rm9200ek/init.c @@ -34,20 +34,6 @@ #include <mach/gpio.h> #include <mach/io.h> -static struct resource cfi_resources[] = { - [0] = { - .start = AT91_CHIPSELECT_0, - .flags = IORESOURCE_MEM, - }, -}; - -static struct device_d cfi_dev = { - .id = 0, - .name = "cfi_flash", - .num_resources = ARRAY_SIZE(cfi_resources), - .resource = cfi_resources, -}; - static struct at91_ether_platform_data ether_pdata = { .flags = AT91SAM_ETHER_RMII, .phy_addr = 0, @@ -63,7 +49,9 @@ static int at91rm9200ek_devices_init(void) at91_add_device_sdram(64 * 1024 * 1024); at91_add_device_eth(ðer_pdata); - register_device(&cfi_dev); + + add_generic_device("cfi_flash", 0, NULL, AT91_CHIPSELECT_0, 0, + IORESOURCE_MEM, NULL); #if defined(CONFIG_DRIVER_CFI) || defined(CONFIG_DRIVER_CFI_OLD) devfs_add_partition("nor0", 0x00000, 0x40000, PARTITION_FIXED, "self"); |