[PATCH 12/23] ipe337: switch to resources
Jean-Christophe PLAGNIOL-VILLARD
plagnioj at jcrosoft.com
Fri Jul 29 11:59:56 EDT 2011
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj at jcrosoft.com>
---
arch/blackfin/boards/ipe337/ipe337.c | 20 ++++----------------
1 files changed, 4 insertions(+), 16 deletions(-)
diff --git a/arch/blackfin/boards/ipe337/ipe337.c b/arch/blackfin/boards/ipe337/ipe337.c
index 4430f3b..ee642d1 100644
--- a/arch/blackfin/boards/ipe337/ipe337.c
+++ b/arch/blackfin/boards/ipe337/ipe337.c
@@ -5,13 +5,6 @@
#include <partition.h>
#include <fs.h>
-static struct device_d smc911x_dev = {
- .id = -1,
- .name = "smc911x",
- .map_base = 0x24000000,
- .size = 4096,
-};
-
static int ipe337_devices_init(void) {
add_cfi_flash_device(-1, 0x20000000, 32 * 1024 * 1024, 0);
add_mem_device("ram0", 0x0, 128 * 1024 * 1024,
@@ -23,7 +16,8 @@ static int ipe337_devices_init(void) {
mdelay(100);
*pFIO0_FLAG_S = (1<<12);
- register_device(&smc911x_dev);
+ add_generic_device("smc911x", -1, NULL, 0x24000000, 4096,
+ IORESOURCE_MEM, NULL);
devfs_add_partition("nor0", 0x00000, 0x20000, PARTITION_FIXED, "self0");
devfs_add_partition("nor0", 0x20000, 0x20000, PARTITION_FIXED, "env0");
@@ -35,16 +29,10 @@ static int ipe337_devices_init(void) {
device_initcall(ipe337_devices_init);
-static struct device_d blackfin_serial_device = {
- .id = -1,
- .name = "blackfin_serial",
- .map_base = 0,
- .size = 4096,
-};
-
static int blackfin_console_init(void)
{
- register_device(&blackfin_serial_device);
+ add_generic_device("blackfin_serial", -1, NULL, 0, 4096,
+ IORESOURCE_MEM, NULL);
return 0;
}
--
1.7.5.4
More information about the barebox
mailing list