diff options
author | Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> | 2011-07-22 12:47:45 +0800 |
---|---|---|
committer | Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> | 2011-07-23 09:23:40 +0800 |
commit | 166388bcf67edaf932fc026ef98b8749562e50f9 (patch) | |
tree | f46e14fcf6711efadedf76751fada75c417c01c1 /arch/nios2/boards | |
parent | 826708d5d8c3d7e3b5cd518ea44fb0bdbaad0175 (diff) | |
download | barebox-166388bcf67edaf932fc026ef98b8749562e50f9.tar.gz barebox-166388bcf67edaf932fc026ef98b8749562e50f9.tar.xz |
resource: introduce add_cfi_device to register simple cfi device
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Diffstat (limited to 'arch/nios2/boards')
-rw-r--r-- | arch/nios2/boards/generic/generic.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/arch/nios2/boards/generic/generic.c b/arch/nios2/boards/generic/generic.c index 37adfaa3b6..089715b749 100644 --- a/arch/nios2/boards/generic/generic.c +++ b/arch/nios2/boards/generic/generic.c @@ -4,13 +4,6 @@ #include <partition.h> #include <fs.h> -static struct device_d cfi_dev = { - .id = -1, - .name = "cfi_flash", - .map_base = NIOS_SOPC_FLASH_BASE, - .size = NIOS_SOPC_FLASH_SIZE, -}; - static int phy_address = 1; static struct device_d mac_dev = { @@ -37,7 +30,7 @@ static struct device_d epcs_flash_device = { static int generic_devices_init(void) { - register_device(&cfi_dev); + add_cfi_flash_device(-1, NIOS_SOPC_FLASH_BASE, NIOS_SOPC_FLASH_SIZE, 0); add_mem_device("ram0", NIOS_SOPC_MEMORY_BASE, NIOS_SOPC_MEMORY_SIZE, IORESOURCE_MEM_WRITEABLE); register_device(&mac_dev); |