diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-01-26 14:13:07 -0500 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-01-26 14:13:07 -0500 |
commit | ade2daf9c6e57845fe83a24e0a9fa1c03c6e91b1 (patch) | |
tree | 68070062d6306442caee50630c4213c911eb9064 /drivers/ide/legacy | |
parent | 8ac4ce742c66100931b6f2d7a36b0df08bc721fe (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/Makefile | 19 | ||||
-rw-r--r-- | drivers/ide/legacy/ali14xx.c | 5 | ||||
-rw-r--r-- | drivers/ide/legacy/buddha.c | 6 | ||||
-rw-r--r-- | drivers/ide/legacy/dtc2278.c | 5 | ||||
-rw-r--r-- | drivers/ide/legacy/falconide.c | 7 | ||||
-rw-r--r-- | drivers/ide/legacy/gayle.c | 10 | ||||
-rw-r--r-- | drivers/ide/legacy/ht6560b.c | 5 | ||||
-rw-r--r-- | drivers/ide/legacy/macide.c | 8 | ||||
-rw-r--r-- | drivers/ide/legacy/q40ide.c | 7 | ||||
-rw-r--r-- | drivers/ide/legacy/qd65xx.c | 5 | ||||
-rw-r--r-- | drivers/ide/legacy/umc8672.c | 5 |
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 | |||
2 | obj-$(CONFIG_BLK_DEV_ALI14XX) += ali14xx.o | 4 | obj-$(CONFIG_BLK_DEV_ALI14XX) += ali14xx.o |
5 | obj-$(CONFIG_BLK_DEV_UMC8672) += umc8672.o | ||
3 | obj-$(CONFIG_BLK_DEV_DTC2278) += dtc2278.o | 6 | obj-$(CONFIG_BLK_DEV_DTC2278) += dtc2278.o |
4 | obj-$(CONFIG_BLK_DEV_HT6560B) += ht6560b.o | 7 | obj-$(CONFIG_BLK_DEV_HT6560B) += ht6560b.o |
5 | obj-$(CONFIG_BLK_DEV_QD65XX) += qd65xx.o | 8 | obj-$(CONFIG_BLK_DEV_QD65XX) += qd65xx.o |
6 | obj-$(CONFIG_BLK_DEV_UMC8672) += umc8672.o | ||
7 | 9 | ||
8 | obj-$(CONFIG_BLK_DEV_IDECS) += ide-cs.o | 10 | obj-$(CONFIG_BLK_DEV_GAYLE) += gayle.o |
11 | obj-$(CONFIG_BLK_DEV_FALCON_IDE) += falconide.o | ||
12 | obj-$(CONFIG_BLK_DEV_MAC_IDE) += macide.o | ||
13 | obj-$(CONFIG_BLK_DEV_Q40IDE) += q40ide.o | ||
14 | obj-$(CONFIG_BLK_DEV_BUDDHA) += buddha.o | ||
9 | 15 | ||
10 | obj-$(CONFIG_BLK_DEV_PLATFORM) += ide_platform.o | 16 | ifeq ($(CONFIG_BLK_DEV_IDECS), m) |
17 | obj-m += ide-cs.o | ||
18 | endif | ||
11 | 19 | ||
12 | # Last of all | 20 | ifeq ($(CONFIG_BLK_DEV_PLATFORM), m) |
13 | obj-$(CONFIG_BLK_DEV_HD) += hd.o | 21 | obj-m += ide_platform.o |
22 | endif | ||
14 | 23 | ||
15 | EXTRA_CFLAGS := -Idrivers/ide | 24 | EXTRA_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; | |||
231 | module_param_named(probe, probe_ali14xx, bool, 0); | 231 | module_param_named(probe, probe_ali14xx, bool, 0); |
232 | MODULE_PARM_DESC(probe, "probe for ALI M14xx chipsets"); | 232 | MODULE_PARM_DESC(probe, "probe for ALI M14xx chipsets"); |
233 | 233 | ||
234 | /* Can be called directly from ide.c. */ | 234 | static int __init ali14xx_init(void) |
235 | int __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 | ||
252 | module_init(ali14xx_init); | 250 | module_init(ali14xx_init); |
253 | #endif | ||
254 | 251 | ||
255 | MODULE_AUTHOR("see local file"); | 252 | MODULE_AUTHOR("see local file"); |
256 | MODULE_DESCRIPTION("support of ALI 14XX IDE chipsets"); | 253 | MODULE_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 | ||
146 | void __init buddha_init(void) | 146 | static 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 | |||
250 | module_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; | |||
150 | module_param_named(probe, probe_dtc2278, bool, 0); | 150 | module_param_named(probe, probe_dtc2278, bool, 0); |
151 | MODULE_PARM_DESC(probe, "probe for DTC2278xx chipsets"); | 151 | MODULE_PARM_DESC(probe, "probe for DTC2278xx chipsets"); |
152 | 152 | ||
153 | /* Can be called directly from ide.c. */ | 153 | static int __init dtc2278_init(void) |
154 | int __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 | ||
167 | module_init(dtc2278_init); | 165 | module_init(dtc2278_init); |
168 | #endif | ||
169 | 166 | ||
170 | MODULE_AUTHOR("See Local File"); | 167 | MODULE_AUTHOR("See Local File"); |
171 | MODULE_DESCRIPTION("support of DTC-2278 VLB IDE chipsets"); | 168 | MODULE_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 | ||
65 | void __init falconide_init(void) | 65 | static 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 | |||
92 | module_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 | ||
113 | void __init gayle_init(void) | 113 | static 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 | ||
131 | found: | 131 | found: |
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 | |||
198 | module_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; | |||
307 | module_param_named(probe, probe_ht6560b, bool, 0); | 307 | module_param_named(probe, probe_ht6560b, bool, 0); |
308 | MODULE_PARM_DESC(probe, "probe for HT6560B chipset"); | 308 | MODULE_PARM_DESC(probe, "probe for HT6560B chipset"); |
309 | 309 | ||
310 | /* Can be called directly from ide.c. */ | 310 | static int __init ht6560b_init(void) |
311 | int __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 | ||
373 | module_init(ht6560b_init); | 371 | module_init(ht6560b_init); |
374 | #endif | ||
375 | 372 | ||
376 | MODULE_AUTHOR("See Local File"); | 373 | MODULE_AUTHOR("See Local File"); |
377 | MODULE_DESCRIPTION("HT-6560B EIDE-controller support"); | 374 | MODULE_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 | ||
84 | void __init macide_init(void) | 84 | static 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 | |||
146 | module_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 | ||
114 | void __init q40ide_init(void) | 114 | static 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 | ||
160 | module_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; | |||
478 | module_param_named(probe, probe_qd65xx, bool, 0); | 478 | module_param_named(probe, probe_qd65xx, bool, 0); |
479 | MODULE_PARM_DESC(probe, "probe for QD65xx chipsets"); | 479 | MODULE_PARM_DESC(probe, "probe for QD65xx chipsets"); |
480 | 480 | ||
481 | /* Can be called directly from ide.c. */ | 481 | static int __init qd65xx_init(void) |
482 | int __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 | ||
496 | module_init(qd65xx_init); | 494 | module_init(qd65xx_init); |
497 | #endif | ||
498 | 495 | ||
499 | MODULE_AUTHOR("Samuel Thibault"); | 496 | MODULE_AUTHOR("Samuel Thibault"); |
500 | MODULE_DESCRIPTION("support of qd65xx vlb ide chipset"); | 497 | MODULE_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; | |||
169 | module_param_named(probe, probe_umc8672, bool, 0); | 169 | module_param_named(probe, probe_umc8672, bool, 0); |
170 | MODULE_PARM_DESC(probe, "probe for UMC8672 chipset"); | 170 | MODULE_PARM_DESC(probe, "probe for UMC8672 chipset"); |
171 | 171 | ||
172 | /* Can be called directly from ide.c. */ | 172 | static int __init umc8672_init(void) |
173 | int __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 | ||
185 | module_init(umc8672_init); | 183 | module_init(umc8672_init); |
186 | #endif | ||
187 | 184 | ||
188 | MODULE_AUTHOR("Wolfram Podien"); | 185 | MODULE_AUTHOR("Wolfram Podien"); |
189 | MODULE_DESCRIPTION("Support for UMC 8672 IDE chipset"); | 186 | MODULE_DESCRIPTION("Support for UMC 8672 IDE chipset"); |