diff options
Diffstat (limited to 'arch/ppc/platforms/pmac_feature.c')
-rw-r--r-- | arch/ppc/platforms/pmac_feature.c | 176 |
1 files changed, 88 insertions, 88 deletions
diff --git a/arch/ppc/platforms/pmac_feature.c b/arch/ppc/platforms/pmac_feature.c index 867336ad5d36..e8cd0a8b6a76 100644 --- a/arch/ppc/platforms/pmac_feature.c +++ b/arch/ppc/platforms/pmac_feature.c | |||
@@ -63,7 +63,7 @@ extern struct device_node *k2_skiplist[2]; | |||
63 | * We use a single global lock to protect accesses. Each driver has | 63 | * We use a single global lock to protect accesses. Each driver has |
64 | * to take care of its own locking | 64 | * to take care of its own locking |
65 | */ | 65 | */ |
66 | static DEFINE_SPINLOCK(feature_lock __pmacdata); | 66 | static DEFINE_SPINLOCK(feature_lock); |
67 | 67 | ||
68 | #define LOCK(flags) spin_lock_irqsave(&feature_lock, flags); | 68 | #define LOCK(flags) spin_lock_irqsave(&feature_lock, flags); |
69 | #define UNLOCK(flags) spin_unlock_irqrestore(&feature_lock, flags); | 69 | #define UNLOCK(flags) spin_unlock_irqrestore(&feature_lock, flags); |
@@ -72,9 +72,9 @@ static DEFINE_SPINLOCK(feature_lock __pmacdata); | |||
72 | /* | 72 | /* |
73 | * Instance of some macio stuffs | 73 | * Instance of some macio stuffs |
74 | */ | 74 | */ |
75 | struct macio_chip macio_chips[MAX_MACIO_CHIPS] __pmacdata; | 75 | struct macio_chip macio_chips[MAX_MACIO_CHIPS]; |
76 | 76 | ||
77 | struct macio_chip* __pmac macio_find(struct device_node* child, int type) | 77 | struct macio_chip* macio_find(struct device_node* child, int type) |
78 | { | 78 | { |
79 | while(child) { | 79 | while(child) { |
80 | int i; | 80 | int i; |
@@ -89,7 +89,7 @@ struct macio_chip* __pmac macio_find(struct device_node* child, int type) | |||
89 | } | 89 | } |
90 | EXPORT_SYMBOL_GPL(macio_find); | 90 | EXPORT_SYMBOL_GPL(macio_find); |
91 | 91 | ||
92 | static const char* macio_names[] __pmacdata = | 92 | static const char* macio_names[] = |
93 | { | 93 | { |
94 | "Unknown", | 94 | "Unknown", |
95 | "Grand Central", | 95 | "Grand Central", |
@@ -116,10 +116,10 @@ static const char* macio_names[] __pmacdata = | |||
116 | #define UN_BIS(r,v) (UN_OUT((r), UN_IN(r) | (v))) | 116 | #define UN_BIS(r,v) (UN_OUT((r), UN_IN(r) | (v))) |
117 | #define UN_BIC(r,v) (UN_OUT((r), UN_IN(r) & ~(v))) | 117 | #define UN_BIC(r,v) (UN_OUT((r), UN_IN(r) & ~(v))) |
118 | 118 | ||
119 | static struct device_node* uninorth_node __pmacdata; | 119 | static struct device_node* uninorth_node; |
120 | static u32 __iomem * uninorth_base __pmacdata; | 120 | static u32 __iomem * uninorth_base; |
121 | static u32 uninorth_rev __pmacdata; | 121 | static u32 uninorth_rev; |
122 | static int uninorth_u3 __pmacdata; | 122 | static int uninorth_u3; |
123 | static void __iomem *u3_ht; | 123 | static void __iomem *u3_ht; |
124 | 124 | ||
125 | /* | 125 | /* |
@@ -142,13 +142,13 @@ struct pmac_mb_def | |||
142 | struct feature_table_entry* features; | 142 | struct feature_table_entry* features; |
143 | unsigned long board_flags; | 143 | unsigned long board_flags; |
144 | }; | 144 | }; |
145 | static struct pmac_mb_def pmac_mb __pmacdata; | 145 | static struct pmac_mb_def pmac_mb; |
146 | 146 | ||
147 | /* | 147 | /* |
148 | * Here are the chip specific feature functions | 148 | * Here are the chip specific feature functions |
149 | */ | 149 | */ |
150 | 150 | ||
151 | static inline int __pmac | 151 | static inline int |
152 | simple_feature_tweak(struct device_node* node, int type, int reg, u32 mask, int value) | 152 | simple_feature_tweak(struct device_node* node, int type, int reg, u32 mask, int value) |
153 | { | 153 | { |
154 | struct macio_chip* macio; | 154 | struct macio_chip* macio; |
@@ -170,7 +170,7 @@ simple_feature_tweak(struct device_node* node, int type, int reg, u32 mask, int | |||
170 | 170 | ||
171 | #ifndef CONFIG_POWER4 | 171 | #ifndef CONFIG_POWER4 |
172 | 172 | ||
173 | static long __pmac | 173 | static long |
174 | ohare_htw_scc_enable(struct device_node* node, long param, long value) | 174 | ohare_htw_scc_enable(struct device_node* node, long param, long value) |
175 | { | 175 | { |
176 | struct macio_chip* macio; | 176 | struct macio_chip* macio; |
@@ -263,21 +263,21 @@ ohare_htw_scc_enable(struct device_node* node, long param, long value) | |||
263 | return 0; | 263 | return 0; |
264 | } | 264 | } |
265 | 265 | ||
266 | static long __pmac | 266 | static long |
267 | ohare_floppy_enable(struct device_node* node, long param, long value) | 267 | ohare_floppy_enable(struct device_node* node, long param, long value) |
268 | { | 268 | { |
269 | return simple_feature_tweak(node, macio_ohare, | 269 | return simple_feature_tweak(node, macio_ohare, |
270 | OHARE_FCR, OH_FLOPPY_ENABLE, value); | 270 | OHARE_FCR, OH_FLOPPY_ENABLE, value); |
271 | } | 271 | } |
272 | 272 | ||
273 | static long __pmac | 273 | static long |
274 | ohare_mesh_enable(struct device_node* node, long param, long value) | 274 | ohare_mesh_enable(struct device_node* node, long param, long value) |
275 | { | 275 | { |
276 | return simple_feature_tweak(node, macio_ohare, | 276 | return simple_feature_tweak(node, macio_ohare, |
277 | OHARE_FCR, OH_MESH_ENABLE, value); | 277 | OHARE_FCR, OH_MESH_ENABLE, value); |
278 | } | 278 | } |
279 | 279 | ||
280 | static long __pmac | 280 | static long |
281 | ohare_ide_enable(struct device_node* node, long param, long value) | 281 | ohare_ide_enable(struct device_node* node, long param, long value) |
282 | { | 282 | { |
283 | switch(param) { | 283 | switch(param) { |
@@ -298,7 +298,7 @@ ohare_ide_enable(struct device_node* node, long param, long value) | |||
298 | } | 298 | } |
299 | } | 299 | } |
300 | 300 | ||
301 | static long __pmac | 301 | static long |
302 | ohare_ide_reset(struct device_node* node, long param, long value) | 302 | ohare_ide_reset(struct device_node* node, long param, long value) |
303 | { | 303 | { |
304 | switch(param) { | 304 | switch(param) { |
@@ -313,7 +313,7 @@ ohare_ide_reset(struct device_node* node, long param, long value) | |||
313 | } | 313 | } |
314 | } | 314 | } |
315 | 315 | ||
316 | static long __pmac | 316 | static long |
317 | ohare_sleep_state(struct device_node* node, long param, long value) | 317 | ohare_sleep_state(struct device_node* node, long param, long value) |
318 | { | 318 | { |
319 | struct macio_chip* macio = &macio_chips[0]; | 319 | struct macio_chip* macio = &macio_chips[0]; |
@@ -329,7 +329,7 @@ ohare_sleep_state(struct device_node* node, long param, long value) | |||
329 | return 0; | 329 | return 0; |
330 | } | 330 | } |
331 | 331 | ||
332 | static long __pmac | 332 | static long |
333 | heathrow_modem_enable(struct device_node* node, long param, long value) | 333 | heathrow_modem_enable(struct device_node* node, long param, long value) |
334 | { | 334 | { |
335 | struct macio_chip* macio; | 335 | struct macio_chip* macio; |
@@ -373,7 +373,7 @@ heathrow_modem_enable(struct device_node* node, long param, long value) | |||
373 | return 0; | 373 | return 0; |
374 | } | 374 | } |
375 | 375 | ||
376 | static long __pmac | 376 | static long |
377 | heathrow_floppy_enable(struct device_node* node, long param, long value) | 377 | heathrow_floppy_enable(struct device_node* node, long param, long value) |
378 | { | 378 | { |
379 | return simple_feature_tweak(node, macio_unknown, | 379 | return simple_feature_tweak(node, macio_unknown, |
@@ -382,7 +382,7 @@ heathrow_floppy_enable(struct device_node* node, long param, long value) | |||
382 | value); | 382 | value); |
383 | } | 383 | } |
384 | 384 | ||
385 | static long __pmac | 385 | static long |
386 | heathrow_mesh_enable(struct device_node* node, long param, long value) | 386 | heathrow_mesh_enable(struct device_node* node, long param, long value) |
387 | { | 387 | { |
388 | struct macio_chip* macio; | 388 | struct macio_chip* macio; |
@@ -411,7 +411,7 @@ heathrow_mesh_enable(struct device_node* node, long param, long value) | |||
411 | return 0; | 411 | return 0; |
412 | } | 412 | } |
413 | 413 | ||
414 | static long __pmac | 414 | static long |
415 | heathrow_ide_enable(struct device_node* node, long param, long value) | 415 | heathrow_ide_enable(struct device_node* node, long param, long value) |
416 | { | 416 | { |
417 | switch(param) { | 417 | switch(param) { |
@@ -426,7 +426,7 @@ heathrow_ide_enable(struct device_node* node, long param, long value) | |||
426 | } | 426 | } |
427 | } | 427 | } |
428 | 428 | ||
429 | static long __pmac | 429 | static long |
430 | heathrow_ide_reset(struct device_node* node, long param, long value) | 430 | heathrow_ide_reset(struct device_node* node, long param, long value) |
431 | { | 431 | { |
432 | switch(param) { | 432 | switch(param) { |
@@ -441,7 +441,7 @@ heathrow_ide_reset(struct device_node* node, long param, long value) | |||
441 | } | 441 | } |
442 | } | 442 | } |
443 | 443 | ||
444 | static long __pmac | 444 | static long |
445 | heathrow_bmac_enable(struct device_node* node, long param, long value) | 445 | heathrow_bmac_enable(struct device_node* node, long param, long value) |
446 | { | 446 | { |
447 | struct macio_chip* macio; | 447 | struct macio_chip* macio; |
@@ -470,7 +470,7 @@ heathrow_bmac_enable(struct device_node* node, long param, long value) | |||
470 | return 0; | 470 | return 0; |
471 | } | 471 | } |
472 | 472 | ||
473 | static long __pmac | 473 | static long |
474 | heathrow_sound_enable(struct device_node* node, long param, long value) | 474 | heathrow_sound_enable(struct device_node* node, long param, long value) |
475 | { | 475 | { |
476 | struct macio_chip* macio; | 476 | struct macio_chip* macio; |
@@ -501,16 +501,16 @@ heathrow_sound_enable(struct device_node* node, long param, long value) | |||
501 | return 0; | 501 | return 0; |
502 | } | 502 | } |
503 | 503 | ||
504 | static u32 save_fcr[6] __pmacdata; | 504 | static u32 save_fcr[6]; |
505 | static u32 save_mbcr __pmacdata; | 505 | static u32 save_mbcr; |
506 | static u32 save_gpio_levels[2] __pmacdata; | 506 | static u32 save_gpio_levels[2]; |
507 | static u8 save_gpio_extint[KEYLARGO_GPIO_EXTINT_CNT] __pmacdata; | 507 | static u8 save_gpio_extint[KEYLARGO_GPIO_EXTINT_CNT]; |
508 | static u8 save_gpio_normal[KEYLARGO_GPIO_CNT] __pmacdata; | 508 | static u8 save_gpio_normal[KEYLARGO_GPIO_CNT]; |
509 | static u32 save_unin_clock_ctl __pmacdata; | 509 | static u32 save_unin_clock_ctl; |
510 | static struct dbdma_regs save_dbdma[13] __pmacdata; | 510 | static struct dbdma_regs save_dbdma[13]; |
511 | static struct dbdma_regs save_alt_dbdma[13] __pmacdata; | 511 | static struct dbdma_regs save_alt_dbdma[13]; |
512 | 512 | ||
513 | static void __pmac | 513 | static void |
514 | dbdma_save(struct macio_chip* macio, struct dbdma_regs* save) | 514 | dbdma_save(struct macio_chip* macio, struct dbdma_regs* save) |
515 | { | 515 | { |
516 | int i; | 516 | int i; |
@@ -527,7 +527,7 @@ dbdma_save(struct macio_chip* macio, struct dbdma_regs* save) | |||
527 | } | 527 | } |
528 | } | 528 | } |
529 | 529 | ||
530 | static void __pmac | 530 | static void |
531 | dbdma_restore(struct macio_chip* macio, struct dbdma_regs* save) | 531 | dbdma_restore(struct macio_chip* macio, struct dbdma_regs* save) |
532 | { | 532 | { |
533 | int i; | 533 | int i; |
@@ -547,7 +547,7 @@ dbdma_restore(struct macio_chip* macio, struct dbdma_regs* save) | |||
547 | } | 547 | } |
548 | } | 548 | } |
549 | 549 | ||
550 | static void __pmac | 550 | static void |
551 | heathrow_sleep(struct macio_chip* macio, int secondary) | 551 | heathrow_sleep(struct macio_chip* macio, int secondary) |
552 | { | 552 | { |
553 | if (secondary) { | 553 | if (secondary) { |
@@ -580,7 +580,7 @@ heathrow_sleep(struct macio_chip* macio, int secondary) | |||
580 | (void)MACIO_IN32(HEATHROW_FCR); | 580 | (void)MACIO_IN32(HEATHROW_FCR); |
581 | } | 581 | } |
582 | 582 | ||
583 | static void __pmac | 583 | static void |
584 | heathrow_wakeup(struct macio_chip* macio, int secondary) | 584 | heathrow_wakeup(struct macio_chip* macio, int secondary) |
585 | { | 585 | { |
586 | if (secondary) { | 586 | if (secondary) { |
@@ -605,7 +605,7 @@ heathrow_wakeup(struct macio_chip* macio, int secondary) | |||
605 | } | 605 | } |
606 | } | 606 | } |
607 | 607 | ||
608 | static long __pmac | 608 | static long |
609 | heathrow_sleep_state(struct device_node* node, long param, long value) | 609 | heathrow_sleep_state(struct device_node* node, long param, long value) |
610 | { | 610 | { |
611 | if ((pmac_mb.board_flags & PMAC_MB_CAN_SLEEP) == 0) | 611 | if ((pmac_mb.board_flags & PMAC_MB_CAN_SLEEP) == 0) |
@@ -622,7 +622,7 @@ heathrow_sleep_state(struct device_node* node, long param, long value) | |||
622 | return 0; | 622 | return 0; |
623 | } | 623 | } |
624 | 624 | ||
625 | static long __pmac | 625 | static long |
626 | core99_scc_enable(struct device_node* node, long param, long value) | 626 | core99_scc_enable(struct device_node* node, long param, long value) |
627 | { | 627 | { |
628 | struct macio_chip* macio; | 628 | struct macio_chip* macio; |
@@ -723,7 +723,7 @@ core99_scc_enable(struct device_node* node, long param, long value) | |||
723 | return 0; | 723 | return 0; |
724 | } | 724 | } |
725 | 725 | ||
726 | static long __pmac | 726 | static long |
727 | core99_modem_enable(struct device_node* node, long param, long value) | 727 | core99_modem_enable(struct device_node* node, long param, long value) |
728 | { | 728 | { |
729 | struct macio_chip* macio; | 729 | struct macio_chip* macio; |
@@ -775,7 +775,7 @@ core99_modem_enable(struct device_node* node, long param, long value) | |||
775 | return 0; | 775 | return 0; |
776 | } | 776 | } |
777 | 777 | ||
778 | static long __pmac | 778 | static long |
779 | pangea_modem_enable(struct device_node* node, long param, long value) | 779 | pangea_modem_enable(struct device_node* node, long param, long value) |
780 | { | 780 | { |
781 | struct macio_chip* macio; | 781 | struct macio_chip* macio; |
@@ -830,7 +830,7 @@ pangea_modem_enable(struct device_node* node, long param, long value) | |||
830 | return 0; | 830 | return 0; |
831 | } | 831 | } |
832 | 832 | ||
833 | static long __pmac | 833 | static long |
834 | core99_ata100_enable(struct device_node* node, long value) | 834 | core99_ata100_enable(struct device_node* node, long value) |
835 | { | 835 | { |
836 | unsigned long flags; | 836 | unsigned long flags; |
@@ -860,7 +860,7 @@ core99_ata100_enable(struct device_node* node, long value) | |||
860 | return 0; | 860 | return 0; |
861 | } | 861 | } |
862 | 862 | ||
863 | static long __pmac | 863 | static long |
864 | core99_ide_enable(struct device_node* node, long param, long value) | 864 | core99_ide_enable(struct device_node* node, long param, long value) |
865 | { | 865 | { |
866 | /* Bus ID 0 to 2 are KeyLargo based IDE, busID 3 is U2 | 866 | /* Bus ID 0 to 2 are KeyLargo based IDE, busID 3 is U2 |
@@ -883,7 +883,7 @@ core99_ide_enable(struct device_node* node, long param, long value) | |||
883 | } | 883 | } |
884 | } | 884 | } |
885 | 885 | ||
886 | static long __pmac | 886 | static long |
887 | core99_ide_reset(struct device_node* node, long param, long value) | 887 | core99_ide_reset(struct device_node* node, long param, long value) |
888 | { | 888 | { |
889 | switch(param) { | 889 | switch(param) { |
@@ -901,7 +901,7 @@ core99_ide_reset(struct device_node* node, long param, long value) | |||
901 | } | 901 | } |
902 | } | 902 | } |
903 | 903 | ||
904 | static long __pmac | 904 | static long |
905 | core99_gmac_enable(struct device_node* node, long param, long value) | 905 | core99_gmac_enable(struct device_node* node, long param, long value) |
906 | { | 906 | { |
907 | unsigned long flags; | 907 | unsigned long flags; |
@@ -918,7 +918,7 @@ core99_gmac_enable(struct device_node* node, long param, long value) | |||
918 | return 0; | 918 | return 0; |
919 | } | 919 | } |
920 | 920 | ||
921 | static long __pmac | 921 | static long |
922 | core99_gmac_phy_reset(struct device_node* node, long param, long value) | 922 | core99_gmac_phy_reset(struct device_node* node, long param, long value) |
923 | { | 923 | { |
924 | unsigned long flags; | 924 | unsigned long flags; |
@@ -943,7 +943,7 @@ core99_gmac_phy_reset(struct device_node* node, long param, long value) | |||
943 | return 0; | 943 | return 0; |
944 | } | 944 | } |
945 | 945 | ||
946 | static long __pmac | 946 | static long |
947 | core99_sound_chip_enable(struct device_node* node, long param, long value) | 947 | core99_sound_chip_enable(struct device_node* node, long param, long value) |
948 | { | 948 | { |
949 | struct macio_chip* macio; | 949 | struct macio_chip* macio; |
@@ -973,7 +973,7 @@ core99_sound_chip_enable(struct device_node* node, long param, long value) | |||
973 | return 0; | 973 | return 0; |
974 | } | 974 | } |
975 | 975 | ||
976 | static long __pmac | 976 | static long |
977 | core99_airport_enable(struct device_node* node, long param, long value) | 977 | core99_airport_enable(struct device_node* node, long param, long value) |
978 | { | 978 | { |
979 | struct macio_chip* macio; | 979 | struct macio_chip* macio; |
@@ -1060,7 +1060,7 @@ core99_airport_enable(struct device_node* node, long param, long value) | |||
1060 | } | 1060 | } |
1061 | 1061 | ||
1062 | #ifdef CONFIG_SMP | 1062 | #ifdef CONFIG_SMP |
1063 | static long __pmac | 1063 | static long |
1064 | core99_reset_cpu(struct device_node* node, long param, long value) | 1064 | core99_reset_cpu(struct device_node* node, long param, long value) |
1065 | { | 1065 | { |
1066 | unsigned int reset_io = 0; | 1066 | unsigned int reset_io = 0; |
@@ -1104,7 +1104,7 @@ core99_reset_cpu(struct device_node* node, long param, long value) | |||
1104 | } | 1104 | } |
1105 | #endif /* CONFIG_SMP */ | 1105 | #endif /* CONFIG_SMP */ |
1106 | 1106 | ||
1107 | static long __pmac | 1107 | static long |
1108 | core99_usb_enable(struct device_node* node, long param, long value) | 1108 | core99_usb_enable(struct device_node* node, long param, long value) |
1109 | { | 1109 | { |
1110 | struct macio_chip* macio; | 1110 | struct macio_chip* macio; |
@@ -1257,7 +1257,7 @@ core99_usb_enable(struct device_node* node, long param, long value) | |||
1257 | return 0; | 1257 | return 0; |
1258 | } | 1258 | } |
1259 | 1259 | ||
1260 | static long __pmac | 1260 | static long |
1261 | core99_firewire_enable(struct device_node* node, long param, long value) | 1261 | core99_firewire_enable(struct device_node* node, long param, long value) |
1262 | { | 1262 | { |
1263 | unsigned long flags; | 1263 | unsigned long flags; |
@@ -1284,7 +1284,7 @@ core99_firewire_enable(struct device_node* node, long param, long value) | |||
1284 | return 0; | 1284 | return 0; |
1285 | } | 1285 | } |
1286 | 1286 | ||
1287 | static long __pmac | 1287 | static long |
1288 | core99_firewire_cable_power(struct device_node* node, long param, long value) | 1288 | core99_firewire_cable_power(struct device_node* node, long param, long value) |
1289 | { | 1289 | { |
1290 | unsigned long flags; | 1290 | unsigned long flags; |
@@ -1315,7 +1315,7 @@ core99_firewire_cable_power(struct device_node* node, long param, long value) | |||
1315 | return 0; | 1315 | return 0; |
1316 | } | 1316 | } |
1317 | 1317 | ||
1318 | static long __pmac | 1318 | static long |
1319 | intrepid_aack_delay_enable(struct device_node* node, long param, long value) | 1319 | intrepid_aack_delay_enable(struct device_node* node, long param, long value) |
1320 | { | 1320 | { |
1321 | unsigned long flags; | 1321 | unsigned long flags; |
@@ -1336,7 +1336,7 @@ intrepid_aack_delay_enable(struct device_node* node, long param, long value) | |||
1336 | 1336 | ||
1337 | #endif /* CONFIG_POWER4 */ | 1337 | #endif /* CONFIG_POWER4 */ |
1338 | 1338 | ||
1339 | static long __pmac | 1339 | static long |
1340 | core99_read_gpio(struct device_node* node, long param, long value) | 1340 | core99_read_gpio(struct device_node* node, long param, long value) |
1341 | { | 1341 | { |
1342 | struct macio_chip* macio = &macio_chips[0]; | 1342 | struct macio_chip* macio = &macio_chips[0]; |
@@ -1345,7 +1345,7 @@ core99_read_gpio(struct device_node* node, long param, long value) | |||
1345 | } | 1345 | } |
1346 | 1346 | ||
1347 | 1347 | ||
1348 | static long __pmac | 1348 | static long |
1349 | core99_write_gpio(struct device_node* node, long param, long value) | 1349 | core99_write_gpio(struct device_node* node, long param, long value) |
1350 | { | 1350 | { |
1351 | struct macio_chip* macio = &macio_chips[0]; | 1351 | struct macio_chip* macio = &macio_chips[0]; |
@@ -1356,7 +1356,7 @@ core99_write_gpio(struct device_node* node, long param, long value) | |||
1356 | 1356 | ||
1357 | #ifdef CONFIG_POWER4 | 1357 | #ifdef CONFIG_POWER4 |
1358 | 1358 | ||
1359 | static long __pmac | 1359 | static long |
1360 | g5_gmac_enable(struct device_node* node, long param, long value) | 1360 | g5_gmac_enable(struct device_node* node, long param, long value) |
1361 | { | 1361 | { |
1362 | struct macio_chip* macio = &macio_chips[0]; | 1362 | struct macio_chip* macio = &macio_chips[0]; |
@@ -1380,7 +1380,7 @@ g5_gmac_enable(struct device_node* node, long param, long value) | |||
1380 | return 0; | 1380 | return 0; |
1381 | } | 1381 | } |
1382 | 1382 | ||
1383 | static long __pmac | 1383 | static long |
1384 | g5_fw_enable(struct device_node* node, long param, long value) | 1384 | g5_fw_enable(struct device_node* node, long param, long value) |
1385 | { | 1385 | { |
1386 | struct macio_chip* macio = &macio_chips[0]; | 1386 | struct macio_chip* macio = &macio_chips[0]; |
@@ -1403,7 +1403,7 @@ g5_fw_enable(struct device_node* node, long param, long value) | |||
1403 | return 0; | 1403 | return 0; |
1404 | } | 1404 | } |
1405 | 1405 | ||
1406 | static long __pmac | 1406 | static long |
1407 | g5_mpic_enable(struct device_node* node, long param, long value) | 1407 | g5_mpic_enable(struct device_node* node, long param, long value) |
1408 | { | 1408 | { |
1409 | unsigned long flags; | 1409 | unsigned long flags; |
@@ -1419,7 +1419,7 @@ g5_mpic_enable(struct device_node* node, long param, long value) | |||
1419 | } | 1419 | } |
1420 | 1420 | ||
1421 | #ifdef CONFIG_SMP | 1421 | #ifdef CONFIG_SMP |
1422 | static long __pmac | 1422 | static long |
1423 | g5_reset_cpu(struct device_node* node, long param, long value) | 1423 | g5_reset_cpu(struct device_node* node, long param, long value) |
1424 | { | 1424 | { |
1425 | unsigned int reset_io = 0; | 1425 | unsigned int reset_io = 0; |
@@ -1465,7 +1465,7 @@ g5_reset_cpu(struct device_node* node, long param, long value) | |||
1465 | * This takes the second CPU off the bus on dual CPU machines | 1465 | * This takes the second CPU off the bus on dual CPU machines |
1466 | * running UP | 1466 | * running UP |
1467 | */ | 1467 | */ |
1468 | void __pmac g5_phy_disable_cpu1(void) | 1468 | void g5_phy_disable_cpu1(void) |
1469 | { | 1469 | { |
1470 | UN_OUT(U3_API_PHY_CONFIG_1, 0); | 1470 | UN_OUT(U3_API_PHY_CONFIG_1, 0); |
1471 | } | 1471 | } |
@@ -1474,7 +1474,7 @@ void __pmac g5_phy_disable_cpu1(void) | |||
1474 | 1474 | ||
1475 | #ifndef CONFIG_POWER4 | 1475 | #ifndef CONFIG_POWER4 |
1476 | 1476 | ||
1477 | static void __pmac | 1477 | static void |
1478 | keylargo_shutdown(struct macio_chip* macio, int sleep_mode) | 1478 | keylargo_shutdown(struct macio_chip* macio, int sleep_mode) |
1479 | { | 1479 | { |
1480 | u32 temp; | 1480 | u32 temp; |
@@ -1528,7 +1528,7 @@ keylargo_shutdown(struct macio_chip* macio, int sleep_mode) | |||
1528 | (void)MACIO_IN32(KEYLARGO_FCR0); mdelay(1); | 1528 | (void)MACIO_IN32(KEYLARGO_FCR0); mdelay(1); |
1529 | } | 1529 | } |
1530 | 1530 | ||
1531 | static void __pmac | 1531 | static void |
1532 | pangea_shutdown(struct macio_chip* macio, int sleep_mode) | 1532 | pangea_shutdown(struct macio_chip* macio, int sleep_mode) |
1533 | { | 1533 | { |
1534 | u32 temp; | 1534 | u32 temp; |
@@ -1562,7 +1562,7 @@ pangea_shutdown(struct macio_chip* macio, int sleep_mode) | |||
1562 | (void)MACIO_IN32(KEYLARGO_FCR0); mdelay(1); | 1562 | (void)MACIO_IN32(KEYLARGO_FCR0); mdelay(1); |
1563 | } | 1563 | } |
1564 | 1564 | ||
1565 | static void __pmac | 1565 | static void |
1566 | intrepid_shutdown(struct macio_chip* macio, int sleep_mode) | 1566 | intrepid_shutdown(struct macio_chip* macio, int sleep_mode) |
1567 | { | 1567 | { |
1568 | u32 temp; | 1568 | u32 temp; |
@@ -1591,7 +1591,7 @@ intrepid_shutdown(struct macio_chip* macio, int sleep_mode) | |||
1591 | } | 1591 | } |
1592 | 1592 | ||
1593 | 1593 | ||
1594 | void __pmac pmac_tweak_clock_spreading(int enable) | 1594 | void pmac_tweak_clock_spreading(int enable) |
1595 | { | 1595 | { |
1596 | struct macio_chip* macio = &macio_chips[0]; | 1596 | struct macio_chip* macio = &macio_chips[0]; |
1597 | 1597 | ||
@@ -1698,7 +1698,7 @@ void __pmac pmac_tweak_clock_spreading(int enable) | |||
1698 | } | 1698 | } |
1699 | 1699 | ||
1700 | 1700 | ||
1701 | static int __pmac | 1701 | static int |
1702 | core99_sleep(void) | 1702 | core99_sleep(void) |
1703 | { | 1703 | { |
1704 | struct macio_chip* macio; | 1704 | struct macio_chip* macio; |
@@ -1791,7 +1791,7 @@ core99_sleep(void) | |||
1791 | return 0; | 1791 | return 0; |
1792 | } | 1792 | } |
1793 | 1793 | ||
1794 | static int __pmac | 1794 | static int |
1795 | core99_wake_up(void) | 1795 | core99_wake_up(void) |
1796 | { | 1796 | { |
1797 | struct macio_chip* macio; | 1797 | struct macio_chip* macio; |
@@ -1854,7 +1854,7 @@ core99_wake_up(void) | |||
1854 | return 0; | 1854 | return 0; |
1855 | } | 1855 | } |
1856 | 1856 | ||
1857 | static long __pmac | 1857 | static long |
1858 | core99_sleep_state(struct device_node* node, long param, long value) | 1858 | core99_sleep_state(struct device_node* node, long param, long value) |
1859 | { | 1859 | { |
1860 | /* Param == 1 means to enter the "fake sleep" mode that is | 1860 | /* Param == 1 means to enter the "fake sleep" mode that is |
@@ -1884,7 +1884,7 @@ core99_sleep_state(struct device_node* node, long param, long value) | |||
1884 | 1884 | ||
1885 | #endif /* CONFIG_POWER4 */ | 1885 | #endif /* CONFIG_POWER4 */ |
1886 | 1886 | ||
1887 | static long __pmac | 1887 | static long |
1888 | generic_dev_can_wake(struct device_node* node, long param, long value) | 1888 | generic_dev_can_wake(struct device_node* node, long param, long value) |
1889 | { | 1889 | { |
1890 | /* Todo: eventually check we are really dealing with on-board | 1890 | /* Todo: eventually check we are really dealing with on-board |
@@ -1896,7 +1896,7 @@ generic_dev_can_wake(struct device_node* node, long param, long value) | |||
1896 | return 0; | 1896 | return 0; |
1897 | } | 1897 | } |
1898 | 1898 | ||
1899 | static long __pmac | 1899 | static long |
1900 | generic_get_mb_info(struct device_node* node, long param, long value) | 1900 | generic_get_mb_info(struct device_node* node, long param, long value) |
1901 | { | 1901 | { |
1902 | switch(param) { | 1902 | switch(param) { |
@@ -1919,7 +1919,7 @@ generic_get_mb_info(struct device_node* node, long param, long value) | |||
1919 | 1919 | ||
1920 | /* Used on any machine | 1920 | /* Used on any machine |
1921 | */ | 1921 | */ |
1922 | static struct feature_table_entry any_features[] __pmacdata = { | 1922 | static struct feature_table_entry any_features[] = { |
1923 | { PMAC_FTR_GET_MB_INFO, generic_get_mb_info }, | 1923 | { PMAC_FTR_GET_MB_INFO, generic_get_mb_info }, |
1924 | { PMAC_FTR_DEVICE_CAN_WAKE, generic_dev_can_wake }, | 1924 | { PMAC_FTR_DEVICE_CAN_WAKE, generic_dev_can_wake }, |
1925 | { 0, NULL } | 1925 | { 0, NULL } |
@@ -1931,7 +1931,7 @@ static struct feature_table_entry any_features[] __pmacdata = { | |||
1931 | * 2400,3400 and 3500 series powerbooks. Some older desktops seem | 1931 | * 2400,3400 and 3500 series powerbooks. Some older desktops seem |
1932 | * to have issues with turning on/off those asic cells | 1932 | * to have issues with turning on/off those asic cells |
1933 | */ | 1933 | */ |
1934 | static struct feature_table_entry ohare_features[] __pmacdata = { | 1934 | static struct feature_table_entry ohare_features[] = { |
1935 | { PMAC_FTR_SCC_ENABLE, ohare_htw_scc_enable }, | 1935 | { PMAC_FTR_SCC_ENABLE, ohare_htw_scc_enable }, |
1936 | { PMAC_FTR_SWIM3_ENABLE, ohare_floppy_enable }, | 1936 | { PMAC_FTR_SWIM3_ENABLE, ohare_floppy_enable }, |
1937 | { PMAC_FTR_MESH_ENABLE, ohare_mesh_enable }, | 1937 | { PMAC_FTR_MESH_ENABLE, ohare_mesh_enable }, |
@@ -1945,7 +1945,7 @@ static struct feature_table_entry ohare_features[] __pmacdata = { | |||
1945 | * Separated as some features couldn't be properly tested | 1945 | * Separated as some features couldn't be properly tested |
1946 | * and the serial port control bits appear to confuse it. | 1946 | * and the serial port control bits appear to confuse it. |
1947 | */ | 1947 | */ |
1948 | static struct feature_table_entry heathrow_desktop_features[] __pmacdata = { | 1948 | static struct feature_table_entry heathrow_desktop_features[] = { |
1949 | { PMAC_FTR_SWIM3_ENABLE, heathrow_floppy_enable }, | 1949 | { PMAC_FTR_SWIM3_ENABLE, heathrow_floppy_enable }, |
1950 | { PMAC_FTR_MESH_ENABLE, heathrow_mesh_enable }, | 1950 | { PMAC_FTR_MESH_ENABLE, heathrow_mesh_enable }, |
1951 | { PMAC_FTR_IDE_ENABLE, heathrow_ide_enable }, | 1951 | { PMAC_FTR_IDE_ENABLE, heathrow_ide_enable }, |
@@ -1957,7 +1957,7 @@ static struct feature_table_entry heathrow_desktop_features[] __pmacdata = { | |||
1957 | /* Heathrow based laptop, that is the Wallstreet and mainstreet | 1957 | /* Heathrow based laptop, that is the Wallstreet and mainstreet |
1958 | * powerbooks. | 1958 | * powerbooks. |
1959 | */ | 1959 | */ |
1960 | static struct feature_table_entry heathrow_laptop_features[] __pmacdata = { | 1960 | static struct feature_table_entry heathrow_laptop_features[] = { |
1961 | { PMAC_FTR_SCC_ENABLE, ohare_htw_scc_enable }, | 1961 | { PMAC_FTR_SCC_ENABLE, ohare_htw_scc_enable }, |
1962 | { PMAC_FTR_MODEM_ENABLE, heathrow_modem_enable }, | 1962 | { PMAC_FTR_MODEM_ENABLE, heathrow_modem_enable }, |
1963 | { PMAC_FTR_SWIM3_ENABLE, heathrow_floppy_enable }, | 1963 | { PMAC_FTR_SWIM3_ENABLE, heathrow_floppy_enable }, |
@@ -1973,7 +1973,7 @@ static struct feature_table_entry heathrow_laptop_features[] __pmacdata = { | |||
1973 | /* Paddington based machines | 1973 | /* Paddington based machines |
1974 | * The lombard (101) powerbook, first iMac models, B&W G3 and Yikes G4. | 1974 | * The lombard (101) powerbook, first iMac models, B&W G3 and Yikes G4. |
1975 | */ | 1975 | */ |
1976 | static struct feature_table_entry paddington_features[] __pmacdata = { | 1976 | static struct feature_table_entry paddington_features[] = { |
1977 | { PMAC_FTR_SCC_ENABLE, ohare_htw_scc_enable }, | 1977 | { PMAC_FTR_SCC_ENABLE, ohare_htw_scc_enable }, |
1978 | { PMAC_FTR_MODEM_ENABLE, heathrow_modem_enable }, | 1978 | { PMAC_FTR_MODEM_ENABLE, heathrow_modem_enable }, |
1979 | { PMAC_FTR_SWIM3_ENABLE, heathrow_floppy_enable }, | 1979 | { PMAC_FTR_SWIM3_ENABLE, heathrow_floppy_enable }, |
@@ -1991,7 +1991,7 @@ static struct feature_table_entry paddington_features[] __pmacdata = { | |||
1991 | * chipset. The pangea chipset is the "combo" UniNorth/KeyLargo | 1991 | * chipset. The pangea chipset is the "combo" UniNorth/KeyLargo |
1992 | * used on iBook2 & iMac "flow power". | 1992 | * used on iBook2 & iMac "flow power". |
1993 | */ | 1993 | */ |
1994 | static struct feature_table_entry core99_features[] __pmacdata = { | 1994 | static struct feature_table_entry core99_features[] = { |
1995 | { PMAC_FTR_SCC_ENABLE, core99_scc_enable }, | 1995 | { PMAC_FTR_SCC_ENABLE, core99_scc_enable }, |
1996 | { PMAC_FTR_MODEM_ENABLE, core99_modem_enable }, | 1996 | { PMAC_FTR_MODEM_ENABLE, core99_modem_enable }, |
1997 | { PMAC_FTR_IDE_ENABLE, core99_ide_enable }, | 1997 | { PMAC_FTR_IDE_ENABLE, core99_ide_enable }, |
@@ -2014,7 +2014,7 @@ static struct feature_table_entry core99_features[] __pmacdata = { | |||
2014 | 2014 | ||
2015 | /* RackMac | 2015 | /* RackMac |
2016 | */ | 2016 | */ |
2017 | static struct feature_table_entry rackmac_features[] __pmacdata = { | 2017 | static struct feature_table_entry rackmac_features[] = { |
2018 | { PMAC_FTR_SCC_ENABLE, core99_scc_enable }, | 2018 | { PMAC_FTR_SCC_ENABLE, core99_scc_enable }, |
2019 | { PMAC_FTR_IDE_ENABLE, core99_ide_enable }, | 2019 | { PMAC_FTR_IDE_ENABLE, core99_ide_enable }, |
2020 | { PMAC_FTR_IDE_RESET, core99_ide_reset }, | 2020 | { PMAC_FTR_IDE_RESET, core99_ide_reset }, |
@@ -2034,7 +2034,7 @@ static struct feature_table_entry rackmac_features[] __pmacdata = { | |||
2034 | 2034 | ||
2035 | /* Pangea features | 2035 | /* Pangea features |
2036 | */ | 2036 | */ |
2037 | static struct feature_table_entry pangea_features[] __pmacdata = { | 2037 | static struct feature_table_entry pangea_features[] = { |
2038 | { PMAC_FTR_SCC_ENABLE, core99_scc_enable }, | 2038 | { PMAC_FTR_SCC_ENABLE, core99_scc_enable }, |
2039 | { PMAC_FTR_MODEM_ENABLE, pangea_modem_enable }, | 2039 | { PMAC_FTR_MODEM_ENABLE, pangea_modem_enable }, |
2040 | { PMAC_FTR_IDE_ENABLE, core99_ide_enable }, | 2040 | { PMAC_FTR_IDE_ENABLE, core99_ide_enable }, |
@@ -2054,7 +2054,7 @@ static struct feature_table_entry pangea_features[] __pmacdata = { | |||
2054 | 2054 | ||
2055 | /* Intrepid features | 2055 | /* Intrepid features |
2056 | */ | 2056 | */ |
2057 | static struct feature_table_entry intrepid_features[] __pmacdata = { | 2057 | static struct feature_table_entry intrepid_features[] = { |
2058 | { PMAC_FTR_SCC_ENABLE, core99_scc_enable }, | 2058 | { PMAC_FTR_SCC_ENABLE, core99_scc_enable }, |
2059 | { PMAC_FTR_MODEM_ENABLE, pangea_modem_enable }, | 2059 | { PMAC_FTR_MODEM_ENABLE, pangea_modem_enable }, |
2060 | { PMAC_FTR_IDE_ENABLE, core99_ide_enable }, | 2060 | { PMAC_FTR_IDE_ENABLE, core99_ide_enable }, |
@@ -2077,7 +2077,7 @@ static struct feature_table_entry intrepid_features[] __pmacdata = { | |||
2077 | 2077 | ||
2078 | /* G5 features | 2078 | /* G5 features |
2079 | */ | 2079 | */ |
2080 | static struct feature_table_entry g5_features[] __pmacdata = { | 2080 | static struct feature_table_entry g5_features[] = { |
2081 | { PMAC_FTR_GMAC_ENABLE, g5_gmac_enable }, | 2081 | { PMAC_FTR_GMAC_ENABLE, g5_gmac_enable }, |
2082 | { PMAC_FTR_1394_ENABLE, g5_fw_enable }, | 2082 | { PMAC_FTR_1394_ENABLE, g5_fw_enable }, |
2083 | { PMAC_FTR_ENABLE_MPIC, g5_mpic_enable }, | 2083 | { PMAC_FTR_ENABLE_MPIC, g5_mpic_enable }, |
@@ -2091,7 +2091,7 @@ static struct feature_table_entry g5_features[] __pmacdata = { | |||
2091 | 2091 | ||
2092 | #endif /* CONFIG_POWER4 */ | 2092 | #endif /* CONFIG_POWER4 */ |
2093 | 2093 | ||
2094 | static struct pmac_mb_def pmac_mb_defs[] __pmacdata = { | 2094 | static struct pmac_mb_def pmac_mb_defs[] = { |
2095 | #ifndef CONFIG_POWER4 | 2095 | #ifndef CONFIG_POWER4 |
2096 | /* | 2096 | /* |
2097 | * Desktops | 2097 | * Desktops |
@@ -2352,7 +2352,7 @@ static struct pmac_mb_def pmac_mb_defs[] __pmacdata = { | |||
2352 | /* | 2352 | /* |
2353 | * The toplevel feature_call callback | 2353 | * The toplevel feature_call callback |
2354 | */ | 2354 | */ |
2355 | long __pmac | 2355 | long |
2356 | pmac_do_feature_call(unsigned int selector, ...) | 2356 | pmac_do_feature_call(unsigned int selector, ...) |
2357 | { | 2357 | { |
2358 | struct device_node* node; | 2358 | struct device_node* node; |
@@ -2935,8 +2935,8 @@ void __init pmac_check_ht_link(void) | |||
2935 | * Early video resume hook | 2935 | * Early video resume hook |
2936 | */ | 2936 | */ |
2937 | 2937 | ||
2938 | static void (*pmac_early_vresume_proc)(void *data) __pmacdata; | 2938 | static void (*pmac_early_vresume_proc)(void *data); |
2939 | static void *pmac_early_vresume_data __pmacdata; | 2939 | static void *pmac_early_vresume_data; |
2940 | 2940 | ||
2941 | void pmac_set_early_video_resume(void (*proc)(void *data), void *data) | 2941 | void pmac_set_early_video_resume(void (*proc)(void *data), void *data) |
2942 | { | 2942 | { |
@@ -2949,7 +2949,7 @@ void pmac_set_early_video_resume(void (*proc)(void *data), void *data) | |||
2949 | } | 2949 | } |
2950 | EXPORT_SYMBOL(pmac_set_early_video_resume); | 2950 | EXPORT_SYMBOL(pmac_set_early_video_resume); |
2951 | 2951 | ||
2952 | void __pmac pmac_call_early_video_resume(void) | 2952 | void pmac_call_early_video_resume(void) |
2953 | { | 2953 | { |
2954 | if (pmac_early_vresume_proc) | 2954 | if (pmac_early_vresume_proc) |
2955 | pmac_early_vresume_proc(pmac_early_vresume_data); | 2955 | pmac_early_vresume_proc(pmac_early_vresume_data); |
@@ -2959,11 +2959,11 @@ void __pmac pmac_call_early_video_resume(void) | |||
2959 | * AGP related suspend/resume code | 2959 | * AGP related suspend/resume code |
2960 | */ | 2960 | */ |
2961 | 2961 | ||
2962 | static struct pci_dev *pmac_agp_bridge __pmacdata; | 2962 | static struct pci_dev *pmac_agp_bridge; |
2963 | static int (*pmac_agp_suspend)(struct pci_dev *bridge) __pmacdata; | 2963 | static int (*pmac_agp_suspend)(struct pci_dev *bridge); |
2964 | static int (*pmac_agp_resume)(struct pci_dev *bridge) __pmacdata; | 2964 | static int (*pmac_agp_resume)(struct pci_dev *bridge); |
2965 | 2965 | ||
2966 | void __pmac pmac_register_agp_pm(struct pci_dev *bridge, | 2966 | void pmac_register_agp_pm(struct pci_dev *bridge, |
2967 | int (*suspend)(struct pci_dev *bridge), | 2967 | int (*suspend)(struct pci_dev *bridge), |
2968 | int (*resume)(struct pci_dev *bridge)) | 2968 | int (*resume)(struct pci_dev *bridge)) |
2969 | { | 2969 | { |
@@ -2980,7 +2980,7 @@ void __pmac pmac_register_agp_pm(struct pci_dev *bridge, | |||
2980 | } | 2980 | } |
2981 | EXPORT_SYMBOL(pmac_register_agp_pm); | 2981 | EXPORT_SYMBOL(pmac_register_agp_pm); |
2982 | 2982 | ||
2983 | void __pmac pmac_suspend_agp_for_card(struct pci_dev *dev) | 2983 | void pmac_suspend_agp_for_card(struct pci_dev *dev) |
2984 | { | 2984 | { |
2985 | if (pmac_agp_bridge == NULL || pmac_agp_suspend == NULL) | 2985 | if (pmac_agp_bridge == NULL || pmac_agp_suspend == NULL) |
2986 | return; | 2986 | return; |
@@ -2990,7 +2990,7 @@ void __pmac pmac_suspend_agp_for_card(struct pci_dev *dev) | |||
2990 | } | 2990 | } |
2991 | EXPORT_SYMBOL(pmac_suspend_agp_for_card); | 2991 | EXPORT_SYMBOL(pmac_suspend_agp_for_card); |
2992 | 2992 | ||
2993 | void __pmac pmac_resume_agp_for_card(struct pci_dev *dev) | 2993 | void pmac_resume_agp_for_card(struct pci_dev *dev) |
2994 | { | 2994 | { |
2995 | if (pmac_agp_bridge == NULL || pmac_agp_resume == NULL) | 2995 | if (pmac_agp_bridge == NULL || pmac_agp_resume == NULL) |
2996 | return; | 2996 | return; |