diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2009-07-21 16:55:49 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2009-07-21 16:55:49 +0200 |
commit | 58f5a971fa36890e14b513b7884fc1df8bbe0c67 (patch) | |
tree | c61582066cc160c21a849ce2585c14cb0b744d38 | |
parent | e81b9b78161d8b955b736579c8c9ac4b8b6ac148 (diff) | |
download | barebox-58f5a971fa36890e14b513b7884fc1df8bbe0c67.tar.gz barebox-58f5a971fa36890e14b513b7884fc1df8bbe0c67.tar.xz |
cdev fixes for new boards
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r-- | board/a9m2410/a9m2410.c | 25 | ||||
-rw-r--r-- | board/a9m2440/a9m2440.c | 24 | ||||
-rw-r--r-- | board/eukrea_cpuimx27/eukrea_cpuimx27.c | 14 | ||||
-rw-r--r-- | drivers/net/smc91111.c | 2 | ||||
-rw-r--r-- | drivers/serial/serial_s3c24x0.c | 1 |
5 files changed, 11 insertions, 55 deletions
diff --git a/board/a9m2410/a9m2410.c b/board/a9m2410/a9m2410.c index 696fc7dbf0..bc10241fc6 100644 --- a/board/a9m2410/a9m2410.c +++ b/board/a9m2410/a9m2410.c @@ -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) diff --git a/board/a9m2440/a9m2440.c b/board/a9m2440/a9m2440.c index 522333764f..43ec75b932 100644 --- a/board/a9m2440/a9m2440.c +++ b/board/a9m2440/a9m2440.c @@ -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) diff --git a/board/eukrea_cpuimx27/eukrea_cpuimx27.c b/board/eukrea_cpuimx27/eukrea_cpuimx27.c index c87805f883..a371f2d9db 100644 --- a/board/eukrea_cpuimx27/eukrea_cpuimx27.c +++ b/board/eukrea_cpuimx27/eukrea_cpuimx27.c @@ -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) diff --git a/drivers/net/smc91111.c b/drivers/net/smc91111.c index 78af093433..987b284b2f 100644 --- a/drivers/net/smc91111.c +++ b/drivers/net/smc91111.c @@ -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) diff --git a/drivers/serial/serial_s3c24x0.c b/drivers/serial/serial_s3c24x0.c index 43a4cd2d47..92e9fa9b0c 100644 --- a/drivers/serial/serial_s3c24x0.c +++ b/drivers/serial/serial_s3c24x0.c @@ -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) |