summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-versatile
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-versatile')
-rw-r--r--arch/arm/mach-versatile/core.c20
1 files changed, 5 insertions, 15 deletions
diff --git a/arch/arm/mach-versatile/core.c b/arch/arm/mach-versatile/core.c
index 5857d43510..63cf4a5003 100644
--- a/arch/arm/mach-versatile/core.c
+++ b/arch/arm/mach-versatile/core.c
@@ -42,23 +42,13 @@
#include <mach/platform.h>
#include <mach/init.h>
-static struct memory_platform_data ram_pdata = {
- .name = "ram0",
- .flags = IORESOURCE_MEM_WRITEABLE,
-};
-
-static struct device_d sdram_dev = {
- .id = -1,
- .name = "mem",
- .map_base = 0x00000000,
- .platform_data = &ram_pdata,
-};
-
void versatile_add_sdram(u32 size)
{
- sdram_dev.size = size;
- register_device(&sdram_dev);
- armlinux_add_dram(&sdram_dev);
+ struct device_d *sdram_dev;
+
+ sdram_dev = add_mem_device("ram0", 0x00000000, size,
+ IORESOURCE_MEM_WRITEABLE);
+ armlinux_add_dram(sdram_dev);
}
static struct device_d uart0_serial_device = {