9
0
Fork 0

adapt both S3C platforms to the new device handling

Signed-off-by: Juergen Beisert <j.beisert@pengutronix.de>
This commit is contained in:
Juergen Beisert 2009-08-11 16:46:45 +02:00 committed by Sascha Hauer
parent 9a313a8017
commit bffd9dd42d
2 changed files with 20 additions and 6 deletions

View File

@ -35,9 +35,15 @@
#include <asm/arch/s3c24x0-iomap.h>
#include <asm/arch/s3c24x0-nand.h>
static struct memory_platform_data ram_pdata = {
.name = "ram0",
.flags = DEVFS_RDWR,
};
static struct device_d sdram_dev = {
.name = "ram",
.map_base = CS6_BASE,
.name = "ram",
.map_base = CS6_BASE,
.platform_data = &ram_pdata,
};
// {"NAND 1MiB 3,3V 8-bit", 0xec, 256, 1, 0x1000, 0},
@ -154,8 +160,9 @@ static int a9m2410_devices_init(void)
devfs_add_partition("nand0", 0x40000, 0x20000, PARTITION_FIXED, "env_raw");
dev_add_bb_dev("env_raw", "env0");
#endif
armlinux_set_bootparams((void *)sdram_dev.map_base + 0x100);
armlinux_add_dram(&sdram_dev);
armlinux_set_bootparams((void *)sdram_dev.map_base + 0x100);
armlinux_set_architecture(MACH_TYPE_A9M2410);
return 0;

View File

@ -35,9 +35,15 @@
#include <asm/arch/s3c24x0-iomap.h>
#include <asm/arch/s3c24x0-nand.h>
static struct memory_platform_data ram_pdata = {
.name = "ram0",
.flags = DEVFS_RDWR,
};
static struct device_d sdram_dev = {
.name = "ram",
.map_base = CS6_BASE,
.name = "mem",
.map_base = CS6_BASE,
.platform_data = &ram_pdata,
};
static struct s3c24x0_nand_platform_data nand_info = {
@ -162,9 +168,10 @@ static int a9m2440_devices_init(void)
dev_add_bb_dev("self_raw", "self0");
devfs_add_partition("nand0", 0x40000, 0x20000, PARTITION_FIXED, "env_raw");
dev_add_bb_dev("env_raw", "env0");
#endif
armlinux_add_dram(&sdram_dev);
armlinux_set_bootparams((void *)sdram_dev.map_base + 0x100);
armlinux_set_architecture(MACH_TYPE_A9M2440);
return 0;