aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/legacy
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-01-26 14:13:07 -0500
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-01-26 14:13:07 -0500
commitade2daf9c6e57845fe83a24e0a9fa1c03c6e91b1 (patch)
tree68070062d6306442caee50630c4213c911eb9064 /drivers/ide/legacy
parent8ac4ce742c66100931b6f2d7a36b0df08bc721fe (diff)
ide: make remaining built-in only IDE host drivers modular (take 2)
* Make remaining built-in only IDE host drivers modular, add ide-scan-pci.c file for probing PCI host drivers registered with IDE core (special case for built-in IDE and CONFIG_IDEPCI_PCIBUS_ORDER=y) and then take care of the ordering in which all IDE host drivers are probed when IDE is built-in during link time. * Move probing of gayle, falconide, macide, q40ide and buddha (m68k arch specific) host drivers, before PCI ones (no PCI on m68k), ide-cris (cris arch specific), cmd640 (x86 arch specific) and pmac (ppc arch specific). * Move probing of ide-cris (cris arch specific) host driver before cmd640 (x86 arch specific). * Move probing of mpc8xx (ppc specific) host driver before ide-pnp (depends on ISA and none of ppc platform that use mpc8xx supports ISA) and ide-h8300 (h8300 arch specific). * Add "probe_vlb" kernel parameter to cmd640 host driver and update Documentation/ide.txt accordingly. * Make IDE_ARM config option visible so it can also be disabled if needed. * Remove bogus comment from ide.c while at it. v2: * Fix two issues spotted by Sergei: - replace ENOMEM error value by ENOENT in ide-h8300 host driver - fix MODULE_PARM_DESC() in cmd640 host driver Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com> Cc: Mikael Starvik <starvik@axis.com> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Roman Zippel <zippel@linux-m68k.org> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/legacy')
-rw-r--r--drivers/ide/legacy/Makefile19
-rw-r--r--drivers/ide/legacy/ali14xx.c5
-rw-r--r--drivers/ide/legacy/buddha.c6
-rw-r--r--drivers/ide/legacy/dtc2278.c5
-rw-r--r--drivers/ide/legacy/falconide.c7
-rw-r--r--drivers/ide/legacy/gayle.c10
-rw-r--r--drivers/ide/legacy/ht6560b.c5
-rw-r--r--drivers/ide/legacy/macide.c8
-rw-r--r--drivers/ide/legacy/q40ide.c7
-rw-r--r--drivers/ide/legacy/qd65xx.c5
-rw-r--r--drivers/ide/legacy/umc8672.c5
11 files changed, 48 insertions, 34 deletions
diff --git a/drivers/ide/legacy/Makefile b/drivers/ide/legacy/Makefile
index 409822349f10..7043ec7d1e05 100644
--- a/drivers/ide/legacy/Makefile
+++ b/drivers/ide/legacy/Makefile
@@ -1,15 +1,24 @@
1 1
2# link order is important here
3
2obj-$(CONFIG_BLK_DEV_ALI14XX) += ali14xx.o 4obj-$(CONFIG_BLK_DEV_ALI14XX) += ali14xx.o
5obj-$(CONFIG_BLK_DEV_UMC8672) += umc8672.o
3obj-$(CONFIG_BLK_DEV_DTC2278) += dtc2278.o 6obj-$(CONFIG_BLK_DEV_DTC2278) += dtc2278.o
4obj-$(CONFIG_BLK_DEV_HT6560B) += ht6560b.o 7obj-$(CONFIG_BLK_DEV_HT6560B) += ht6560b.o
5obj-$(CONFIG_BLK_DEV_QD65XX) += qd65xx.o 8obj-$(CONFIG_BLK_DEV_QD65XX) += qd65xx.o
6obj-$(CONFIG_BLK_DEV_UMC8672) += umc8672.o
7 9
8obj-$(CONFIG_BLK_DEV_IDECS) += ide-cs.o 10obj-$(CONFIG_BLK_DEV_GAYLE) += gayle.o
11obj-$(CONFIG_BLK_DEV_FALCON_IDE) += falconide.o
12obj-$(CONFIG_BLK_DEV_MAC_IDE) += macide.o
13obj-$(CONFIG_BLK_DEV_Q40IDE) += q40ide.o
14obj-$(CONFIG_BLK_DEV_BUDDHA) += buddha.o
9 15
10obj-$(CONFIG_BLK_DEV_PLATFORM) += ide_platform.o 16ifeq ($(CONFIG_BLK_DEV_IDECS), m)
17 obj-m += ide-cs.o
18endif
11 19
12# Last of all 20ifeq ($(CONFIG_BLK_DEV_PLATFORM), m)
13obj-$(CONFIG_BLK_DEV_HD) += hd.o 21 obj-m += ide_platform.o
22endif
14 23
15EXTRA_CFLAGS := -Idrivers/ide 24EXTRA_CFLAGS := -Idrivers/ide
diff --git a/drivers/ide/legacy/ali14xx.c b/drivers/ide/legacy/ali14xx.c
index 38c3a6d63f30..5ec0be4cbad7 100644
--- a/drivers/ide/legacy/ali14xx.c
+++ b/drivers/ide/legacy/ali14xx.c
@@ -231,8 +231,7 @@ int probe_ali14xx = 0;
231module_param_named(probe, probe_ali14xx, bool, 0); 231module_param_named(probe, probe_ali14xx, bool, 0);
232MODULE_PARM_DESC(probe, "probe for ALI M14xx chipsets"); 232MODULE_PARM_DESC(probe, "probe for ALI M14xx chipsets");
233 233
234/* Can be called directly from ide.c. */ 234static int __init ali14xx_init(void)
235int __init ali14xx_init(void)
236{ 235{
237 if (probe_ali14xx == 0) 236 if (probe_ali14xx == 0)
238 goto out; 237 goto out;
@@ -248,9 +247,7 @@ out:
248 return -ENODEV; 247 return -ENODEV;
249} 248}
250 249
251#ifdef MODULE
252module_init(ali14xx_init); 250module_init(ali14xx_init);
253#endif
254 251
255MODULE_AUTHOR("see local file"); 252MODULE_AUTHOR("see local file");
256MODULE_DESCRIPTION("support of ALI 14XX IDE chipsets"); 253MODULE_DESCRIPTION("support of ALI 14XX IDE chipsets");
diff --git a/drivers/ide/legacy/buddha.c b/drivers/ide/legacy/buddha.c
index ba64c4b9f918..e97766aef374 100644
--- a/drivers/ide/legacy/buddha.c
+++ b/drivers/ide/legacy/buddha.c
@@ -143,7 +143,7 @@ static int xsurf_ack_intr(ide_hwif_t *hwif)
143 * Probe for a Buddha or Catweasel IDE interface 143 * Probe for a Buddha or Catweasel IDE interface
144 */ 144 */
145 145
146void __init buddha_init(void) 146static int __init buddha_init(void)
147{ 147{
148 hw_regs_t hw; 148 hw_regs_t hw;
149 ide_hwif_t *hwif; 149 ide_hwif_t *hwif;
@@ -243,4 +243,8 @@ fail_base2:
243 243
244 ide_device_add(idx); 244 ide_device_add(idx);
245 } 245 }
246
247 return 0;
246} 248}
249
250module_init(buddha_init);
diff --git a/drivers/ide/legacy/dtc2278.c b/drivers/ide/legacy/dtc2278.c
index 24a845d45bd2..13eee6da2806 100644
--- a/drivers/ide/legacy/dtc2278.c
+++ b/drivers/ide/legacy/dtc2278.c
@@ -150,8 +150,7 @@ int probe_dtc2278 = 0;
150module_param_named(probe, probe_dtc2278, bool, 0); 150module_param_named(probe, probe_dtc2278, bool, 0);
151MODULE_PARM_DESC(probe, "probe for DTC2278xx chipsets"); 151MODULE_PARM_DESC(probe, "probe for DTC2278xx chipsets");
152 152
153/* Can be called directly from ide.c. */ 153static int __init dtc2278_init(void)
154int __init dtc2278_init(void)
155{ 154{
156 if (probe_dtc2278 == 0) 155 if (probe_dtc2278 == 0)
157 return -ENODEV; 156 return -ENODEV;
@@ -163,9 +162,7 @@ int __init dtc2278_init(void)
163 return 0; 162 return 0;
164} 163}
165 164
166#ifdef MODULE
167module_init(dtc2278_init); 165module_init(dtc2278_init);
168#endif
169 166
170MODULE_AUTHOR("See Local File"); 167MODULE_AUTHOR("See Local File");
171MODULE_DESCRIPTION("support of DTC-2278 VLB IDE chipsets"); 168MODULE_DESCRIPTION("support of DTC-2278 VLB IDE chipsets");
diff --git a/drivers/ide/legacy/falconide.c b/drivers/ide/legacy/falconide.c
index c1a84540beb1..dec2ef99c778 100644
--- a/drivers/ide/legacy/falconide.c
+++ b/drivers/ide/legacy/falconide.c
@@ -62,7 +62,7 @@ EXPORT_SYMBOL(falconide_intr_lock);
62 * Probe for a Falcon IDE interface 62 * Probe for a Falcon IDE interface
63 */ 63 */
64 64
65void __init falconide_init(void) 65static int __init falconide_init(void)
66{ 66{
67 if (MACH_IS_ATARI && ATARIHW_PRESENT(IDE)) { 67 if (MACH_IS_ATARI && ATARIHW_PRESENT(IDE)) {
68 hw_regs_t hw; 68 hw_regs_t hw;
@@ -84,4 +84,9 @@ void __init falconide_init(void)
84 84
85 ide_device_add(idx); 85 ide_device_add(idx);
86 } 86 }
87 }
88
89 return 0;
87} 90}
91
92module_init(falconide_init);
diff --git a/drivers/ide/legacy/gayle.c b/drivers/ide/legacy/gayle.c
index ec53dc9b483c..e21ef75c9055 100644
--- a/drivers/ide/legacy/gayle.c
+++ b/drivers/ide/legacy/gayle.c
@@ -110,13 +110,13 @@ static int gayle_ack_intr_a1200(ide_hwif_t *hwif)
110 * Probe for a Gayle IDE interface (and optionally for an IDE doubler) 110 * Probe for a Gayle IDE interface (and optionally for an IDE doubler)
111 */ 111 */
112 112
113void __init gayle_init(void) 113static int __init gayle_init(void)
114{ 114{
115 int a4000, i; 115 int a4000, i;
116 u8 idx[4] = { 0xff, 0xff, 0xff, 0xff }; 116 u8 idx[4] = { 0xff, 0xff, 0xff, 0xff };
117 117
118 if (!MACH_IS_AMIGA) 118 if (!MACH_IS_AMIGA)
119 return; 119 return -ENODEV;
120 120
121 if ((a4000 = AMIGAHW_PRESENT(A4000_IDE)) || AMIGAHW_PRESENT(A1200_IDE)) 121 if ((a4000 = AMIGAHW_PRESENT(A4000_IDE)) || AMIGAHW_PRESENT(A1200_IDE))
122 goto found; 122 goto found;
@@ -126,7 +126,7 @@ void __init gayle_init(void)
126 NULL)) 126 NULL))
127 goto found; 127 goto found;
128#endif 128#endif
129 return; 129 return -ENODEV;
130 130
131found: 131found:
132 for (i = 0; i < GAYLE_NUM_PROBE_HWIFS; i++) { 132 for (i = 0; i < GAYLE_NUM_PROBE_HWIFS; i++) {
@@ -191,4 +191,8 @@ found:
191 } 191 }
192 192
193 ide_device_add(idx); 193 ide_device_add(idx);
194
195 return 0;
194} 196}
197
198module_init(gayle_init);
diff --git a/drivers/ide/legacy/ht6560b.c b/drivers/ide/legacy/ht6560b.c
index a4245d13f11b..8da5031a6d05 100644
--- a/drivers/ide/legacy/ht6560b.c
+++ b/drivers/ide/legacy/ht6560b.c
@@ -307,8 +307,7 @@ int probe_ht6560b = 0;
307module_param_named(probe, probe_ht6560b, bool, 0); 307module_param_named(probe, probe_ht6560b, bool, 0);
308MODULE_PARM_DESC(probe, "probe for HT6560B chipset"); 308MODULE_PARM_DESC(probe, "probe for HT6560B chipset");
309 309
310/* Can be called directly from ide.c. */ 310static int __init ht6560b_init(void)
311int __init ht6560b_init(void)
312{ 311{
313 ide_hwif_t *hwif, *mate; 312 ide_hwif_t *hwif, *mate;
314 static u8 idx[4] = { 0, 1, 0xff, 0xff }; 313 static u8 idx[4] = { 0, 1, 0xff, 0xff };
@@ -369,9 +368,7 @@ release_region:
369 return -ENODEV; 368 return -ENODEV;
370} 369}
371 370
372#ifdef MODULE
373module_init(ht6560b_init); 371module_init(ht6560b_init);
374#endif
375 372
376MODULE_AUTHOR("See Local File"); 373MODULE_AUTHOR("See Local File");
377MODULE_DESCRIPTION("HT-6560B EIDE-controller support"); 374MODULE_DESCRIPTION("HT-6560B EIDE-controller support");
diff --git a/drivers/ide/legacy/macide.c b/drivers/ide/legacy/macide.c
index c1b7881c280a..6b3e960350aa 100644
--- a/drivers/ide/legacy/macide.c
+++ b/drivers/ide/legacy/macide.c
@@ -81,7 +81,7 @@ int macide_ack_intr(ide_hwif_t* hwif)
81 * Probe for a Macintosh IDE interface 81 * Probe for a Macintosh IDE interface
82 */ 82 */
83 83
84void __init macide_init(void) 84static int __init macide_init(void)
85{ 85{
86 hw_regs_t hw; 86 hw_regs_t hw;
87 ide_hwif_t *hwif; 87 ide_hwif_t *hwif;
@@ -106,7 +106,7 @@ void __init macide_init(void)
106 IRQ_BABOON_1); 106 IRQ_BABOON_1);
107 break; 107 break;
108 default: 108 default:
109 return; 109 return -ENODEV;
110 } 110 }
111 111
112 hwif = ide_find_port(hw.io_ports[IDE_DATA_OFFSET]); 112 hwif = ide_find_port(hw.io_ports[IDE_DATA_OFFSET]);
@@ -139,4 +139,8 @@ void __init macide_init(void)
139 139
140 ide_device_add(idx); 140 ide_device_add(idx);
141 } 141 }
142
143 return 0;
142} 144}
145
146module_init(macide_init);
diff --git a/drivers/ide/legacy/q40ide.c b/drivers/ide/legacy/q40ide.c
index 2082e9c6efd9..0154c91ee4b1 100644
--- a/drivers/ide/legacy/q40ide.c
+++ b/drivers/ide/legacy/q40ide.c
@@ -111,7 +111,7 @@ static const char *q40_ide_names[Q40IDE_NUM_HWIFS]={
111 * Probe for Q40 IDE interfaces 111 * Probe for Q40 IDE interfaces
112 */ 112 */
113 113
114void __init q40ide_init(void) 114static int __init q40ide_init(void)
115{ 115{
116 int i; 116 int i;
117 ide_hwif_t *hwif; 117 ide_hwif_t *hwif;
@@ -119,7 +119,7 @@ void __init q40ide_init(void)
119 u8 idx[4] = { 0xff, 0xff, 0xff, 0xff }; 119 u8 idx[4] = { 0xff, 0xff, 0xff, 0xff };
120 120
121 if (!MACH_IS_Q40) 121 if (!MACH_IS_Q40)
122 return ; 122 return -ENODEV;
123 123
124 for (i = 0; i < Q40IDE_NUM_HWIFS; i++) { 124 for (i = 0; i < Q40IDE_NUM_HWIFS; i++) {
125 hw_regs_t hw; 125 hw_regs_t hw;
@@ -153,5 +153,8 @@ void __init q40ide_init(void)
153 } 153 }
154 154
155 ide_device_add(idx); 155 ide_device_add(idx);
156
157 return 0;
156} 158}
157 159
160module_init(q40ide_init);
diff --git a/drivers/ide/legacy/qd65xx.c b/drivers/ide/legacy/qd65xx.c
index 912e73853faa..2bac4c1a6532 100644
--- a/drivers/ide/legacy/qd65xx.c
+++ b/drivers/ide/legacy/qd65xx.c
@@ -478,8 +478,7 @@ int probe_qd65xx = 0;
478module_param_named(probe, probe_qd65xx, bool, 0); 478module_param_named(probe, probe_qd65xx, bool, 0);
479MODULE_PARM_DESC(probe, "probe for QD65xx chipsets"); 479MODULE_PARM_DESC(probe, "probe for QD65xx chipsets");
480 480
481/* Can be called directly from ide.c. */ 481static int __init qd65xx_init(void)
482int __init qd65xx_init(void)
483{ 482{
484 if (probe_qd65xx == 0) 483 if (probe_qd65xx == 0)
485 return -ENODEV; 484 return -ENODEV;
@@ -492,9 +491,7 @@ int __init qd65xx_init(void)
492 return 0; 491 return 0;
493} 492}
494 493
495#ifdef MODULE
496module_init(qd65xx_init); 494module_init(qd65xx_init);
497#endif
498 495
499MODULE_AUTHOR("Samuel Thibault"); 496MODULE_AUTHOR("Samuel Thibault");
500MODULE_DESCRIPTION("support of qd65xx vlb ide chipset"); 497MODULE_DESCRIPTION("support of qd65xx vlb ide chipset");
diff --git a/drivers/ide/legacy/umc8672.c b/drivers/ide/legacy/umc8672.c
index 79577b916874..a1ae1ae6699d 100644
--- a/drivers/ide/legacy/umc8672.c
+++ b/drivers/ide/legacy/umc8672.c
@@ -169,8 +169,7 @@ int probe_umc8672 = 0;
169module_param_named(probe, probe_umc8672, bool, 0); 169module_param_named(probe, probe_umc8672, bool, 0);
170MODULE_PARM_DESC(probe, "probe for UMC8672 chipset"); 170MODULE_PARM_DESC(probe, "probe for UMC8672 chipset");
171 171
172/* Can be called directly from ide.c. */ 172static int __init umc8672_init(void)
173int __init umc8672_init(void)
174{ 173{
175 if (probe_umc8672 == 0) 174 if (probe_umc8672 == 0)
176 goto out; 175 goto out;
@@ -181,9 +180,7 @@ out:
181 return -ENODEV;; 180 return -ENODEV;;
182} 181}
183 182
184#ifdef MODULE
185module_init(umc8672_init); 183module_init(umc8672_init);
186#endif
187 184
188MODULE_AUTHOR("Wolfram Podien"); 185MODULE_AUTHOR("Wolfram Podien");
189MODULE_DESCRIPTION("Support for UMC 8672 IDE chipset"); 186MODULE_DESCRIPTION("Support for UMC 8672 IDE chipset");