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/at91sam9263ek | |
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/at91sam9263ek')
-rw-r--r-- | arch/arm/boards/at91sam9263ek/init.c | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/arch/arm/boards/at91sam9263ek/init.c b/arch/arm/boards/at91sam9263ek/init.c index af8a1e1da6..655d46af3f 100644 --- a/arch/arm/boards/at91sam9263ek/init.c +++ b/arch/arm/boards/at91sam9263ek/init.c @@ -87,21 +87,6 @@ static void ek_add_device_nand(void) at91_add_device_nand(&nand_pdata); } -static struct resource cfi_resources[] = { - [0] = { - .start = AT91_CHIPSELECT_0, - .size = 8 * 1024 * 1024, - .flags = IORESOURCE_MEM, - }, -}; - -static struct device_d cfi_dev = { - .id = -1, - .name = "cfi_flash", - .num_resources = ARRAY_SIZE(cfi_resources), - .resource = cfi_resources, -}; - static struct at91_ether_platform_data macb_pdata = { .flags = AT91SAM_ETHER_RMII, .phy_addr = 0, @@ -135,7 +120,8 @@ static int at91sam9263ek_devices_init(void) at91_add_device_sdram(64 * 1024 * 1024); ek_add_device_nand(); at91_add_device_eth(&macb_pdata); - register_device(&cfi_dev); + add_generic_device("cfi_flash", 0, NULL, AT91_CHIPSELECT_0, 8 * 1024 * 1024, + IORESOURCE_MEM, NULL); ek_add_device_mci(); #if defined(CONFIG_DRIVER_CFI) || defined(CONFIG_DRIVER_CFI_OLD) |