9
0
Fork 0

cdev fixes for new boards

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
Sascha Hauer 2009-07-21 16:55:49 +02:00
parent e81b9b7816
commit 58f5a971fa
5 changed files with 11 additions and 55 deletions

View File

@ -37,10 +37,7 @@
static struct device_d sdram_dev = {
.name = "ram",
.id = "ram0",
.map_base = CS6_BASE,
.type = DEVICE_TYPE_DRAM,
};
// {"NAND 1MiB 3,3V 8-bit", 0xec, 256, 1, 0x1000, 0},
@ -61,10 +58,8 @@ static struct device_d nand_dev = {
*/
static struct device_d network_dev = {
.name = "smc91c111",
.id = "eth0",
.map_base = CS1_BASE + 0x300,
.size = 16,
.type = DEVICE_TYPE_ETHER,
};
#if 0
@ -94,7 +89,6 @@ static struct device_d ext_serial_dev[] = {
static int a9m2410_devices_init(void)
{
uint32_t reg;
struct device_d *nand, *dev;
/*
* detect the current memory size
@ -178,18 +172,11 @@ static int a9m2410_devices_init(void)
#ifdef CONFIG_NAND
/* ----------- add some vital partitions -------- */
nand = get_device_by_path("/dev/nand0");
if (nand) {
dev = dev_add_partition(nand, 0x00000, 0x40000,
PARTITION_FIXED, "self_raw");
if (dev) {
dev_add_bb_dev(dev, "self0");
dev = dev_add_partition(nand, 0x40000, 0x20000,
PARTITION_FIXED, "env_raw");
if (dev)
dev_add_bb_dev(dev, "env0");
}
}
devfs_add_partition("nand0", 0x00000, 0x40000, PARTITION_FIXED, "self_raw");
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_set_bootparams((void *)sdram_dev.map_base + 0x100);
@ -214,10 +201,8 @@ void __bare_init nand_boot(void)
static struct device_d a9m2410_serial_device = {
.name = "s3c24x0_serial",
.id = "cs0",
.map_base = UART1_BASE,
.size = UART1_SIZE,
.type = DEVICE_TYPE_CONSOLE,
};
static int a9m2410_console_init(void)

View File

@ -37,10 +37,7 @@
static struct device_d sdram_dev = {
.name = "ram",
.id = "ram0",
.map_base = CS6_BASE,
.type = DEVICE_TYPE_DRAM,
};
static struct s3c24x0_nand_platform_data nand_info = {
@ -60,16 +57,13 @@ static struct device_d nand_dev = {
*/
static struct device_d network_dev = {
.name = "smc91c111",
.id = "eth0",
.map_base = CS1_BASE + 0x300,
.size = 16,
.type = DEVICE_TYPE_ETHER,
};
static int a9m2440_devices_init(void)
{
uint32_t reg;
struct device_d *nand, *dev;
/*
* detect the current memory size
@ -165,18 +159,10 @@ static int a9m2440_devices_init(void)
#ifdef CONFIG_NAND
/* ----------- add some vital partitions -------- */
nand = get_device_by_path("/dev/nand0");
if (nand) {
dev = dev_add_partition(nand, 0x00000, 0x40000,
PARTITION_FIXED, "self_raw");
if (dev) {
dev_add_bb_dev(dev, "self0");
dev = dev_add_partition(nand, 0x40000, 0x20000,
PARTITION_FIXED, "env_raw");
if (dev)
dev_add_bb_dev(dev, "env0");
}
}
devfs_add_partition("nand0", 0x00000, 0x40000, PARTITION_FIXED, "self_raw");
dev_add_bb_dev("self_raw", "self0");
devfs_add_partition("nand0", 0x40000, 0x20000, PARTITION_FIXED, "env_raw");
#endif
armlinux_set_bootparams((void *)sdram_dev.map_base + 0x100);
@ -196,10 +182,8 @@ void __bare_init nand_boot(void)
static struct device_d a9m2440_serial_device = {
.name = "s3c24x0_serial",
.id = "cs0",
.map_base = UART1_BASE,
.size = UART1_SIZE,
.type = DEVICE_TYPE_CONSOLE,
};
static int a9m2440_console_init(void)

View File

@ -43,20 +43,14 @@
static struct device_d cfi_dev = {
.name = "cfi_flash",
.id = "nor0",
.map_base = 0xC0000000,
.size = 64 * 1024 * 1024,
};
static struct device_d sdram_dev = {
.name = "ram",
.id = "ram0",
.map_base = 0xa0000000,
.size = 128 * 1024 * 1024,
.type = DEVICE_TYPE_DRAM,
};
static struct fec_platform_data fec_info = {
@ -66,10 +60,8 @@ static struct fec_platform_data fec_info = {
static struct device_d fec_dev = {
.name = "fec_imx",
.id = "eth0",
.map_base = 0x1002b000,
.platform_data = &fec_info,
.type = DEVICE_TYPE_ETHER,
};
struct imx_nand_platform_data nand_info = {
@ -133,8 +125,8 @@ static int eukrea_cpuimx27_devices_init(void)
register_device(&nand_dev);
register_device(&sdram_dev);
dev_add_partition(&cfi_dev, 0x00000, 0x40000, PARTITION_FIXED, "self");
dev_add_partition(&cfi_dev, 0x40000, 0x20000, PARTITION_FIXED, "env");
devfs_add_partition("nor0", 0x00000, 0x40000, PARTITION_FIXED, "self0");
devfs_add_partition("nor0", 0x40000, 0x20000, PARTITION_FIXED, "env0");
dev_protect(&cfi_dev, 0x40000, 0, 1);
envdev = "NOR";
@ -150,10 +142,8 @@ device_initcall(eukrea_cpuimx27_devices_init);
static struct device_d eukrea_cpuimx27_serial_device = {
.name = "imx_serial",
.id = "cs0",
.map_base = IMX_UART1_BASE,
.size = 4096,
.type = DEVICE_TYPE_CONSOLE,
};
static int eukrea_cpuimx27_console_init(void)

View File

@ -1305,7 +1305,6 @@ static int smc91c111_probe(struct device_d *dev)
edev = xzalloc(sizeof(struct eth_device) +
sizeof(struct smc91c111_priv));
dev->type_data = edev;
edev->dev = dev;
edev->priv = (struct smc91c111_priv *)(edev + 1);
priv = edev->priv;
@ -1338,7 +1337,6 @@ static int smc91c111_probe(struct device_d *dev)
static struct driver_d smc91c111_driver = {
.name = "smc91c111",
.probe = smc91c111_probe,
.type = DEVICE_TYPE_ETHER,
};
static int smc91c111_init(void)

View File

@ -153,7 +153,6 @@ static struct driver_d s3c24x0_serial_driver = {
.name = "s3c24x0_serial",
.probe = s3c24x0_serial_probe,
.remove = s3c24x0_serial_remove,
.type = DEVICE_TYPE_CONSOLE,
};
static int s3c24x0_serial_init(void)