wl1251: use wiphy_dev instead of wl->spi->dev
[linux/fpc-iii.git] / arch / arm / mach-s3c2410 / bast-ide.c
blob298ececfa366288d80a2ee445348f88f493fd8e8
1 /* linux/arch/arm/mach-s3c2410/bast-ide.c
3 * Copyright 2007 Simtec Electronics
4 * http://www.simtec.co.uk/products/EB2410ITX/
5 * http://armlinux.simtec.co.uk/
6 * Ben Dooks <ben@simtec.co.uk>
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
13 #include <linux/kernel.h>
14 #include <linux/types.h>
15 #include <linux/init.h>
16 #include <linux/interrupt.h>
18 #include <linux/platform_device.h>
19 #include <linux/ata_platform.h>
21 #include <asm/mach-types.h>
23 #include <asm/mach/arch.h>
24 #include <asm/mach/map.h>
25 #include <asm/mach/irq.h>
27 #include <mach/map.h>
28 #include <mach/bast-map.h>
29 #include <mach/bast-irq.h>
31 /* IDE ports */
33 static struct pata_platform_info bast_ide_platdata = {
34 .ioport_shift = 5,
37 #define IDE_CS S3C2410_CS5
39 static struct resource bast_ide0_resource[] = {
40 [0] = {
41 .start = IDE_CS + BAST_PA_IDEPRI,
42 .end = IDE_CS + BAST_PA_IDEPRI + (8 * 0x20) - 1,
43 .flags = IORESOURCE_MEM,
45 [1] = {
46 .start = IDE_CS + BAST_PA_IDEPRIAUX + (6 * 0x20) ,
47 .end = IDE_CS + BAST_PA_IDEPRIAUX + (7 * 0x20) - 1,
48 .flags = IORESOURCE_MEM,
50 [2] = {
51 .start = IRQ_IDE0,
52 .end = IRQ_IDE0,
53 .flags = IORESOURCE_IRQ,
57 static struct platform_device bast_device_ide0 = {
58 .name = "pata_platform",
59 .id = 0,
60 .num_resources = ARRAY_SIZE(bast_ide0_resource),
61 .resource = bast_ide0_resource,
62 .dev = {
63 .platform_data = &bast_ide_platdata,
64 .coherent_dma_mask = ~0,
69 static struct resource bast_ide1_resource[] = {
70 [0] = {
71 .start = IDE_CS + BAST_PA_IDESEC,
72 .end = IDE_CS + BAST_PA_IDESEC + (8 * 0x20) - 1,
73 .flags = IORESOURCE_MEM,
75 [1] = {
76 .start = IDE_CS + BAST_PA_IDESECAUX + (6 * 0x20),
77 .end = IDE_CS + BAST_PA_IDESECAUX + (7 * 0x20) - 1,
78 .flags = IORESOURCE_MEM,
80 [2] = {
81 .start = IRQ_IDE1,
82 .end = IRQ_IDE1,
83 .flags = IORESOURCE_IRQ,
87 static struct platform_device bast_device_ide1 = {
88 .name = "pata_platform",
89 .id = 1,
90 .num_resources = ARRAY_SIZE(bast_ide1_resource),
91 .resource = bast_ide1_resource,
92 .dev = {
93 .platform_data = &bast_ide_platdata,
94 .coherent_dma_mask = ~0,
98 static struct platform_device *bast_ide_devices[] __initdata = {
99 &bast_device_ide0,
100 &bast_device_ide1,
103 static __init int bast_ide_init(void)
105 if (machine_is_bast() || machine_is_vr1000())
106 return platform_add_devices(bast_ide_devices,
107 ARRAY_SIZE(bast_ide_devices));
109 return 0;
112 fs_initcall(bast_ide_init);