diff options
author | Ben Dooks <ben-linux@fluff.org> | 2008-07-03 06:24:37 -0400 |
---|---|---|
committer | Ben Dooks <ben-linux@fluff.org> | 2008-07-03 11:51:27 -0400 |
commit | b7a12d1923f12aa00a68347a3ad97c43ecf55667 (patch) | |
tree | f16dc7cdb87c9eec83bc58b7136a5942e6adc0a3 /arch/arm/mach-s3c2410 | |
parent | dd1086f43dc7205b451ae95e37d4813a9c28611d (diff) |
[ARM] BAST/VR1000: Move to using ata_platform (libata)
Use the pata_platform driver to provide the IDE port
drivers on the Simntec BAST and Thorcom VR1000 machines
as a precursor to removing drivers/ide/arm/bast-ide.c
This will mean that the system will need SCSI and SCSI disc
support as a minimum, and any references to hdX will be
changed to sdX.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Diffstat (limited to 'arch/arm/mach-s3c2410')
-rw-r--r-- | arch/arm/mach-s3c2410/Kconfig | 9 | ||||
-rw-r--r-- | arch/arm/mach-s3c2410/Makefile | 4 | ||||
-rw-r--r-- | arch/arm/mach-s3c2410/bast-ide.c | 112 | ||||
-rw-r--r-- | arch/arm/mach-s3c2410/mach-bast.c | 18 | ||||
-rw-r--r-- | arch/arm/mach-s3c2410/mach-vr1000.c | 28 |
5 files changed, 126 insertions, 45 deletions
diff --git a/arch/arm/mach-s3c2410/Kconfig b/arch/arm/mach-s3c2410/Kconfig index cd3dc0834b3b..69689701acfc 100644 --- a/arch/arm/mach-s3c2410/Kconfig +++ b/arch/arm/mach-s3c2410/Kconfig | |||
@@ -37,6 +37,12 @@ config S3C2410_CLOCK | |||
37 | help | 37 | help |
38 | Clock code for the S3C2410, and similar processors | 38 | Clock code for the S3C2410, and similar processors |
39 | 39 | ||
40 | config MACH_BAST_IDE | ||
41 | bool | ||
42 | select HAVE_PATA_PLATFORM | ||
43 | help | ||
44 | Internal node for machines with an BAST style IDE | ||
45 | interface | ||
40 | 46 | ||
41 | menu "S3C2410 Machines" | 47 | menu "S3C2410 Machines" |
42 | 48 | ||
@@ -70,6 +76,7 @@ config ARCH_BAST | |||
70 | bool "Simtec Electronics BAST (EB2410ITX)" | 76 | bool "Simtec Electronics BAST (EB2410ITX)" |
71 | select CPU_S3C2410 | 77 | select CPU_S3C2410 |
72 | select PM_SIMTEC if PM | 78 | select PM_SIMTEC if PM |
79 | select MACH_BAST_IDE | ||
73 | select ISA | 80 | select ISA |
74 | help | 81 | help |
75 | Say Y here if you are using the Simtec Electronics EB2410ITX | 82 | Say Y here if you are using the Simtec Electronics EB2410ITX |
@@ -107,6 +114,7 @@ config MACH_TCT_HAMMER | |||
107 | config MACH_VR1000 | 114 | config MACH_VR1000 |
108 | bool "Thorcom VR1000" | 115 | bool "Thorcom VR1000" |
109 | select PM_SIMTEC if PM | 116 | select PM_SIMTEC if PM |
117 | select MACH_BAST_IDE | ||
110 | select CPU_S3C2410 | 118 | select CPU_S3C2410 |
111 | help | 119 | help |
112 | Say Y here if you are using the Thorcom VR1000 board. | 120 | Say Y here if you are using the Thorcom VR1000 board. |
@@ -118,4 +126,3 @@ config MACH_QT2410 | |||
118 | Say Y here if you are using the Armzone QT2410 | 126 | Say Y here if you are using the Armzone QT2410 |
119 | 127 | ||
120 | endmenu | 128 | endmenu |
121 | |||
diff --git a/arch/arm/mach-s3c2410/Makefile b/arch/arm/mach-s3c2410/Makefile index cabc13ce09e4..8a4055dc858b 100644 --- a/arch/arm/mach-s3c2410/Makefile +++ b/arch/arm/mach-s3c2410/Makefile | |||
@@ -30,3 +30,7 @@ obj-$(CONFIG_BAST_PC104_IRQ) += bast-irq.o | |||
30 | obj-$(CONFIG_MACH_TCT_HAMMER) += mach-tct_hammer.o | 30 | obj-$(CONFIG_MACH_TCT_HAMMER) += mach-tct_hammer.o |
31 | obj-$(CONFIG_MACH_VR1000) += mach-vr1000.o usb-simtec.o | 31 | obj-$(CONFIG_MACH_VR1000) += mach-vr1000.o usb-simtec.o |
32 | obj-$(CONFIG_MACH_QT2410) += mach-qt2410.o | 32 | obj-$(CONFIG_MACH_QT2410) += mach-qt2410.o |
33 | |||
34 | # machine additions | ||
35 | |||
36 | obj-$(CONFIG_MACH_BAST_IDE) += bast-ide.o | ||
diff --git a/arch/arm/mach-s3c2410/bast-ide.c b/arch/arm/mach-s3c2410/bast-ide.c new file mode 100644 index 000000000000..df95fe37cdc8 --- /dev/null +++ b/arch/arm/mach-s3c2410/bast-ide.c | |||
@@ -0,0 +1,112 @@ | |||
1 | /* linux/arch/arm/mach-s3c2410/bast-ide.c | ||
2 | * | ||
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> | ||
7 | * | ||
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. | ||
11 | */ | ||
12 | |||
13 | #include <linux/kernel.h> | ||
14 | #include <linux/types.h> | ||
15 | #include <linux/init.h> | ||
16 | #include <linux/interrupt.h> | ||
17 | |||
18 | #include <linux/platform_device.h> | ||
19 | #include <linux/ata_platform.h> | ||
20 | |||
21 | #include <asm/mach-types.h> | ||
22 | |||
23 | #include <asm/mach/arch.h> | ||
24 | #include <asm/mach/map.h> | ||
25 | #include <asm/mach/irq.h> | ||
26 | |||
27 | #include <asm/arch/map.h> | ||
28 | #include <asm/arch/bast-map.h> | ||
29 | #include <asm/arch/bast-irq.h> | ||
30 | |||
31 | /* IDE ports */ | ||
32 | |||
33 | static struct pata_platform_info bast_ide_platdata = { | ||
34 | .ioport_shift = 5, | ||
35 | }; | ||
36 | |||
37 | #define IDE_CS S3C2410_CS5 | ||
38 | |||
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, | ||
44 | }, | ||
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, | ||
49 | }, | ||
50 | [2] = { | ||
51 | .start = IRQ_IDE0, | ||
52 | .end = IRQ_IDE0, | ||
53 | .flags = IORESOURCE_IRQ, | ||
54 | }, | ||
55 | }; | ||
56 | |||
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, | ||
65 | } | ||
66 | |||
67 | }; | ||
68 | |||
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, | ||
74 | }, | ||
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, | ||
79 | }, | ||
80 | [2] = { | ||
81 | .start = IRQ_IDE1, | ||
82 | .end = IRQ_IDE1, | ||
83 | .flags = IORESOURCE_IRQ, | ||
84 | }, | ||
85 | }; | ||
86 | |||
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, | ||
95 | } | ||
96 | }; | ||
97 | |||
98 | static struct platform_device *bast_ide_devices[] __initdata = { | ||
99 | &bast_device_ide0, | ||
100 | &bast_device_ide1, | ||
101 | }; | ||
102 | |||
103 | static __init int bast_ide_init(void) | ||
104 | { | ||
105 | if (machine_is_bast() || machine_is_vr1000()) | ||
106 | return platform_add_devices(bast_ide_devices, | ||
107 | ARRAY_SIZE(bast_ide_devices)); | ||
108 | |||
109 | return 0; | ||
110 | } | ||
111 | |||
112 | fs_initcall(bast_ide_init); | ||
diff --git a/arch/arm/mach-s3c2410/mach-bast.c b/arch/arm/mach-s3c2410/mach-bast.c index ae5b354c61c2..093be00c8eb5 100644 --- a/arch/arm/mach-s3c2410/mach-bast.c +++ b/arch/arm/mach-s3c2410/mach-bast.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/serial_core.h> | 20 | #include <linux/serial_core.h> |
21 | #include <linux/platform_device.h> | 21 | #include <linux/platform_device.h> |
22 | #include <linux/dm9000.h> | 22 | #include <linux/dm9000.h> |
23 | #include <linux/ata_platform.h> | ||
23 | 24 | ||
24 | #include <net/ax88796.h> | 25 | #include <net/ax88796.h> |
25 | 26 | ||
@@ -134,37 +135,21 @@ static struct map_desc bast_iodesc[] __initdata = { | |||
134 | { VA_C2(BAST_VA_ISAIO), PA_CS2(BAST_PA_ISAIO), SZ_16M, MT_DEVICE }, | 135 | { VA_C2(BAST_VA_ISAIO), PA_CS2(BAST_PA_ISAIO), SZ_16M, MT_DEVICE }, |
135 | { VA_C2(BAST_VA_ISAMEM), PA_CS2(BAST_PA_ISAMEM), SZ_16M, MT_DEVICE }, | 136 | { VA_C2(BAST_VA_ISAMEM), PA_CS2(BAST_PA_ISAMEM), SZ_16M, MT_DEVICE }, |
136 | { VA_C2(BAST_VA_SUPERIO), PA_CS2(BAST_PA_SUPERIO), SZ_1M, MT_DEVICE }, | 137 | { VA_C2(BAST_VA_SUPERIO), PA_CS2(BAST_PA_SUPERIO), SZ_1M, MT_DEVICE }, |
137 | { VA_C2(BAST_VA_IDEPRI), PA_CS3(BAST_PA_IDEPRI), SZ_1M, MT_DEVICE }, | ||
138 | { VA_C2(BAST_VA_IDESEC), PA_CS3(BAST_PA_IDESEC), SZ_1M, MT_DEVICE }, | ||
139 | { VA_C2(BAST_VA_IDEPRIAUX), PA_CS3(BAST_PA_IDEPRIAUX), SZ_1M, MT_DEVICE }, | ||
140 | { VA_C2(BAST_VA_IDESECAUX), PA_CS3(BAST_PA_IDESECAUX), SZ_1M, MT_DEVICE }, | ||
141 | 138 | ||
142 | /* slow, word */ | 139 | /* slow, word */ |
143 | { VA_C3(BAST_VA_ISAIO), PA_CS3(BAST_PA_ISAIO), SZ_16M, MT_DEVICE }, | 140 | { VA_C3(BAST_VA_ISAIO), PA_CS3(BAST_PA_ISAIO), SZ_16M, MT_DEVICE }, |
144 | { VA_C3(BAST_VA_ISAMEM), PA_CS3(BAST_PA_ISAMEM), SZ_16M, MT_DEVICE }, | 141 | { VA_C3(BAST_VA_ISAMEM), PA_CS3(BAST_PA_ISAMEM), SZ_16M, MT_DEVICE }, |
145 | { VA_C3(BAST_VA_SUPERIO), PA_CS3(BAST_PA_SUPERIO), SZ_1M, MT_DEVICE }, | 142 | { VA_C3(BAST_VA_SUPERIO), PA_CS3(BAST_PA_SUPERIO), SZ_1M, MT_DEVICE }, |
146 | { VA_C3(BAST_VA_IDEPRI), PA_CS3(BAST_PA_IDEPRI), SZ_1M, MT_DEVICE }, | ||
147 | { VA_C3(BAST_VA_IDESEC), PA_CS3(BAST_PA_IDESEC), SZ_1M, MT_DEVICE }, | ||
148 | { VA_C3(BAST_VA_IDEPRIAUX), PA_CS3(BAST_PA_IDEPRIAUX), SZ_1M, MT_DEVICE }, | ||
149 | { VA_C3(BAST_VA_IDESECAUX), PA_CS3(BAST_PA_IDESECAUX), SZ_1M, MT_DEVICE }, | ||
150 | 143 | ||
151 | /* fast, byte */ | 144 | /* fast, byte */ |
152 | { VA_C4(BAST_VA_ISAIO), PA_CS4(BAST_PA_ISAIO), SZ_16M, MT_DEVICE }, | 145 | { VA_C4(BAST_VA_ISAIO), PA_CS4(BAST_PA_ISAIO), SZ_16M, MT_DEVICE }, |
153 | { VA_C4(BAST_VA_ISAMEM), PA_CS4(BAST_PA_ISAMEM), SZ_16M, MT_DEVICE }, | 146 | { VA_C4(BAST_VA_ISAMEM), PA_CS4(BAST_PA_ISAMEM), SZ_16M, MT_DEVICE }, |
154 | { VA_C4(BAST_VA_SUPERIO), PA_CS4(BAST_PA_SUPERIO), SZ_1M, MT_DEVICE }, | 147 | { VA_C4(BAST_VA_SUPERIO), PA_CS4(BAST_PA_SUPERIO), SZ_1M, MT_DEVICE }, |
155 | { VA_C4(BAST_VA_IDEPRI), PA_CS5(BAST_PA_IDEPRI), SZ_1M, MT_DEVICE }, | ||
156 | { VA_C4(BAST_VA_IDESEC), PA_CS5(BAST_PA_IDESEC), SZ_1M, MT_DEVICE }, | ||
157 | { VA_C4(BAST_VA_IDEPRIAUX), PA_CS5(BAST_PA_IDEPRIAUX), SZ_1M, MT_DEVICE }, | ||
158 | { VA_C4(BAST_VA_IDESECAUX), PA_CS5(BAST_PA_IDESECAUX), SZ_1M, MT_DEVICE }, | ||
159 | 148 | ||
160 | /* fast, word */ | 149 | /* fast, word */ |
161 | { VA_C5(BAST_VA_ISAIO), PA_CS5(BAST_PA_ISAIO), SZ_16M, MT_DEVICE }, | 150 | { VA_C5(BAST_VA_ISAIO), PA_CS5(BAST_PA_ISAIO), SZ_16M, MT_DEVICE }, |
162 | { VA_C5(BAST_VA_ISAMEM), PA_CS5(BAST_PA_ISAMEM), SZ_16M, MT_DEVICE }, | 151 | { VA_C5(BAST_VA_ISAMEM), PA_CS5(BAST_PA_ISAMEM), SZ_16M, MT_DEVICE }, |
163 | { VA_C5(BAST_VA_SUPERIO), PA_CS5(BAST_PA_SUPERIO), SZ_1M, MT_DEVICE }, | 152 | { VA_C5(BAST_VA_SUPERIO), PA_CS5(BAST_PA_SUPERIO), SZ_1M, MT_DEVICE }, |
164 | { VA_C5(BAST_VA_IDEPRI), PA_CS5(BAST_PA_IDEPRI), SZ_1M, MT_DEVICE }, | ||
165 | { VA_C5(BAST_VA_IDESEC), PA_CS5(BAST_PA_IDESEC), SZ_1M, MT_DEVICE }, | ||
166 | { VA_C5(BAST_VA_IDEPRIAUX), PA_CS5(BAST_PA_IDEPRIAUX), SZ_1M, MT_DEVICE }, | ||
167 | { VA_C5(BAST_VA_IDESECAUX), PA_CS5(BAST_PA_IDESECAUX), SZ_1M, MT_DEVICE }, | ||
168 | }; | 153 | }; |
169 | 154 | ||
170 | #define UCON S3C2410_UCON_DEFAULT | S3C2410_UCON_UCLK | 155 | #define UCON S3C2410_UCON_DEFAULT | S3C2410_UCON_UCLK |
@@ -564,6 +549,7 @@ static struct s3c2410fb_mach_info __initdata bast_fb_info = { | |||
564 | .default_display = 1, | 549 | .default_display = 1, |
565 | }; | 550 | }; |
566 | 551 | ||
552 | |||
567 | /* Standard BAST devices */ | 553 | /* Standard BAST devices */ |
568 | 554 | ||
569 | static struct platform_device *bast_devices[] __initdata = { | 555 | static struct platform_device *bast_devices[] __initdata = { |
diff --git a/arch/arm/mach-s3c2410/mach-vr1000.c b/arch/arm/mach-s3c2410/mach-vr1000.c index 4c4c9af550d0..1d0a0284f336 100644 --- a/arch/arm/mach-s3c2410/mach-vr1000.c +++ b/arch/arm/mach-s3c2410/mach-vr1000.c | |||
@@ -97,34 +97,6 @@ static struct map_desc vr1000_iodesc[] __initdata = { | |||
97 | .length = SZ_1M, | 97 | .length = SZ_1M, |
98 | .type = MT_DEVICE, | 98 | .type = MT_DEVICE, |
99 | }, | 99 | }, |
100 | |||
101 | /* peripheral space... one for each of fast/slow/byte/16bit */ | ||
102 | /* note, ide is only decoded in word space, even though some registers | ||
103 | * are only 8bit */ | ||
104 | |||
105 | /* slow, byte */ | ||
106 | { VA_C2(VR1000_VA_IDEPRI), PA_CS3(VR1000_PA_IDEPRI), SZ_1M, MT_DEVICE }, | ||
107 | { VA_C2(VR1000_VA_IDESEC), PA_CS3(VR1000_PA_IDESEC), SZ_1M, MT_DEVICE }, | ||
108 | { VA_C2(VR1000_VA_IDEPRIAUX), PA_CS3(VR1000_PA_IDEPRIAUX), SZ_1M, MT_DEVICE }, | ||
109 | { VA_C2(VR1000_VA_IDESECAUX), PA_CS3(VR1000_PA_IDESECAUX), SZ_1M, MT_DEVICE }, | ||
110 | |||
111 | /* slow, word */ | ||
112 | { VA_C3(VR1000_VA_IDEPRI), PA_CS3(VR1000_PA_IDEPRI), SZ_1M, MT_DEVICE }, | ||
113 | { VA_C3(VR1000_VA_IDESEC), PA_CS3(VR1000_PA_IDESEC), SZ_1M, MT_DEVICE }, | ||
114 | { VA_C3(VR1000_VA_IDEPRIAUX), PA_CS3(VR1000_PA_IDEPRIAUX), SZ_1M, MT_DEVICE }, | ||
115 | { VA_C3(VR1000_VA_IDESECAUX), PA_CS3(VR1000_PA_IDESECAUX), SZ_1M, MT_DEVICE }, | ||
116 | |||
117 | /* fast, byte */ | ||
118 | { VA_C4(VR1000_VA_IDEPRI), PA_CS5(VR1000_PA_IDEPRI), SZ_1M, MT_DEVICE }, | ||
119 | { VA_C4(VR1000_VA_IDESEC), PA_CS5(VR1000_PA_IDESEC), SZ_1M, MT_DEVICE }, | ||
120 | { VA_C4(VR1000_VA_IDEPRIAUX), PA_CS5(VR1000_PA_IDEPRIAUX), SZ_1M, MT_DEVICE }, | ||
121 | { VA_C4(VR1000_VA_IDESECAUX), PA_CS5(VR1000_PA_IDESECAUX), SZ_1M, MT_DEVICE }, | ||
122 | |||
123 | /* fast, word */ | ||
124 | { VA_C5(VR1000_VA_IDEPRI), PA_CS5(VR1000_PA_IDEPRI), SZ_1M, MT_DEVICE }, | ||
125 | { VA_C5(VR1000_VA_IDESEC), PA_CS5(VR1000_PA_IDESEC), SZ_1M, MT_DEVICE }, | ||
126 | { VA_C5(VR1000_VA_IDEPRIAUX), PA_CS5(VR1000_PA_IDEPRIAUX), SZ_1M, MT_DEVICE }, | ||
127 | { VA_C5(VR1000_VA_IDESECAUX), PA_CS5(VR1000_PA_IDESECAUX), SZ_1M, MT_DEVICE }, | ||
128 | }; | 100 | }; |
129 | 101 | ||
130 | #define UCON S3C2410_UCON_DEFAULT | S3C2410_UCON_UCLK | 102 | #define UCON S3C2410_UCON_DEFAULT | S3C2410_UCON_UCLK |