diff options
Diffstat (limited to 'drivers/macintosh/mediabay.c')
-rw-r--r-- | drivers/macintosh/mediabay.c | 56 |
1 files changed, 28 insertions, 28 deletions
diff --git a/drivers/macintosh/mediabay.c b/drivers/macintosh/mediabay.c index c0712a1ea5af..b856bb67169c 100644 --- a/drivers/macintosh/mediabay.c +++ b/drivers/macintosh/mediabay.c | |||
@@ -167,19 +167,19 @@ enum { | |||
167 | * Functions for polling content of media bay | 167 | * Functions for polling content of media bay |
168 | */ | 168 | */ |
169 | 169 | ||
170 | static u8 __pmac | 170 | static u8 |
171 | ohare_mb_content(struct media_bay_info *bay) | 171 | ohare_mb_content(struct media_bay_info *bay) |
172 | { | 172 | { |
173 | return (MB_IN32(bay, OHARE_MBCR) >> 12) & 7; | 173 | return (MB_IN32(bay, OHARE_MBCR) >> 12) & 7; |
174 | } | 174 | } |
175 | 175 | ||
176 | static u8 __pmac | 176 | static u8 |
177 | heathrow_mb_content(struct media_bay_info *bay) | 177 | heathrow_mb_content(struct media_bay_info *bay) |
178 | { | 178 | { |
179 | return (MB_IN32(bay, HEATHROW_MBCR) >> 12) & 7; | 179 | return (MB_IN32(bay, HEATHROW_MBCR) >> 12) & 7; |
180 | } | 180 | } |
181 | 181 | ||
182 | static u8 __pmac | 182 | static u8 |
183 | keylargo_mb_content(struct media_bay_info *bay) | 183 | keylargo_mb_content(struct media_bay_info *bay) |
184 | { | 184 | { |
185 | int new_gpio; | 185 | int new_gpio; |
@@ -205,7 +205,7 @@ keylargo_mb_content(struct media_bay_info *bay) | |||
205 | * into reset state as well | 205 | * into reset state as well |
206 | */ | 206 | */ |
207 | 207 | ||
208 | static void __pmac | 208 | static void |
209 | ohare_mb_power(struct media_bay_info* bay, int on_off) | 209 | ohare_mb_power(struct media_bay_info* bay, int on_off) |
210 | { | 210 | { |
211 | if (on_off) { | 211 | if (on_off) { |
@@ -224,7 +224,7 @@ ohare_mb_power(struct media_bay_info* bay, int on_off) | |||
224 | MB_BIC(bay, OHARE_MBCR, 0x00000F00); | 224 | MB_BIC(bay, OHARE_MBCR, 0x00000F00); |
225 | } | 225 | } |
226 | 226 | ||
227 | static void __pmac | 227 | static void |
228 | heathrow_mb_power(struct media_bay_info* bay, int on_off) | 228 | heathrow_mb_power(struct media_bay_info* bay, int on_off) |
229 | { | 229 | { |
230 | if (on_off) { | 230 | if (on_off) { |
@@ -243,7 +243,7 @@ heathrow_mb_power(struct media_bay_info* bay, int on_off) | |||
243 | MB_BIC(bay, HEATHROW_MBCR, 0x00000F00); | 243 | MB_BIC(bay, HEATHROW_MBCR, 0x00000F00); |
244 | } | 244 | } |
245 | 245 | ||
246 | static void __pmac | 246 | static void |
247 | keylargo_mb_power(struct media_bay_info* bay, int on_off) | 247 | keylargo_mb_power(struct media_bay_info* bay, int on_off) |
248 | { | 248 | { |
249 | if (on_off) { | 249 | if (on_off) { |
@@ -267,7 +267,7 @@ keylargo_mb_power(struct media_bay_info* bay, int on_off) | |||
267 | * enable the related busses | 267 | * enable the related busses |
268 | */ | 268 | */ |
269 | 269 | ||
270 | static int __pmac | 270 | static int |
271 | ohare_mb_setup_bus(struct media_bay_info* bay, u8 device_id) | 271 | ohare_mb_setup_bus(struct media_bay_info* bay, u8 device_id) |
272 | { | 272 | { |
273 | switch(device_id) { | 273 | switch(device_id) { |
@@ -287,7 +287,7 @@ ohare_mb_setup_bus(struct media_bay_info* bay, u8 device_id) | |||
287 | return -ENODEV; | 287 | return -ENODEV; |
288 | } | 288 | } |
289 | 289 | ||
290 | static int __pmac | 290 | static int |
291 | heathrow_mb_setup_bus(struct media_bay_info* bay, u8 device_id) | 291 | heathrow_mb_setup_bus(struct media_bay_info* bay, u8 device_id) |
292 | { | 292 | { |
293 | switch(device_id) { | 293 | switch(device_id) { |
@@ -307,7 +307,7 @@ heathrow_mb_setup_bus(struct media_bay_info* bay, u8 device_id) | |||
307 | return -ENODEV; | 307 | return -ENODEV; |
308 | } | 308 | } |
309 | 309 | ||
310 | static int __pmac | 310 | static int |
311 | keylargo_mb_setup_bus(struct media_bay_info* bay, u8 device_id) | 311 | keylargo_mb_setup_bus(struct media_bay_info* bay, u8 device_id) |
312 | { | 312 | { |
313 | switch(device_id) { | 313 | switch(device_id) { |
@@ -330,43 +330,43 @@ keylargo_mb_setup_bus(struct media_bay_info* bay, u8 device_id) | |||
330 | * Functions for tweaking resets | 330 | * Functions for tweaking resets |
331 | */ | 331 | */ |
332 | 332 | ||
333 | static void __pmac | 333 | static void |
334 | ohare_mb_un_reset(struct media_bay_info* bay) | 334 | ohare_mb_un_reset(struct media_bay_info* bay) |
335 | { | 335 | { |
336 | MB_BIS(bay, OHARE_FCR, OH_BAY_RESET_N); | 336 | MB_BIS(bay, OHARE_FCR, OH_BAY_RESET_N); |
337 | } | 337 | } |
338 | 338 | ||
339 | static void __pmac keylargo_mb_init(struct media_bay_info *bay) | 339 | static void keylargo_mb_init(struct media_bay_info *bay) |
340 | { | 340 | { |
341 | MB_BIS(bay, KEYLARGO_MBCR, KL_MBCR_MB0_ENABLE); | 341 | MB_BIS(bay, KEYLARGO_MBCR, KL_MBCR_MB0_ENABLE); |
342 | } | 342 | } |
343 | 343 | ||
344 | static void __pmac heathrow_mb_un_reset(struct media_bay_info* bay) | 344 | static void heathrow_mb_un_reset(struct media_bay_info* bay) |
345 | { | 345 | { |
346 | MB_BIS(bay, HEATHROW_FCR, HRW_BAY_RESET_N); | 346 | MB_BIS(bay, HEATHROW_FCR, HRW_BAY_RESET_N); |
347 | } | 347 | } |
348 | 348 | ||
349 | static void __pmac keylargo_mb_un_reset(struct media_bay_info* bay) | 349 | static void keylargo_mb_un_reset(struct media_bay_info* bay) |
350 | { | 350 | { |
351 | MB_BIS(bay, KEYLARGO_MBCR, KL_MBCR_MB0_DEV_RESET); | 351 | MB_BIS(bay, KEYLARGO_MBCR, KL_MBCR_MB0_DEV_RESET); |
352 | } | 352 | } |
353 | 353 | ||
354 | static void __pmac ohare_mb_un_reset_ide(struct media_bay_info* bay) | 354 | static void ohare_mb_un_reset_ide(struct media_bay_info* bay) |
355 | { | 355 | { |
356 | MB_BIS(bay, OHARE_FCR, OH_IDE1_RESET_N); | 356 | MB_BIS(bay, OHARE_FCR, OH_IDE1_RESET_N); |
357 | } | 357 | } |
358 | 358 | ||
359 | static void __pmac heathrow_mb_un_reset_ide(struct media_bay_info* bay) | 359 | static void heathrow_mb_un_reset_ide(struct media_bay_info* bay) |
360 | { | 360 | { |
361 | MB_BIS(bay, HEATHROW_FCR, HRW_IDE1_RESET_N); | 361 | MB_BIS(bay, HEATHROW_FCR, HRW_IDE1_RESET_N); |
362 | } | 362 | } |
363 | 363 | ||
364 | static void __pmac keylargo_mb_un_reset_ide(struct media_bay_info* bay) | 364 | static void keylargo_mb_un_reset_ide(struct media_bay_info* bay) |
365 | { | 365 | { |
366 | MB_BIS(bay, KEYLARGO_FCR1, KL1_EIDE0_RESET_N); | 366 | MB_BIS(bay, KEYLARGO_FCR1, KL1_EIDE0_RESET_N); |
367 | } | 367 | } |
368 | 368 | ||
369 | static inline void __pmac set_mb_power(struct media_bay_info* bay, int onoff) | 369 | static inline void set_mb_power(struct media_bay_info* bay, int onoff) |
370 | { | 370 | { |
371 | /* Power up up and assert the bay reset line */ | 371 | /* Power up up and assert the bay reset line */ |
372 | if (onoff) { | 372 | if (onoff) { |
@@ -382,7 +382,7 @@ static inline void __pmac set_mb_power(struct media_bay_info* bay, int onoff) | |||
382 | bay->timer = msecs_to_jiffies(MB_POWER_DELAY); | 382 | bay->timer = msecs_to_jiffies(MB_POWER_DELAY); |
383 | } | 383 | } |
384 | 384 | ||
385 | static void __pmac poll_media_bay(struct media_bay_info* bay) | 385 | static void poll_media_bay(struct media_bay_info* bay) |
386 | { | 386 | { |
387 | int id = bay->ops->content(bay); | 387 | int id = bay->ops->content(bay); |
388 | 388 | ||
@@ -415,7 +415,7 @@ static void __pmac poll_media_bay(struct media_bay_info* bay) | |||
415 | } | 415 | } |
416 | } | 416 | } |
417 | 417 | ||
418 | int __pmac check_media_bay(struct device_node *which_bay, int what) | 418 | int check_media_bay(struct device_node *which_bay, int what) |
419 | { | 419 | { |
420 | #ifdef CONFIG_BLK_DEV_IDE | 420 | #ifdef CONFIG_BLK_DEV_IDE |
421 | int i; | 421 | int i; |
@@ -432,7 +432,7 @@ int __pmac check_media_bay(struct device_node *which_bay, int what) | |||
432 | } | 432 | } |
433 | EXPORT_SYMBOL(check_media_bay); | 433 | EXPORT_SYMBOL(check_media_bay); |
434 | 434 | ||
435 | int __pmac check_media_bay_by_base(unsigned long base, int what) | 435 | int check_media_bay_by_base(unsigned long base, int what) |
436 | { | 436 | { |
437 | #ifdef CONFIG_BLK_DEV_IDE | 437 | #ifdef CONFIG_BLK_DEV_IDE |
438 | int i; | 438 | int i; |
@@ -449,7 +449,7 @@ int __pmac check_media_bay_by_base(unsigned long base, int what) | |||
449 | return -ENODEV; | 449 | return -ENODEV; |
450 | } | 450 | } |
451 | 451 | ||
452 | int __pmac media_bay_set_ide_infos(struct device_node* which_bay, unsigned long base, | 452 | int media_bay_set_ide_infos(struct device_node* which_bay, unsigned long base, |
453 | int irq, int index) | 453 | int irq, int index) |
454 | { | 454 | { |
455 | #ifdef CONFIG_BLK_DEV_IDE | 455 | #ifdef CONFIG_BLK_DEV_IDE |
@@ -489,7 +489,7 @@ int __pmac media_bay_set_ide_infos(struct device_node* which_bay, unsigned long | |||
489 | return -ENODEV; | 489 | return -ENODEV; |
490 | } | 490 | } |
491 | 491 | ||
492 | static void __pmac media_bay_step(int i) | 492 | static void media_bay_step(int i) |
493 | { | 493 | { |
494 | struct media_bay_info* bay = &media_bays[i]; | 494 | struct media_bay_info* bay = &media_bays[i]; |
495 | 495 | ||
@@ -619,7 +619,7 @@ static void __pmac media_bay_step(int i) | |||
619 | * with the IDE driver. It needs to be a thread because | 619 | * with the IDE driver. It needs to be a thread because |
620 | * ide_register can't be called from interrupt context. | 620 | * ide_register can't be called from interrupt context. |
621 | */ | 621 | */ |
622 | static int __pmac media_bay_task(void *x) | 622 | static int media_bay_task(void *x) |
623 | { | 623 | { |
624 | int i; | 624 | int i; |
625 | 625 | ||
@@ -704,7 +704,7 @@ static int __devinit media_bay_attach(struct macio_dev *mdev, const struct of_de | |||
704 | 704 | ||
705 | } | 705 | } |
706 | 706 | ||
707 | static int __pmac media_bay_suspend(struct macio_dev *mdev, pm_message_t state) | 707 | static int media_bay_suspend(struct macio_dev *mdev, pm_message_t state) |
708 | { | 708 | { |
709 | struct media_bay_info *bay = macio_get_drvdata(mdev); | 709 | struct media_bay_info *bay = macio_get_drvdata(mdev); |
710 | 710 | ||
@@ -719,7 +719,7 @@ static int __pmac media_bay_suspend(struct macio_dev *mdev, pm_message_t state) | |||
719 | return 0; | 719 | return 0; |
720 | } | 720 | } |
721 | 721 | ||
722 | static int __pmac media_bay_resume(struct macio_dev *mdev) | 722 | static int media_bay_resume(struct macio_dev *mdev) |
723 | { | 723 | { |
724 | struct media_bay_info *bay = macio_get_drvdata(mdev); | 724 | struct media_bay_info *bay = macio_get_drvdata(mdev); |
725 | 725 | ||
@@ -760,7 +760,7 @@ static int __pmac media_bay_resume(struct macio_dev *mdev) | |||
760 | 760 | ||
761 | /* Definitions of "ops" structures. | 761 | /* Definitions of "ops" structures. |
762 | */ | 762 | */ |
763 | static struct mb_ops ohare_mb_ops __pmacdata = { | 763 | static struct mb_ops ohare_mb_ops = { |
764 | .name = "Ohare", | 764 | .name = "Ohare", |
765 | .content = ohare_mb_content, | 765 | .content = ohare_mb_content, |
766 | .power = ohare_mb_power, | 766 | .power = ohare_mb_power, |
@@ -769,7 +769,7 @@ static struct mb_ops ohare_mb_ops __pmacdata = { | |||
769 | .un_reset_ide = ohare_mb_un_reset_ide, | 769 | .un_reset_ide = ohare_mb_un_reset_ide, |
770 | }; | 770 | }; |
771 | 771 | ||
772 | static struct mb_ops heathrow_mb_ops __pmacdata = { | 772 | static struct mb_ops heathrow_mb_ops = { |
773 | .name = "Heathrow", | 773 | .name = "Heathrow", |
774 | .content = heathrow_mb_content, | 774 | .content = heathrow_mb_content, |
775 | .power = heathrow_mb_power, | 775 | .power = heathrow_mb_power, |
@@ -778,7 +778,7 @@ static struct mb_ops heathrow_mb_ops __pmacdata = { | |||
778 | .un_reset_ide = heathrow_mb_un_reset_ide, | 778 | .un_reset_ide = heathrow_mb_un_reset_ide, |
779 | }; | 779 | }; |
780 | 780 | ||
781 | static struct mb_ops keylargo_mb_ops __pmacdata = { | 781 | static struct mb_ops keylargo_mb_ops = { |
782 | .name = "KeyLargo", | 782 | .name = "KeyLargo", |
783 | .init = keylargo_mb_init, | 783 | .init = keylargo_mb_init, |
784 | .content = keylargo_mb_content, | 784 | .content = keylargo_mb_content, |