summaryrefslogtreecommitdiffstats
path: root/arch/arm/boards/edb93xx
diff options
context:
space:
mode:
authorJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>2011-07-29 15:13:04 +0800
committerJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>2011-07-30 02:05:27 +0800
commit535d38b92a5c1adeed6ef0bd942d3736b74cc656 (patch)
treec46ef0ae5e2b96ef908639e13f08ab16a74afa0e /arch/arm/boards/edb93xx
parent931c1cc5a6890b465840738fd99e05b2a6709e56 (diff)
downloadbarebox-535d38b92a5c1adeed6ef0bd942d3736b74cc656.tar.gz
barebox-535d38b92a5c1adeed6ef0bd942d3736b74cc656.tar.xz
edb93xx: switch to resource
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Diffstat (limited to 'arch/arm/boards/edb93xx')
-rw-r--r--arch/arm/boards/edb93xx/edb93xx.c25
1 files changed, 7 insertions, 18 deletions
diff --git a/arch/arm/boards/edb93xx/edb93xx.c b/arch/arm/boards/edb93xx/edb93xx.c
index b169db6e14..7f9e6473e2 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(&eth_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;
}