[PATCH 15/23] edb93xx: switch to resource
Jean-Christophe PLAGNIOL-VILLARD
plagnioj at jcrosoft.com
Fri Jul 29 23:17:03 EDT 2011
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj at jcrosoft.com>
---
arch/arm/boards/edb93xx/edb93xx.c | 25 +++++++------------------
1 files changed, 7 insertions(+), 18 deletions(-)
diff --git a/arch/arm/boards/edb93xx/edb93xx.c b/arch/arm/boards/edb93xx/edb93xx.c
index b169db6..7f9e647 100644
--- a/arch/arm/boards/edb93xx/edb93xx.c
+++ b/arch/arm/boards/edb93xx/edb93xx.c
@@ -34,15 +34,6 @@
#define DEVCFG_U1EN (1 << 18)
-/*
- * Up to 32MiB NOR type flash, connected to
- * CS line 6, data width is 16 bit
- */
-static struct device_d eth_dev = {
- .id = -1,
- .name = "ep93xx_eth",
-};
-
static int ep93xx_devices_init(void)
{
struct device_d *sdram_dev;
@@ -81,7 +72,11 @@ static int ep93xx_devices_init(void)
armlinux_add_dram(sdram_dev);
#endif
- register_device(ð_dev);
+ /*
+ * Up to 32MiB NOR type flash, connected to
+ * CS line 6, data width is 16 bit
+ */
+ add_generic_device("ep93xx_eth", -1, NULL, 0, 0, IORESOURCE_MEM, NULL);
armlinux_set_bootparams((void *)CONFIG_EP93XX_SDRAM_BANK0_BASE + 0x100);
@@ -92,13 +87,6 @@ static int ep93xx_devices_init(void)
device_initcall(ep93xx_devices_init);
-static struct device_d edb93xx_serial_device = {
- .id = -1,
- .name = "pl010_serial",
- .map_base = UART1_BASE,
- .size = 4096,
-};
-
static int edb93xx_console_init(void)
{
struct syscon_regs *syscon = (struct syscon_regs *)SYSCON_BASE;
@@ -117,7 +105,8 @@ static int edb93xx_console_init(void)
writel(0xAA, &syscon->sysswlock);
writel(value, &syscon->devicecfg);
- register_device(&edb93xx_serial_device);
+ add_generic_device("pl010_serial", -1, NULL, UART1_BASE, 4096,
+ IORESOURCE_MEM, NULL);
return 0;
}
--
1.7.5.4
More information about the barebox
mailing list