diff options
Diffstat (limited to 'arch/ppc/platforms')
46 files changed, 595 insertions, 485 deletions
diff --git a/arch/ppc/platforms/4xx/bamboo.c b/arch/ppc/platforms/4xx/bamboo.c index 78a403b48dba..159b228eca1e 100644 --- a/arch/ppc/platforms/4xx/bamboo.c +++ b/arch/ppc/platforms/4xx/bamboo.c | |||
@@ -51,7 +51,7 @@ | |||
51 | #include <syslib/gen550.h> | 51 | #include <syslib/gen550.h> |
52 | #include <syslib/ibm440gx_common.h> | 52 | #include <syslib/ibm440gx_common.h> |
53 | 53 | ||
54 | bd_t __res; | 54 | extern bd_t __res; |
55 | 55 | ||
56 | static struct ibm44x_clocks clocks __initdata; | 56 | static struct ibm44x_clocks clocks __initdata; |
57 | 57 | ||
@@ -425,17 +425,7 @@ bamboo_setup_arch(void) | |||
425 | void __init platform_init(unsigned long r3, unsigned long r4, | 425 | void __init platform_init(unsigned long r3, unsigned long r4, |
426 | unsigned long r5, unsigned long r6, unsigned long r7) | 426 | unsigned long r5, unsigned long r6, unsigned long r7) |
427 | { | 427 | { |
428 | parse_bootinfo(find_bootinfo()); | 428 | ibm44x_platform_init(r3, r4, r5, r6, r7); |
429 | |||
430 | /* | ||
431 | * If we were passed in a board information, copy it into the | ||
432 | * residual data area. | ||
433 | */ | ||
434 | if (r3) | ||
435 | __res = *(bd_t *)(r3 + KERNELBASE); | ||
436 | |||
437 | |||
438 | ibm44x_platform_init(); | ||
439 | 429 | ||
440 | ppc_md.setup_arch = bamboo_setup_arch; | 430 | ppc_md.setup_arch = bamboo_setup_arch; |
441 | ppc_md.show_cpuinfo = bamboo_show_cpuinfo; | 431 | ppc_md.show_cpuinfo = bamboo_show_cpuinfo; |
diff --git a/arch/ppc/platforms/4xx/ebony.c b/arch/ppc/platforms/4xx/ebony.c index 27b778ab903b..64ebae19cdbb 100644 --- a/arch/ppc/platforms/4xx/ebony.c +++ b/arch/ppc/platforms/4xx/ebony.c | |||
@@ -54,7 +54,7 @@ | |||
54 | #include <syslib/gen550.h> | 54 | #include <syslib/gen550.h> |
55 | #include <syslib/ibm440gp_common.h> | 55 | #include <syslib/ibm440gp_common.h> |
56 | 56 | ||
57 | bd_t __res; | 57 | extern bd_t __res; |
58 | 58 | ||
59 | static struct ibm44x_clocks clocks __initdata; | 59 | static struct ibm44x_clocks clocks __initdata; |
60 | 60 | ||
@@ -90,7 +90,7 @@ ebony_calibrate_decr(void) | |||
90 | * on Rev. C silicon then errata forces us to | 90 | * on Rev. C silicon then errata forces us to |
91 | * use the internal clock. | 91 | * use the internal clock. |
92 | */ | 92 | */ |
93 | if (strcmp(cur_cpu_spec[0]->cpu_name, "440GP Rev. B") == 0) | 93 | if (strcmp(cur_cpu_spec->cpu_name, "440GP Rev. B") == 0) |
94 | freq = EBONY_440GP_RB_SYSCLK; | 94 | freq = EBONY_440GP_RB_SYSCLK; |
95 | else | 95 | else |
96 | freq = EBONY_440GP_RC_SYSCLK; | 96 | freq = EBONY_440GP_RC_SYSCLK; |
@@ -317,16 +317,7 @@ ebony_setup_arch(void) | |||
317 | void __init platform_init(unsigned long r3, unsigned long r4, | 317 | void __init platform_init(unsigned long r3, unsigned long r4, |
318 | unsigned long r5, unsigned long r6, unsigned long r7) | 318 | unsigned long r5, unsigned long r6, unsigned long r7) |
319 | { | 319 | { |
320 | parse_bootinfo(find_bootinfo()); | 320 | ibm44x_platform_init(r3, r4, r5, r6, r7); |
321 | |||
322 | /* | ||
323 | * If we were passed in a board information, copy it into the | ||
324 | * residual data area. | ||
325 | */ | ||
326 | if (r3) | ||
327 | __res = *(bd_t *)(r3 + KERNELBASE); | ||
328 | |||
329 | ibm44x_platform_init(); | ||
330 | 321 | ||
331 | ppc_md.setup_arch = ebony_setup_arch; | 322 | ppc_md.setup_arch = ebony_setup_arch; |
332 | ppc_md.show_cpuinfo = ebony_show_cpuinfo; | 323 | ppc_md.show_cpuinfo = ebony_show_cpuinfo; |
diff --git a/arch/ppc/platforms/4xx/luan.c b/arch/ppc/platforms/4xx/luan.c index 16d953bda22c..d810b736d9bf 100644 --- a/arch/ppc/platforms/4xx/luan.c +++ b/arch/ppc/platforms/4xx/luan.c | |||
@@ -52,7 +52,7 @@ | |||
52 | #include <syslib/ibm440gx_common.h> | 52 | #include <syslib/ibm440gx_common.h> |
53 | #include <syslib/ibm440sp_common.h> | 53 | #include <syslib/ibm440sp_common.h> |
54 | 54 | ||
55 | bd_t __res; | 55 | extern bd_t __res; |
56 | 56 | ||
57 | static struct ibm44x_clocks clocks __initdata; | 57 | static struct ibm44x_clocks clocks __initdata; |
58 | 58 | ||
@@ -355,16 +355,7 @@ luan_setup_arch(void) | |||
355 | void __init platform_init(unsigned long r3, unsigned long r4, | 355 | void __init platform_init(unsigned long r3, unsigned long r4, |
356 | unsigned long r5, unsigned long r6, unsigned long r7) | 356 | unsigned long r5, unsigned long r6, unsigned long r7) |
357 | { | 357 | { |
358 | parse_bootinfo(find_bootinfo()); | 358 | ibm44x_platform_init(r3, r4, r5, r6, r7); |
359 | |||
360 | /* | ||
361 | * If we were passed in a board information, copy it into the | ||
362 | * residual data area. | ||
363 | */ | ||
364 | if (r3) | ||
365 | __res = *(bd_t *)(r3 + KERNELBASE); | ||
366 | |||
367 | ibm44x_platform_init(); | ||
368 | 359 | ||
369 | ppc_md.setup_arch = luan_setup_arch; | 360 | ppc_md.setup_arch = luan_setup_arch; |
370 | ppc_md.show_cpuinfo = luan_show_cpuinfo; | 361 | ppc_md.show_cpuinfo = luan_show_cpuinfo; |
diff --git a/arch/ppc/platforms/4xx/ocotea.c b/arch/ppc/platforms/4xx/ocotea.c index 506949c5dd29..73b2c98158f6 100644 --- a/arch/ppc/platforms/4xx/ocotea.c +++ b/arch/ppc/platforms/4xx/ocotea.c | |||
@@ -52,7 +52,7 @@ | |||
52 | #include <syslib/gen550.h> | 52 | #include <syslib/gen550.h> |
53 | #include <syslib/ibm440gx_common.h> | 53 | #include <syslib/ibm440gx_common.h> |
54 | 54 | ||
55 | bd_t __res; | 55 | extern bd_t __res; |
56 | 56 | ||
57 | static struct ibm44x_clocks clocks __initdata; | 57 | static struct ibm44x_clocks clocks __initdata; |
58 | 58 | ||
@@ -286,6 +286,15 @@ ocotea_setup_arch(void) | |||
286 | 286 | ||
287 | ibm440gx_tah_enable(); | 287 | ibm440gx_tah_enable(); |
288 | 288 | ||
289 | /* | ||
290 | * Determine various clocks. | ||
291 | * To be completely correct we should get SysClk | ||
292 | * from FPGA, because it can be changed by on-board switches | ||
293 | * --ebs | ||
294 | */ | ||
295 | ibm440gx_get_clocks(&clocks, 33333333, 6 * 1843200); | ||
296 | ocp_sys_info.opb_bus_freq = clocks.opb; | ||
297 | |||
289 | /* Setup TODC access */ | 298 | /* Setup TODC access */ |
290 | TODC_INIT(TODC_TYPE_DS1743, | 299 | TODC_INIT(TODC_TYPE_DS1743, |
291 | 0, | 300 | 0, |
@@ -324,25 +333,7 @@ static void __init ocotea_init(void) | |||
324 | void __init platform_init(unsigned long r3, unsigned long r4, | 333 | void __init platform_init(unsigned long r3, unsigned long r4, |
325 | unsigned long r5, unsigned long r6, unsigned long r7) | 334 | unsigned long r5, unsigned long r6, unsigned long r7) |
326 | { | 335 | { |
327 | parse_bootinfo(find_bootinfo()); | 336 | ibm44x_platform_init(r3, r4, r5, r6, r7); |
328 | |||
329 | /* | ||
330 | * If we were passed in a board information, copy it into the | ||
331 | * residual data area. | ||
332 | */ | ||
333 | if (r3) | ||
334 | __res = *(bd_t *)(r3 + KERNELBASE); | ||
335 | |||
336 | /* | ||
337 | * Determine various clocks. | ||
338 | * To be completely correct we should get SysClk | ||
339 | * from FPGA, because it can be changed by on-board switches | ||
340 | * --ebs | ||
341 | */ | ||
342 | ibm440gx_get_clocks(&clocks, 33333333, 6 * 1843200); | ||
343 | ocp_sys_info.opb_bus_freq = clocks.opb; | ||
344 | |||
345 | ibm44x_platform_init(); | ||
346 | 337 | ||
347 | ppc_md.setup_arch = ocotea_setup_arch; | 338 | ppc_md.setup_arch = ocotea_setup_arch; |
348 | ppc_md.show_cpuinfo = ocotea_show_cpuinfo; | 339 | ppc_md.show_cpuinfo = ocotea_show_cpuinfo; |
diff --git a/arch/ppc/platforms/83xx/mpc834x_sys.h b/arch/ppc/platforms/83xx/mpc834x_sys.h index 1584cd77a9ef..58e44c042535 100644 --- a/arch/ppc/platforms/83xx/mpc834x_sys.h +++ b/arch/ppc/platforms/83xx/mpc834x_sys.h | |||
@@ -19,7 +19,6 @@ | |||
19 | 19 | ||
20 | #include <linux/config.h> | 20 | #include <linux/config.h> |
21 | #include <linux/init.h> | 21 | #include <linux/init.h> |
22 | #include <linux/seq_file.h> | ||
23 | #include <syslib/ppc83xx_setup.h> | 22 | #include <syslib/ppc83xx_setup.h> |
24 | #include <asm/ppcboot.h> | 23 | #include <asm/ppcboot.h> |
25 | 24 | ||
diff --git a/arch/ppc/platforms/85xx/mpc8540_ads.c b/arch/ppc/platforms/85xx/mpc8540_ads.c index 7dc8a68acfd0..7e952c1228cb 100644 --- a/arch/ppc/platforms/85xx/mpc8540_ads.c +++ b/arch/ppc/platforms/85xx/mpc8540_ads.c | |||
@@ -52,6 +52,10 @@ | |||
52 | 52 | ||
53 | #include <syslib/ppc85xx_setup.h> | 53 | #include <syslib/ppc85xx_setup.h> |
54 | 54 | ||
55 | static const char *GFAR_PHY_0 = "phy0:0"; | ||
56 | static const char *GFAR_PHY_1 = "phy0:1"; | ||
57 | static const char *GFAR_PHY_3 = "phy0:3"; | ||
58 | |||
55 | /* ************************************************************************ | 59 | /* ************************************************************************ |
56 | * | 60 | * |
57 | * Setup the architecture | 61 | * Setup the architecture |
@@ -63,6 +67,7 @@ mpc8540ads_setup_arch(void) | |||
63 | bd_t *binfo = (bd_t *) __res; | 67 | bd_t *binfo = (bd_t *) __res; |
64 | unsigned int freq; | 68 | unsigned int freq; |
65 | struct gianfar_platform_data *pdata; | 69 | struct gianfar_platform_data *pdata; |
70 | struct gianfar_mdio_data *mdata; | ||
66 | 71 | ||
67 | /* get the core frequency */ | 72 | /* get the core frequency */ |
68 | freq = binfo->bi_intfreq; | 73 | freq = binfo->bi_intfreq; |
@@ -89,34 +94,35 @@ mpc8540ads_setup_arch(void) | |||
89 | invalidate_tlbcam_entry(num_tlbcam_entries - 1); | 94 | invalidate_tlbcam_entry(num_tlbcam_entries - 1); |
90 | #endif | 95 | #endif |
91 | 96 | ||
97 | /* setup the board related info for the MDIO bus */ | ||
98 | mdata = (struct gianfar_mdio_data *) ppc_sys_get_pdata(MPC85xx_MDIO); | ||
99 | |||
100 | mdata->irq[0] = MPC85xx_IRQ_EXT5; | ||
101 | mdata->irq[1] = MPC85xx_IRQ_EXT5; | ||
102 | mdata->irq[2] = -1; | ||
103 | mdata->irq[3] = MPC85xx_IRQ_EXT5; | ||
104 | mdata->irq[31] = -1; | ||
105 | mdata->paddr += binfo->bi_immr_base; | ||
106 | |||
92 | /* setup the board related information for the enet controllers */ | 107 | /* setup the board related information for the enet controllers */ |
93 | pdata = (struct gianfar_platform_data *) ppc_sys_get_pdata(MPC85xx_TSEC1); | 108 | pdata = (struct gianfar_platform_data *) ppc_sys_get_pdata(MPC85xx_TSEC1); |
94 | if (pdata) { | 109 | if (pdata) { |
95 | pdata->board_flags = FSL_GIANFAR_BRD_HAS_PHY_INTR; | 110 | pdata->board_flags = FSL_GIANFAR_BRD_HAS_PHY_INTR; |
96 | pdata->interruptPHY = MPC85xx_IRQ_EXT5; | 111 | pdata->bus_id = GFAR_PHY_0; |
97 | pdata->phyid = 0; | ||
98 | /* fixup phy address */ | ||
99 | pdata->phy_reg_addr += binfo->bi_immr_base; | ||
100 | memcpy(pdata->mac_addr, binfo->bi_enetaddr, 6); | 112 | memcpy(pdata->mac_addr, binfo->bi_enetaddr, 6); |
101 | } | 113 | } |
102 | 114 | ||
103 | pdata = (struct gianfar_platform_data *) ppc_sys_get_pdata(MPC85xx_TSEC2); | 115 | pdata = (struct gianfar_platform_data *) ppc_sys_get_pdata(MPC85xx_TSEC2); |
104 | if (pdata) { | 116 | if (pdata) { |
105 | pdata->board_flags = FSL_GIANFAR_BRD_HAS_PHY_INTR; | 117 | pdata->board_flags = FSL_GIANFAR_BRD_HAS_PHY_INTR; |
106 | pdata->interruptPHY = MPC85xx_IRQ_EXT5; | 118 | pdata->bus_id = GFAR_PHY_1; |
107 | pdata->phyid = 1; | ||
108 | /* fixup phy address */ | ||
109 | pdata->phy_reg_addr += binfo->bi_immr_base; | ||
110 | memcpy(pdata->mac_addr, binfo->bi_enet1addr, 6); | 119 | memcpy(pdata->mac_addr, binfo->bi_enet1addr, 6); |
111 | } | 120 | } |
112 | 121 | ||
113 | pdata = (struct gianfar_platform_data *) ppc_sys_get_pdata(MPC85xx_FEC); | 122 | pdata = (struct gianfar_platform_data *) ppc_sys_get_pdata(MPC85xx_FEC); |
114 | if (pdata) { | 123 | if (pdata) { |
115 | pdata->board_flags = 0; | 124 | pdata->board_flags = 0; |
116 | pdata->interruptPHY = MPC85xx_IRQ_EXT5; | 125 | pdata->bus_id = GFAR_PHY_3; |
117 | pdata->phyid = 3; | ||
118 | /* fixup phy address */ | ||
119 | pdata->phy_reg_addr += binfo->bi_immr_base; | ||
120 | memcpy(pdata->mac_addr, binfo->bi_enet2addr, 6); | 126 | memcpy(pdata->mac_addr, binfo->bi_enet2addr, 6); |
121 | } | 127 | } |
122 | 128 | ||
diff --git a/arch/ppc/platforms/85xx/mpc8560_ads.c b/arch/ppc/platforms/85xx/mpc8560_ads.c index 8841fd7da6ee..208433f1e93a 100644 --- a/arch/ppc/platforms/85xx/mpc8560_ads.c +++ b/arch/ppc/platforms/85xx/mpc8560_ads.c | |||
@@ -56,6 +56,10 @@ | |||
56 | #include <syslib/ppc85xx_setup.h> | 56 | #include <syslib/ppc85xx_setup.h> |
57 | 57 | ||
58 | 58 | ||
59 | static const char *GFAR_PHY_0 = "phy0:0"; | ||
60 | static const char *GFAR_PHY_1 = "phy0:1"; | ||
61 | static const char *GFAR_PHY_3 = "phy0:3"; | ||
62 | |||
59 | /* ************************************************************************ | 63 | /* ************************************************************************ |
60 | * | 64 | * |
61 | * Setup the architecture | 65 | * Setup the architecture |
@@ -68,6 +72,7 @@ mpc8560ads_setup_arch(void) | |||
68 | bd_t *binfo = (bd_t *) __res; | 72 | bd_t *binfo = (bd_t *) __res; |
69 | unsigned int freq; | 73 | unsigned int freq; |
70 | struct gianfar_platform_data *pdata; | 74 | struct gianfar_platform_data *pdata; |
75 | struct gianfar_mdio_data *mdata; | ||
71 | 76 | ||
72 | cpm2_reset(); | 77 | cpm2_reset(); |
73 | 78 | ||
@@ -86,24 +91,28 @@ mpc8560ads_setup_arch(void) | |||
86 | mpc85xx_setup_hose(); | 91 | mpc85xx_setup_hose(); |
87 | #endif | 92 | #endif |
88 | 93 | ||
94 | /* setup the board related info for the MDIO bus */ | ||
95 | mdata = (struct gianfar_mdio_data *) ppc_sys_get_pdata(MPC85xx_MDIO); | ||
96 | |||
97 | mdata->irq[0] = MPC85xx_IRQ_EXT5; | ||
98 | mdata->irq[1] = MPC85xx_IRQ_EXT5; | ||
99 | mdata->irq[2] = -1; | ||
100 | mdata->irq[3] = MPC85xx_IRQ_EXT5; | ||
101 | mdata->irq[31] = -1; | ||
102 | mdata->paddr += binfo->bi_immr_base; | ||
103 | |||
89 | /* setup the board related information for the enet controllers */ | 104 | /* setup the board related information for the enet controllers */ |
90 | pdata = (struct gianfar_platform_data *) ppc_sys_get_pdata(MPC85xx_TSEC1); | 105 | pdata = (struct gianfar_platform_data *) ppc_sys_get_pdata(MPC85xx_TSEC1); |
91 | if (pdata) { | 106 | if (pdata) { |
92 | pdata->board_flags = FSL_GIANFAR_BRD_HAS_PHY_INTR; | 107 | pdata->board_flags = FSL_GIANFAR_BRD_HAS_PHY_INTR; |
93 | pdata->interruptPHY = MPC85xx_IRQ_EXT5; | 108 | pdata->bus_id = GFAR_PHY_0; |
94 | pdata->phyid = 0; | ||
95 | /* fixup phy address */ | ||
96 | pdata->phy_reg_addr += binfo->bi_immr_base; | ||
97 | memcpy(pdata->mac_addr, binfo->bi_enetaddr, 6); | 109 | memcpy(pdata->mac_addr, binfo->bi_enetaddr, 6); |
98 | } | 110 | } |
99 | 111 | ||
100 | pdata = (struct gianfar_platform_data *) ppc_sys_get_pdata(MPC85xx_TSEC2); | 112 | pdata = (struct gianfar_platform_data *) ppc_sys_get_pdata(MPC85xx_TSEC2); |
101 | if (pdata) { | 113 | if (pdata) { |
102 | pdata->board_flags = FSL_GIANFAR_BRD_HAS_PHY_INTR; | 114 | pdata->board_flags = FSL_GIANFAR_BRD_HAS_PHY_INTR; |
103 | pdata->interruptPHY = MPC85xx_IRQ_EXT5; | 115 | pdata->bus_id = GFAR_PHY_1; |
104 | pdata->phyid = 1; | ||
105 | /* fixup phy address */ | ||
106 | pdata->phy_reg_addr += binfo->bi_immr_base; | ||
107 | memcpy(pdata->mac_addr, binfo->bi_enet1addr, 6); | 116 | memcpy(pdata->mac_addr, binfo->bi_enet1addr, 6); |
108 | } | 117 | } |
109 | 118 | ||
diff --git a/arch/ppc/platforms/85xx/mpc85xx_ads_common.h b/arch/ppc/platforms/85xx/mpc85xx_ads_common.h index 3875e839cff7..84acf6e8d45e 100644 --- a/arch/ppc/platforms/85xx/mpc85xx_ads_common.h +++ b/arch/ppc/platforms/85xx/mpc85xx_ads_common.h | |||
@@ -19,7 +19,6 @@ | |||
19 | 19 | ||
20 | #include <linux/config.h> | 20 | #include <linux/config.h> |
21 | #include <linux/init.h> | 21 | #include <linux/init.h> |
22 | #include <linux/seq_file.h> | ||
23 | #include <asm/ppcboot.h> | 22 | #include <asm/ppcboot.h> |
24 | 23 | ||
25 | #define BOARD_CCSRBAR ((uint)0xe0000000) | 24 | #define BOARD_CCSRBAR ((uint)0xe0000000) |
diff --git a/arch/ppc/platforms/85xx/mpc85xx_cds_common.c b/arch/ppc/platforms/85xx/mpc85xx_cds_common.c index 9f9039498ae5..a21156967a5e 100644 --- a/arch/ppc/platforms/85xx/mpc85xx_cds_common.c +++ b/arch/ppc/platforms/85xx/mpc85xx_cds_common.c | |||
@@ -173,10 +173,7 @@ mpc85xx_cds_init_IRQ(void) | |||
173 | #ifdef CONFIG_PCI | 173 | #ifdef CONFIG_PCI |
174 | openpic_hookup_cascade(PIRQ0A, "82c59 cascade", i8259_irq); | 174 | openpic_hookup_cascade(PIRQ0A, "82c59 cascade", i8259_irq); |
175 | 175 | ||
176 | for (i = 0; i < NUM_8259_INTERRUPTS; i++) | 176 | i8259_init(0, 0); |
177 | irq_desc[i].handler = &i8259_pic; | ||
178 | |||
179 | i8259_init(0); | ||
180 | #endif | 177 | #endif |
181 | 178 | ||
182 | #ifdef CONFIG_CPM2 | 179 | #ifdef CONFIG_CPM2 |
@@ -394,6 +391,9 @@ mpc85xx_cds_pcibios_fixup(void) | |||
394 | 391 | ||
395 | TODC_ALLOC(); | 392 | TODC_ALLOC(); |
396 | 393 | ||
394 | static const char *GFAR_PHY_0 = "phy0:0"; | ||
395 | static const char *GFAR_PHY_1 = "phy0:1"; | ||
396 | |||
397 | /* ************************************************************************ | 397 | /* ************************************************************************ |
398 | * | 398 | * |
399 | * Setup the architecture | 399 | * Setup the architecture |
@@ -405,6 +405,7 @@ mpc85xx_cds_setup_arch(void) | |||
405 | bd_t *binfo = (bd_t *) __res; | 405 | bd_t *binfo = (bd_t *) __res; |
406 | unsigned int freq; | 406 | unsigned int freq; |
407 | struct gianfar_platform_data *pdata; | 407 | struct gianfar_platform_data *pdata; |
408 | struct gianfar_mdio_data *mdata; | ||
408 | 409 | ||
409 | /* get the core frequency */ | 410 | /* get the core frequency */ |
410 | freq = binfo->bi_intfreq; | 411 | freq = binfo->bi_intfreq; |
@@ -448,44 +449,42 @@ mpc85xx_cds_setup_arch(void) | |||
448 | invalidate_tlbcam_entry(num_tlbcam_entries - 1); | 449 | invalidate_tlbcam_entry(num_tlbcam_entries - 1); |
449 | #endif | 450 | #endif |
450 | 451 | ||
452 | /* setup the board related info for the MDIO bus */ | ||
453 | mdata = (struct gianfar_mdio_data *) ppc_sys_get_pdata(MPC85xx_MDIO); | ||
454 | |||
455 | mdata->irq[0] = MPC85xx_IRQ_EXT5; | ||
456 | mdata->irq[1] = MPC85xx_IRQ_EXT5; | ||
457 | mdata->irq[2] = -1; | ||
458 | mdata->irq[3] = -1; | ||
459 | mdata->irq[31] = -1; | ||
460 | mdata->paddr += binfo->bi_immr_base; | ||
461 | |||
451 | /* setup the board related information for the enet controllers */ | 462 | /* setup the board related information for the enet controllers */ |
452 | pdata = (struct gianfar_platform_data *) ppc_sys_get_pdata(MPC85xx_TSEC1); | 463 | pdata = (struct gianfar_platform_data *) ppc_sys_get_pdata(MPC85xx_TSEC1); |
453 | if (pdata) { | 464 | if (pdata) { |
454 | pdata->board_flags = FSL_GIANFAR_BRD_HAS_PHY_INTR; | 465 | pdata->board_flags = FSL_GIANFAR_BRD_HAS_PHY_INTR; |
455 | pdata->interruptPHY = MPC85xx_IRQ_EXT5; | 466 | pdata->bus_id = GFAR_PHY_0; |
456 | pdata->phyid = 0; | ||
457 | /* fixup phy address */ | ||
458 | pdata->phy_reg_addr += binfo->bi_immr_base; | ||
459 | memcpy(pdata->mac_addr, binfo->bi_enetaddr, 6); | 467 | memcpy(pdata->mac_addr, binfo->bi_enetaddr, 6); |
460 | } | 468 | } |
461 | 469 | ||
462 | pdata = (struct gianfar_platform_data *) ppc_sys_get_pdata(MPC85xx_TSEC2); | 470 | pdata = (struct gianfar_platform_data *) ppc_sys_get_pdata(MPC85xx_TSEC2); |
463 | if (pdata) { | 471 | if (pdata) { |
464 | pdata->board_flags = FSL_GIANFAR_BRD_HAS_PHY_INTR; | 472 | pdata->board_flags = FSL_GIANFAR_BRD_HAS_PHY_INTR; |
465 | pdata->interruptPHY = MPC85xx_IRQ_EXT5; | 473 | pdata->bus_id = GFAR_PHY_1; |
466 | pdata->phyid = 1; | ||
467 | /* fixup phy address */ | ||
468 | pdata->phy_reg_addr += binfo->bi_immr_base; | ||
469 | memcpy(pdata->mac_addr, binfo->bi_enet1addr, 6); | 474 | memcpy(pdata->mac_addr, binfo->bi_enet1addr, 6); |
470 | } | 475 | } |
471 | 476 | ||
472 | pdata = (struct gianfar_platform_data *) ppc_sys_get_pdata(MPC85xx_eTSEC1); | 477 | pdata = (struct gianfar_platform_data *) ppc_sys_get_pdata(MPC85xx_eTSEC1); |
473 | if (pdata) { | 478 | if (pdata) { |
474 | pdata->board_flags = FSL_GIANFAR_BRD_HAS_PHY_INTR; | 479 | pdata->board_flags = FSL_GIANFAR_BRD_HAS_PHY_INTR; |
475 | pdata->interruptPHY = MPC85xx_IRQ_EXT5; | 480 | pdata->bus_id = GFAR_PHY_0; |
476 | pdata->phyid = 0; | ||
477 | /* fixup phy address */ | ||
478 | pdata->phy_reg_addr += binfo->bi_immr_base; | ||
479 | memcpy(pdata->mac_addr, binfo->bi_enetaddr, 6); | 481 | memcpy(pdata->mac_addr, binfo->bi_enetaddr, 6); |
480 | } | 482 | } |
481 | 483 | ||
482 | pdata = (struct gianfar_platform_data *) ppc_sys_get_pdata(MPC85xx_eTSEC2); | 484 | pdata = (struct gianfar_platform_data *) ppc_sys_get_pdata(MPC85xx_eTSEC2); |
483 | if (pdata) { | 485 | if (pdata) { |
484 | pdata->board_flags = FSL_GIANFAR_BRD_HAS_PHY_INTR; | 486 | pdata->board_flags = FSL_GIANFAR_BRD_HAS_PHY_INTR; |
485 | pdata->interruptPHY = MPC85xx_IRQ_EXT5; | 487 | pdata->bus_id = GFAR_PHY_1; |
486 | pdata->phyid = 1; | ||
487 | /* fixup phy address */ | ||
488 | pdata->phy_reg_addr += binfo->bi_immr_base; | ||
489 | memcpy(pdata->mac_addr, binfo->bi_enet1addr, 6); | 488 | memcpy(pdata->mac_addr, binfo->bi_enet1addr, 6); |
490 | } | 489 | } |
491 | 490 | ||
diff --git a/arch/ppc/platforms/85xx/sbc8560.c b/arch/ppc/platforms/85xx/sbc8560.c index c76760a781c1..b4ee1707a836 100644 --- a/arch/ppc/platforms/85xx/sbc8560.c +++ b/arch/ppc/platforms/85xx/sbc8560.c | |||
@@ -91,6 +91,9 @@ sbc8560_early_serial_map(void) | |||
91 | } | 91 | } |
92 | #endif | 92 | #endif |
93 | 93 | ||
94 | static const char *GFAR_PHY_25 = "phy0:25"; | ||
95 | static const char *GFAR_PHY_26 = "phy0:26"; | ||
96 | |||
94 | /* ************************************************************************ | 97 | /* ************************************************************************ |
95 | * | 98 | * |
96 | * Setup the architecture | 99 | * Setup the architecture |
@@ -102,6 +105,7 @@ sbc8560_setup_arch(void) | |||
102 | bd_t *binfo = (bd_t *) __res; | 105 | bd_t *binfo = (bd_t *) __res; |
103 | unsigned int freq; | 106 | unsigned int freq; |
104 | struct gianfar_platform_data *pdata; | 107 | struct gianfar_platform_data *pdata; |
108 | struct gianfar_mdio_data *mdata; | ||
105 | 109 | ||
106 | /* get the core frequency */ | 110 | /* get the core frequency */ |
107 | freq = binfo->bi_intfreq; | 111 | freq = binfo->bi_intfreq; |
@@ -126,24 +130,26 @@ sbc8560_setup_arch(void) | |||
126 | invalidate_tlbcam_entry(num_tlbcam_entries - 1); | 130 | invalidate_tlbcam_entry(num_tlbcam_entries - 1); |
127 | #endif | 131 | #endif |
128 | 132 | ||
133 | /* setup the board related info for the MDIO bus */ | ||
134 | mdata = (struct gianfar_mdio_data *) ppc_sys_get_pdata(MPC85xx_MDIO); | ||
135 | |||
136 | mdata->irq[25] = MPC85xx_IRQ_EXT6; | ||
137 | mdata->irq[26] = MPC85xx_IRQ_EXT7; | ||
138 | mdata->irq[31] = -1; | ||
139 | mdata->paddr += binfo->bi_immr_base; | ||
140 | |||
129 | /* setup the board related information for the enet controllers */ | 141 | /* setup the board related information for the enet controllers */ |
130 | pdata = (struct gianfar_platform_data *) ppc_sys_get_pdata(MPC85xx_TSEC1); | 142 | pdata = (struct gianfar_platform_data *) ppc_sys_get_pdata(MPC85xx_TSEC1); |
131 | if (pdata) { | 143 | if (pdata) { |
132 | pdata->board_flags = FSL_GIANFAR_BRD_HAS_PHY_INTR; | 144 | pdata->board_flags = FSL_GIANFAR_BRD_HAS_PHY_INTR; |
133 | pdata->interruptPHY = MPC85xx_IRQ_EXT6; | 145 | pdata->bus_id = GFAR_PHY_25; |
134 | pdata->phyid = 25; | ||
135 | /* fixup phy address */ | ||
136 | pdata->phy_reg_addr += binfo->bi_immr_base; | ||
137 | memcpy(pdata->mac_addr, binfo->bi_enetaddr, 6); | 146 | memcpy(pdata->mac_addr, binfo->bi_enetaddr, 6); |
138 | } | 147 | } |
139 | 148 | ||
140 | pdata = (struct gianfar_platform_data *) ppc_sys_get_pdata(MPC85xx_TSEC2); | 149 | pdata = (struct gianfar_platform_data *) ppc_sys_get_pdata(MPC85xx_TSEC2); |
141 | if (pdata) { | 150 | if (pdata) { |
142 | pdata->board_flags = FSL_GIANFAR_BRD_HAS_PHY_INTR; | 151 | pdata->board_flags = FSL_GIANFAR_BRD_HAS_PHY_INTR; |
143 | pdata->interruptPHY = MPC85xx_IRQ_EXT7; | 152 | pdata->bus_id = GFAR_PHY_26; |
144 | pdata->phyid = 26; | ||
145 | /* fixup phy address */ | ||
146 | pdata->phy_reg_addr += binfo->bi_immr_base; | ||
147 | memcpy(pdata->mac_addr, binfo->bi_enet1addr, 6); | 153 | memcpy(pdata->mac_addr, binfo->bi_enet1addr, 6); |
148 | } | 154 | } |
149 | 155 | ||
diff --git a/arch/ppc/platforms/85xx/stx_gp3.c b/arch/ppc/platforms/85xx/stx_gp3.c index 20940f4044f4..1e1b85f8193a 100644 --- a/arch/ppc/platforms/85xx/stx_gp3.c +++ b/arch/ppc/platforms/85xx/stx_gp3.c | |||
@@ -91,6 +91,9 @@ static u8 gp3_openpic_initsenses[] __initdata = { | |||
91 | 0x0, /* External 11: */ | 91 | 0x0, /* External 11: */ |
92 | }; | 92 | }; |
93 | 93 | ||
94 | static const char *GFAR_PHY_2 = "phy0:2"; | ||
95 | static const char *GFAR_PHY_4 = "phy0:4"; | ||
96 | |||
94 | /* | 97 | /* |
95 | * Setup the architecture | 98 | * Setup the architecture |
96 | */ | 99 | */ |
@@ -100,6 +103,7 @@ gp3_setup_arch(void) | |||
100 | bd_t *binfo = (bd_t *) __res; | 103 | bd_t *binfo = (bd_t *) __res; |
101 | unsigned int freq; | 104 | unsigned int freq; |
102 | struct gianfar_platform_data *pdata; | 105 | struct gianfar_platform_data *pdata; |
106 | struct gianfar_mdio_data *mdata; | ||
103 | 107 | ||
104 | cpm2_reset(); | 108 | cpm2_reset(); |
105 | 109 | ||
@@ -118,23 +122,26 @@ gp3_setup_arch(void) | |||
118 | mpc85xx_setup_hose(); | 122 | mpc85xx_setup_hose(); |
119 | #endif | 123 | #endif |
120 | 124 | ||
125 | /* setup the board related info for the MDIO bus */ | ||
126 | mdata = (struct gianfar_mdio_data *) ppc_sys_get_pdata(MPC85xx_MDIO); | ||
127 | |||
128 | mdata->irq[2] = MPC85xx_IRQ_EXT5; | ||
129 | mdata->irq[4] = MPC85xx_IRQ_EXT5; | ||
130 | mdata->irq[31] = -1; | ||
131 | mdata->paddr += binfo->bi_immr_base; | ||
132 | |||
121 | /* setup the board related information for the enet controllers */ | 133 | /* setup the board related information for the enet controllers */ |
122 | pdata = (struct gianfar_platform_data *) ppc_sys_get_pdata(MPC85xx_TSEC1); | 134 | pdata = (struct gianfar_platform_data *) ppc_sys_get_pdata(MPC85xx_TSEC1); |
123 | if (pdata) { | 135 | if (pdata) { |
124 | /* pdata->board_flags = FSL_GIANFAR_BRD_HAS_PHY_INTR; */ | 136 | /* pdata->board_flags = FSL_GIANFAR_BRD_HAS_PHY_INTR; */ |
125 | pdata->interruptPHY = MPC85xx_IRQ_EXT5; | 137 | pdata->bus_id = GFAR_PHY_2; |
126 | pdata->phyid = 2; | ||
127 | pdata->phy_reg_addr += binfo->bi_immr_base; | ||
128 | memcpy(pdata->mac_addr, binfo->bi_enetaddr, 6); | 138 | memcpy(pdata->mac_addr, binfo->bi_enetaddr, 6); |
129 | } | 139 | } |
130 | 140 | ||
131 | pdata = (struct gianfar_platform_data *) ppc_sys_get_pdata(MPC85xx_TSEC2); | 141 | pdata = (struct gianfar_platform_data *) ppc_sys_get_pdata(MPC85xx_TSEC2); |
132 | if (pdata) { | 142 | if (pdata) { |
133 | /* pdata->board_flags = FSL_GIANFAR_BRD_HAS_PHY_INTR; */ | 143 | /* pdata->board_flags = FSL_GIANFAR_BRD_HAS_PHY_INTR; */ |
134 | pdata->interruptPHY = MPC85xx_IRQ_EXT5; | 144 | pdata->bus_id = GFAR_PHY_4; |
135 | pdata->phyid = 4; | ||
136 | /* fixup phy address */ | ||
137 | pdata->phy_reg_addr += binfo->bi_immr_base; | ||
138 | memcpy(pdata->mac_addr, binfo->bi_enet1addr, 6); | 145 | memcpy(pdata->mac_addr, binfo->bi_enet1addr, 6); |
139 | } | 146 | } |
140 | 147 | ||
diff --git a/arch/ppc/platforms/85xx/stx_gp3.h b/arch/ppc/platforms/85xx/stx_gp3.h index 7bcc6c35a417..95fdf4b0680b 100644 --- a/arch/ppc/platforms/85xx/stx_gp3.h +++ b/arch/ppc/platforms/85xx/stx_gp3.h | |||
@@ -21,7 +21,6 @@ | |||
21 | 21 | ||
22 | #include <linux/config.h> | 22 | #include <linux/config.h> |
23 | #include <linux/init.h> | 23 | #include <linux/init.h> |
24 | #include <linux/seq_file.h> | ||
25 | #include <asm/ppcboot.h> | 24 | #include <asm/ppcboot.h> |
26 | 25 | ||
27 | #define BOARD_CCSRBAR ((uint)0xe0000000) | 26 | #define BOARD_CCSRBAR ((uint)0xe0000000) |
diff --git a/arch/ppc/platforms/Makefile b/arch/ppc/platforms/Makefile index ff7452e5d8e5..7c5cdabf6f3c 100644 --- a/arch/ppc/platforms/Makefile +++ b/arch/ppc/platforms/Makefile | |||
@@ -14,6 +14,9 @@ obj-$(CONFIG_PPC_PMAC) += pmac_pic.o pmac_setup.o pmac_time.o \ | |||
14 | pmac_low_i2c.o pmac_cache.o | 14 | pmac_low_i2c.o pmac_cache.o |
15 | obj-$(CONFIG_PPC_CHRP) += chrp_setup.o chrp_time.o chrp_pci.o \ | 15 | obj-$(CONFIG_PPC_CHRP) += chrp_setup.o chrp_time.o chrp_pci.o \ |
16 | chrp_pegasos_eth.o | 16 | chrp_pegasos_eth.o |
17 | ifeq ($(CONFIG_PPC_CHRP),y) | ||
18 | obj-$(CONFIG_NVRAM) += chrp_nvram.o | ||
19 | endif | ||
17 | obj-$(CONFIG_PPC_PREP) += prep_pci.o prep_setup.o | 20 | obj-$(CONFIG_PPC_PREP) += prep_pci.o prep_setup.o |
18 | ifeq ($(CONFIG_PPC_PMAC),y) | 21 | ifeq ($(CONFIG_PPC_PMAC),y) |
19 | obj-$(CONFIG_NVRAM) += pmac_nvram.o | 22 | obj-$(CONFIG_NVRAM) += pmac_nvram.o |
diff --git a/arch/ppc/platforms/chestnut.c b/arch/ppc/platforms/chestnut.c index df6ff98c023a..48a4a510d598 100644 --- a/arch/ppc/platforms/chestnut.c +++ b/arch/ppc/platforms/chestnut.c | |||
@@ -541,7 +541,6 @@ platform_init(unsigned long r3, unsigned long r4, unsigned long r5, | |||
541 | 541 | ||
542 | ppc_md.setup_arch = chestnut_setup_arch; | 542 | ppc_md.setup_arch = chestnut_setup_arch; |
543 | ppc_md.show_cpuinfo = chestnut_show_cpuinfo; | 543 | ppc_md.show_cpuinfo = chestnut_show_cpuinfo; |
544 | ppc_md.irq_canonicalize = NULL; | ||
545 | ppc_md.init_IRQ = mv64360_init_irq; | 544 | ppc_md.init_IRQ = mv64360_init_irq; |
546 | ppc_md.get_irq = mv64360_get_irq; | 545 | ppc_md.get_irq = mv64360_get_irq; |
547 | ppc_md.init = NULL; | 546 | ppc_md.init = NULL; |
diff --git a/arch/ppc/platforms/chrp_nvram.c b/arch/ppc/platforms/chrp_nvram.c new file mode 100644 index 000000000000..465ba9b090ef --- /dev/null +++ b/arch/ppc/platforms/chrp_nvram.c | |||
@@ -0,0 +1,83 @@ | |||
1 | /* | ||
2 | * c 2001 PPC 64 Team, IBM Corp | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or | ||
5 | * modify it under the terms of the GNU General Public License | ||
6 | * as published by the Free Software Foundation; either version | ||
7 | * 2 of the License, or (at your option) any later version. | ||
8 | * | ||
9 | * /dev/nvram driver for PPC | ||
10 | * | ||
11 | */ | ||
12 | |||
13 | #include <linux/kernel.h> | ||
14 | #include <linux/init.h> | ||
15 | #include <linux/slab.h> | ||
16 | #include <linux/spinlock.h> | ||
17 | #include <asm/uaccess.h> | ||
18 | #include <asm/prom.h> | ||
19 | #include <asm/machdep.h> | ||
20 | |||
21 | static unsigned int nvram_size; | ||
22 | static unsigned char nvram_buf[4]; | ||
23 | static DEFINE_SPINLOCK(nvram_lock); | ||
24 | |||
25 | static unsigned char chrp_nvram_read(int addr) | ||
26 | { | ||
27 | unsigned long done, flags; | ||
28 | unsigned char ret; | ||
29 | |||
30 | if (addr >= nvram_size) { | ||
31 | printk(KERN_DEBUG "%s: read addr %d > nvram_size %u\n", | ||
32 | current->comm, addr, nvram_size); | ||
33 | return 0xff; | ||
34 | } | ||
35 | spin_lock_irqsave(&nvram_lock, flags); | ||
36 | if ((call_rtas("nvram-fetch", 3, 2, &done, addr, __pa(nvram_buf), 1) != 0) || 1 != done) | ||
37 | ret = 0xff; | ||
38 | else | ||
39 | ret = nvram_buf[0]; | ||
40 | spin_unlock_irqrestore(&nvram_lock, flags); | ||
41 | |||
42 | return ret; | ||
43 | } | ||
44 | |||
45 | static void chrp_nvram_write(int addr, unsigned char val) | ||
46 | { | ||
47 | unsigned long done, flags; | ||
48 | |||
49 | if (addr >= nvram_size) { | ||
50 | printk(KERN_DEBUG "%s: write addr %d > nvram_size %u\n", | ||
51 | current->comm, addr, nvram_size); | ||
52 | return; | ||
53 | } | ||
54 | spin_lock_irqsave(&nvram_lock, flags); | ||
55 | nvram_buf[0] = val; | ||
56 | if ((call_rtas("nvram-store", 3, 2, &done, addr, __pa(nvram_buf), 1) != 0) || 1 != done) | ||
57 | printk(KERN_DEBUG "rtas IO error storing 0x%02x at %d", val, addr); | ||
58 | spin_unlock_irqrestore(&nvram_lock, flags); | ||
59 | } | ||
60 | |||
61 | void __init chrp_nvram_init(void) | ||
62 | { | ||
63 | struct device_node *nvram; | ||
64 | unsigned int *nbytes_p, proplen; | ||
65 | |||
66 | nvram = of_find_node_by_type(NULL, "nvram"); | ||
67 | if (nvram == NULL) | ||
68 | return; | ||
69 | |||
70 | nbytes_p = (unsigned int *)get_property(nvram, "#bytes", &proplen); | ||
71 | if (nbytes_p == NULL || proplen != sizeof(unsigned int)) | ||
72 | return; | ||
73 | |||
74 | nvram_size = *nbytes_p; | ||
75 | |||
76 | printk(KERN_INFO "CHRP nvram contains %u bytes\n", nvram_size); | ||
77 | of_node_put(nvram); | ||
78 | |||
79 | ppc_md.nvram_read_val = chrp_nvram_read; | ||
80 | ppc_md.nvram_write_val = chrp_nvram_write; | ||
81 | |||
82 | return; | ||
83 | } | ||
diff --git a/arch/ppc/platforms/chrp_pci.c b/arch/ppc/platforms/chrp_pci.c index 7d3fbb5c5db2..bd047aac01b1 100644 --- a/arch/ppc/platforms/chrp_pci.c +++ b/arch/ppc/platforms/chrp_pci.c | |||
@@ -29,7 +29,7 @@ void __iomem *gg2_pci_config_base; | |||
29 | * limit the bus number to 3 bits | 29 | * limit the bus number to 3 bits |
30 | */ | 30 | */ |
31 | 31 | ||
32 | int __chrp gg2_read_config(struct pci_bus *bus, unsigned int devfn, int off, | 32 | int gg2_read_config(struct pci_bus *bus, unsigned int devfn, int off, |
33 | int len, u32 *val) | 33 | int len, u32 *val) |
34 | { | 34 | { |
35 | volatile void __iomem *cfg_data; | 35 | volatile void __iomem *cfg_data; |
@@ -56,7 +56,7 @@ int __chrp gg2_read_config(struct pci_bus *bus, unsigned int devfn, int off, | |||
56 | return PCIBIOS_SUCCESSFUL; | 56 | return PCIBIOS_SUCCESSFUL; |
57 | } | 57 | } |
58 | 58 | ||
59 | int __chrp gg2_write_config(struct pci_bus *bus, unsigned int devfn, int off, | 59 | int gg2_write_config(struct pci_bus *bus, unsigned int devfn, int off, |
60 | int len, u32 val) | 60 | int len, u32 val) |
61 | { | 61 | { |
62 | volatile void __iomem *cfg_data; | 62 | volatile void __iomem *cfg_data; |
@@ -92,7 +92,7 @@ static struct pci_ops gg2_pci_ops = | |||
92 | /* | 92 | /* |
93 | * Access functions for PCI config space using RTAS calls. | 93 | * Access functions for PCI config space using RTAS calls. |
94 | */ | 94 | */ |
95 | int __chrp | 95 | int |
96 | rtas_read_config(struct pci_bus *bus, unsigned int devfn, int offset, | 96 | rtas_read_config(struct pci_bus *bus, unsigned int devfn, int offset, |
97 | int len, u32 *val) | 97 | int len, u32 *val) |
98 | { | 98 | { |
@@ -108,7 +108,7 @@ rtas_read_config(struct pci_bus *bus, unsigned int devfn, int offset, | |||
108 | return rval? PCIBIOS_DEVICE_NOT_FOUND: PCIBIOS_SUCCESSFUL; | 108 | return rval? PCIBIOS_DEVICE_NOT_FOUND: PCIBIOS_SUCCESSFUL; |
109 | } | 109 | } |
110 | 110 | ||
111 | int __chrp | 111 | int |
112 | rtas_write_config(struct pci_bus *bus, unsigned int devfn, int offset, | 112 | rtas_write_config(struct pci_bus *bus, unsigned int devfn, int offset, |
113 | int len, u32 val) | 113 | int len, u32 val) |
114 | { | 114 | { |
@@ -203,7 +203,7 @@ static void __init setup_peg2(struct pci_controller *hose, struct device_node *d | |||
203 | printk ("RTAS supporting Pegasos OF not found, please upgrade" | 203 | printk ("RTAS supporting Pegasos OF not found, please upgrade" |
204 | " your firmware\n"); | 204 | " your firmware\n"); |
205 | } | 205 | } |
206 | pci_assign_all_busses = 1; | 206 | pci_assign_all_buses = 1; |
207 | } | 207 | } |
208 | 208 | ||
209 | void __init | 209 | void __init |
diff --git a/arch/ppc/platforms/chrp_pegasos_eth.c b/arch/ppc/platforms/chrp_pegasos_eth.c index cad5bfa153b2..a9052305c35d 100644 --- a/arch/ppc/platforms/chrp_pegasos_eth.c +++ b/arch/ppc/platforms/chrp_pegasos_eth.c | |||
@@ -17,7 +17,20 @@ | |||
17 | #include <linux/mv643xx.h> | 17 | #include <linux/mv643xx.h> |
18 | #include <linux/pci.h> | 18 | #include <linux/pci.h> |
19 | 19 | ||
20 | /* Pegasos 2 specific Marvell MV 64361 gigabit ethernet port setup */ | 20 | #define PEGASOS2_MARVELL_REGBASE (0xf1000000) |
21 | #define PEGASOS2_MARVELL_REGSIZE (0x00004000) | ||
22 | #define PEGASOS2_SRAM_BASE (0xf2000000) | ||
23 | #define PEGASOS2_SRAM_SIZE (256*1024) | ||
24 | |||
25 | #define PEGASOS2_SRAM_BASE_ETH0 (PEGASOS2_SRAM_BASE) | ||
26 | #define PEGASOS2_SRAM_BASE_ETH1 (PEGASOS2_SRAM_BASE_ETH0 + (PEGASOS2_SRAM_SIZE / 2) ) | ||
27 | |||
28 | |||
29 | #define PEGASOS2_SRAM_RXRING_SIZE (PEGASOS2_SRAM_SIZE/4) | ||
30 | #define PEGASOS2_SRAM_TXRING_SIZE (PEGASOS2_SRAM_SIZE/4) | ||
31 | |||
32 | #undef BE_VERBOSE | ||
33 | |||
21 | static struct resource mv643xx_eth_shared_resources[] = { | 34 | static struct resource mv643xx_eth_shared_resources[] = { |
22 | [0] = { | 35 | [0] = { |
23 | .name = "ethernet shared base", | 36 | .name = "ethernet shared base", |
@@ -44,7 +57,16 @@ static struct resource mv643xx_eth0_resources[] = { | |||
44 | }, | 57 | }, |
45 | }; | 58 | }; |
46 | 59 | ||
47 | static struct mv643xx_eth_platform_data eth0_pd; | 60 | |
61 | static struct mv643xx_eth_platform_data eth0_pd = { | ||
62 | .tx_sram_addr = PEGASOS2_SRAM_BASE_ETH0, | ||
63 | .tx_sram_size = PEGASOS2_SRAM_TXRING_SIZE, | ||
64 | .tx_queue_size = PEGASOS2_SRAM_TXRING_SIZE/16, | ||
65 | |||
66 | .rx_sram_addr = PEGASOS2_SRAM_BASE_ETH0 + PEGASOS2_SRAM_TXRING_SIZE, | ||
67 | .rx_sram_size = PEGASOS2_SRAM_RXRING_SIZE, | ||
68 | .rx_queue_size = PEGASOS2_SRAM_RXRING_SIZE/16, | ||
69 | }; | ||
48 | 70 | ||
49 | static struct platform_device eth0_device = { | 71 | static struct platform_device eth0_device = { |
50 | .name = MV643XX_ETH_NAME, | 72 | .name = MV643XX_ETH_NAME, |
@@ -65,7 +87,15 @@ static struct resource mv643xx_eth1_resources[] = { | |||
65 | }, | 87 | }, |
66 | }; | 88 | }; |
67 | 89 | ||
68 | static struct mv643xx_eth_platform_data eth1_pd; | 90 | static struct mv643xx_eth_platform_data eth1_pd = { |
91 | .tx_sram_addr = PEGASOS2_SRAM_BASE_ETH1, | ||
92 | .tx_sram_size = PEGASOS2_SRAM_TXRING_SIZE, | ||
93 | .tx_queue_size = PEGASOS2_SRAM_TXRING_SIZE/16, | ||
94 | |||
95 | .rx_sram_addr = PEGASOS2_SRAM_BASE_ETH1 + PEGASOS2_SRAM_TXRING_SIZE, | ||
96 | .rx_sram_size = PEGASOS2_SRAM_RXRING_SIZE, | ||
97 | .rx_queue_size = PEGASOS2_SRAM_RXRING_SIZE/16, | ||
98 | }; | ||
69 | 99 | ||
70 | static struct platform_device eth1_device = { | 100 | static struct platform_device eth1_device = { |
71 | .name = MV643XX_ETH_NAME, | 101 | .name = MV643XX_ETH_NAME, |
@@ -83,9 +113,62 @@ static struct platform_device *mv643xx_eth_pd_devs[] __initdata = { | |||
83 | ð1_device, | 113 | ð1_device, |
84 | }; | 114 | }; |
85 | 115 | ||
116 | /***********/ | ||
117 | /***********/ | ||
118 | #define MV_READ(offset,val) { val = readl(mv643xx_reg_base + offset); } | ||
119 | #define MV_WRITE(offset,data) writel(data, mv643xx_reg_base + offset) | ||
120 | |||
121 | static void __iomem *mv643xx_reg_base; | ||
122 | |||
123 | static int Enable_SRAM(void) | ||
124 | { | ||
125 | u32 ALong; | ||
126 | |||
127 | if (mv643xx_reg_base == NULL) | ||
128 | mv643xx_reg_base = ioremap(PEGASOS2_MARVELL_REGBASE, | ||
129 | PEGASOS2_MARVELL_REGSIZE); | ||
130 | |||
131 | if (mv643xx_reg_base == NULL) | ||
132 | return -ENOMEM; | ||
133 | |||
134 | #ifdef BE_VERBOSE | ||
135 | printk("Pegasos II/Marvell MV64361: register remapped from %p to %p\n", | ||
136 | (void *)PEGASOS2_MARVELL_REGBASE, (void *)mv643xx_reg_base); | ||
137 | #endif | ||
138 | |||
139 | MV_WRITE(MV64340_SRAM_CONFIG, 0); | ||
86 | 140 | ||
87 | int | 141 | MV_WRITE(MV64340_INTEGRATED_SRAM_BASE_ADDR, PEGASOS2_SRAM_BASE >> 16); |
88 | mv643xx_eth_add_pds(void) | 142 | |
143 | MV_READ(MV64340_BASE_ADDR_ENABLE, ALong); | ||
144 | ALong &= ~(1 << 19); | ||
145 | MV_WRITE(MV64340_BASE_ADDR_ENABLE, ALong); | ||
146 | |||
147 | ALong = 0x02; | ||
148 | ALong |= PEGASOS2_SRAM_BASE & 0xffff0000; | ||
149 | MV_WRITE(MV643XX_ETH_BAR_4, ALong); | ||
150 | |||
151 | MV_WRITE(MV643XX_ETH_SIZE_REG_4, (PEGASOS2_SRAM_SIZE-1) & 0xffff0000); | ||
152 | |||
153 | MV_READ(MV643XX_ETH_BASE_ADDR_ENABLE_REG, ALong); | ||
154 | ALong &= ~(1 << 4); | ||
155 | MV_WRITE(MV643XX_ETH_BASE_ADDR_ENABLE_REG, ALong); | ||
156 | |||
157 | #ifdef BE_VERBOSE | ||
158 | printk("Pegasos II/Marvell MV64361: register unmapped\n"); | ||
159 | printk("Pegasos II/Marvell MV64361: SRAM at %p, size=%x\n", (void*) PEGASOS2_SRAM_BASE, PEGASOS2_SRAM_SIZE); | ||
160 | #endif | ||
161 | |||
162 | iounmap(mv643xx_reg_base); | ||
163 | mv643xx_reg_base = NULL; | ||
164 | |||
165 | return 1; | ||
166 | } | ||
167 | |||
168 | |||
169 | /***********/ | ||
170 | /***********/ | ||
171 | int mv643xx_eth_add_pds(void) | ||
89 | { | 172 | { |
90 | int ret = 0; | 173 | int ret = 0; |
91 | static struct pci_device_id pci_marvell_mv64360[] = { | 174 | static struct pci_device_id pci_marvell_mv64360[] = { |
@@ -93,9 +176,38 @@ mv643xx_eth_add_pds(void) | |||
93 | { } | 176 | { } |
94 | }; | 177 | }; |
95 | 178 | ||
179 | #ifdef BE_VERBOSE | ||
180 | printk("Pegasos II/Marvell MV64361: init\n"); | ||
181 | #endif | ||
182 | |||
96 | if (pci_dev_present(pci_marvell_mv64360)) { | 183 | if (pci_dev_present(pci_marvell_mv64360)) { |
97 | ret = platform_add_devices(mv643xx_eth_pd_devs, ARRAY_SIZE(mv643xx_eth_pd_devs)); | 184 | ret = platform_add_devices(mv643xx_eth_pd_devs, |
185 | ARRAY_SIZE(mv643xx_eth_pd_devs)); | ||
186 | |||
187 | if ( Enable_SRAM() < 0) | ||
188 | { | ||
189 | eth0_pd.tx_sram_addr = 0; | ||
190 | eth0_pd.tx_sram_size = 0; | ||
191 | eth0_pd.rx_sram_addr = 0; | ||
192 | eth0_pd.rx_sram_size = 0; | ||
193 | |||
194 | eth1_pd.tx_sram_addr = 0; | ||
195 | eth1_pd.tx_sram_size = 0; | ||
196 | eth1_pd.rx_sram_addr = 0; | ||
197 | eth1_pd.rx_sram_size = 0; | ||
198 | |||
199 | #ifdef BE_VERBOSE | ||
200 | printk("Pegasos II/Marvell MV64361: Can't enable the " | ||
201 | "SRAM\n"); | ||
202 | #endif | ||
203 | } | ||
98 | } | 204 | } |
205 | |||
206 | #ifdef BE_VERBOSE | ||
207 | printk("Pegasos II/Marvell MV64361: init is over\n"); | ||
208 | #endif | ||
209 | |||
99 | return ret; | 210 | return ret; |
100 | } | 211 | } |
212 | |||
101 | device_initcall(mv643xx_eth_add_pds); | 213 | device_initcall(mv643xx_eth_add_pds); |
diff --git a/arch/ppc/platforms/chrp_setup.c b/arch/ppc/platforms/chrp_setup.c index 66346f0de7ec..f1b70ab3c6fd 100644 --- a/arch/ppc/platforms/chrp_setup.c +++ b/arch/ppc/platforms/chrp_setup.c | |||
@@ -104,7 +104,7 @@ static const char *gg2_cachemodes[4] = { | |||
104 | "Disabled", "Write-Through", "Copy-Back", "Transparent Mode" | 104 | "Disabled", "Write-Through", "Copy-Back", "Transparent Mode" |
105 | }; | 105 | }; |
106 | 106 | ||
107 | int __chrp | 107 | int |
108 | chrp_show_cpuinfo(struct seq_file *m) | 108 | chrp_show_cpuinfo(struct seq_file *m) |
109 | { | 109 | { |
110 | int i, sdramen; | 110 | int i, sdramen; |
@@ -302,7 +302,7 @@ void __init chrp_setup_arch(void) | |||
302 | pci_create_OF_bus_map(); | 302 | pci_create_OF_bus_map(); |
303 | } | 303 | } |
304 | 304 | ||
305 | void __chrp | 305 | void |
306 | chrp_event_scan(void) | 306 | chrp_event_scan(void) |
307 | { | 307 | { |
308 | unsigned char log[1024]; | 308 | unsigned char log[1024]; |
@@ -313,7 +313,7 @@ chrp_event_scan(void) | |||
313 | ppc_md.heartbeat_count = ppc_md.heartbeat_reset; | 313 | ppc_md.heartbeat_count = ppc_md.heartbeat_reset; |
314 | } | 314 | } |
315 | 315 | ||
316 | void __chrp | 316 | void |
317 | chrp_restart(char *cmd) | 317 | chrp_restart(char *cmd) |
318 | { | 318 | { |
319 | printk("RTAS system-reboot returned %d\n", | 319 | printk("RTAS system-reboot returned %d\n", |
@@ -321,7 +321,7 @@ chrp_restart(char *cmd) | |||
321 | for (;;); | 321 | for (;;); |
322 | } | 322 | } |
323 | 323 | ||
324 | void __chrp | 324 | void |
325 | chrp_power_off(void) | 325 | chrp_power_off(void) |
326 | { | 326 | { |
327 | /* allow power on only with power button press */ | 327 | /* allow power on only with power button press */ |
@@ -330,20 +330,12 @@ chrp_power_off(void) | |||
330 | for (;;); | 330 | for (;;); |
331 | } | 331 | } |
332 | 332 | ||
333 | void __chrp | 333 | void |
334 | chrp_halt(void) | 334 | chrp_halt(void) |
335 | { | 335 | { |
336 | chrp_power_off(); | 336 | chrp_power_off(); |
337 | } | 337 | } |
338 | 338 | ||
339 | u_int __chrp | ||
340 | chrp_irq_canonicalize(u_int irq) | ||
341 | { | ||
342 | if (irq == 2) | ||
343 | return 9; | ||
344 | return irq; | ||
345 | } | ||
346 | |||
347 | /* | 339 | /* |
348 | * Finds the open-pic node and sets OpenPIC_Addr based on its reg property. | 340 | * Finds the open-pic node and sets OpenPIC_Addr based on its reg property. |
349 | * Then checks if it has an interrupt-ranges property. If it does then | 341 | * Then checks if it has an interrupt-ranges property. If it does then |
@@ -444,9 +436,7 @@ void __init chrp_init_IRQ(void) | |||
444 | i8259_irq); | 436 | i8259_irq); |
445 | 437 | ||
446 | } | 438 | } |
447 | for (i = 0; i < NUM_8259_INTERRUPTS; i++) | 439 | i8259_init(chrp_int_ack, 0); |
448 | irq_desc[i].handler = &i8259_pic; | ||
449 | i8259_init(chrp_int_ack); | ||
450 | 440 | ||
451 | #if defined(CONFIG_VT) && defined(CONFIG_INPUT_ADBHID) && defined(XMON) | 441 | #if defined(CONFIG_VT) && defined(CONFIG_INPUT_ADBHID) && defined(XMON) |
452 | /* see if there is a keyboard in the device tree | 442 | /* see if there is a keyboard in the device tree |
@@ -464,8 +454,7 @@ void __init | |||
464 | chrp_init2(void) | 454 | chrp_init2(void) |
465 | { | 455 | { |
466 | #ifdef CONFIG_NVRAM | 456 | #ifdef CONFIG_NVRAM |
467 | // XX replace this in a more saner way | 457 | chrp_nvram_init(); |
468 | // pmac_nvram_init(); | ||
469 | #endif | 458 | #endif |
470 | 459 | ||
471 | request_region(0x20,0x20,"pic1"); | 460 | request_region(0x20,0x20,"pic1"); |
@@ -499,6 +488,7 @@ chrp_init(unsigned long r3, unsigned long r4, unsigned long r5, | |||
499 | DMA_MODE_READ = 0x44; | 488 | DMA_MODE_READ = 0x44; |
500 | DMA_MODE_WRITE = 0x48; | 489 | DMA_MODE_WRITE = 0x48; |
501 | isa_io_base = CHRP_ISA_IO_BASE; /* default value */ | 490 | isa_io_base = CHRP_ISA_IO_BASE; /* default value */ |
491 | ppc_do_canonicalize_irqs = 1; | ||
502 | 492 | ||
503 | if (root) | 493 | if (root) |
504 | machine = get_property(root, "model", NULL); | 494 | machine = get_property(root, "model", NULL); |
@@ -517,7 +507,6 @@ chrp_init(unsigned long r3, unsigned long r4, unsigned long r5, | |||
517 | ppc_md.show_percpuinfo = of_show_percpuinfo; | 507 | ppc_md.show_percpuinfo = of_show_percpuinfo; |
518 | ppc_md.show_cpuinfo = chrp_show_cpuinfo; | 508 | ppc_md.show_cpuinfo = chrp_show_cpuinfo; |
519 | 509 | ||
520 | ppc_md.irq_canonicalize = chrp_irq_canonicalize; | ||
521 | ppc_md.init_IRQ = chrp_init_IRQ; | 510 | ppc_md.init_IRQ = chrp_init_IRQ; |
522 | if (_chrp_type == _CHRP_Pegasos) | 511 | if (_chrp_type == _CHRP_Pegasos) |
523 | ppc_md.get_irq = i8259_irq; | 512 | ppc_md.get_irq = i8259_irq; |
@@ -561,7 +550,7 @@ chrp_init(unsigned long r3, unsigned long r4, unsigned long r5, | |||
561 | #endif | 550 | #endif |
562 | 551 | ||
563 | #ifdef CONFIG_SMP | 552 | #ifdef CONFIG_SMP |
564 | ppc_md.smp_ops = &chrp_smp_ops; | 553 | smp_ops = &chrp_smp_ops; |
565 | #endif /* CONFIG_SMP */ | 554 | #endif /* CONFIG_SMP */ |
566 | 555 | ||
567 | /* | 556 | /* |
@@ -571,7 +560,7 @@ chrp_init(unsigned long r3, unsigned long r4, unsigned long r5, | |||
571 | if (ppc_md.progress) ppc_md.progress("Linux/PPC "UTS_RELEASE"\n", 0x0); | 560 | if (ppc_md.progress) ppc_md.progress("Linux/PPC "UTS_RELEASE"\n", 0x0); |
572 | } | 561 | } |
573 | 562 | ||
574 | void __chrp | 563 | void |
575 | rtas_display_progress(char *s, unsigned short hex) | 564 | rtas_display_progress(char *s, unsigned short hex) |
576 | { | 565 | { |
577 | int width; | 566 | int width; |
@@ -598,7 +587,7 @@ rtas_display_progress(char *s, unsigned short hex) | |||
598 | call_rtas( "display-character", 1, 1, NULL, ' ' ); | 587 | call_rtas( "display-character", 1, 1, NULL, ' ' ); |
599 | } | 588 | } |
600 | 589 | ||
601 | void __chrp | 590 | void |
602 | rtas_indicator_progress(char *s, unsigned short hex) | 591 | rtas_indicator_progress(char *s, unsigned short hex) |
603 | { | 592 | { |
604 | call_rtas("set-indicator", 3, 1, NULL, 6, 0, hex); | 593 | call_rtas("set-indicator", 3, 1, NULL, 6, 0, hex); |
diff --git a/arch/ppc/platforms/chrp_smp.c b/arch/ppc/platforms/chrp_smp.c index 0ea1f7d9e46a..97e539557ecb 100644 --- a/arch/ppc/platforms/chrp_smp.c +++ b/arch/ppc/platforms/chrp_smp.c | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <asm/residual.h> | 31 | #include <asm/residual.h> |
32 | #include <asm/time.h> | 32 | #include <asm/time.h> |
33 | #include <asm/open_pic.h> | 33 | #include <asm/open_pic.h> |
34 | #include <asm/machdep.h> | ||
34 | 35 | ||
35 | extern unsigned long smp_chrp_cpu_nr; | 36 | extern unsigned long smp_chrp_cpu_nr; |
36 | 37 | ||
@@ -88,7 +89,7 @@ smp_chrp_take_timebase(void) | |||
88 | } | 89 | } |
89 | 90 | ||
90 | /* CHRP with openpic */ | 91 | /* CHRP with openpic */ |
91 | struct smp_ops_t chrp_smp_ops __chrpdata = { | 92 | struct smp_ops_t chrp_smp_ops = { |
92 | .message_pass = smp_openpic_message_pass, | 93 | .message_pass = smp_openpic_message_pass, |
93 | .probe = smp_chrp_probe, | 94 | .probe = smp_chrp_probe, |
94 | .kick_cpu = smp_chrp_kick_cpu, | 95 | .kick_cpu = smp_chrp_kick_cpu, |
diff --git a/arch/ppc/platforms/chrp_time.c b/arch/ppc/platforms/chrp_time.c index 6037ce7796f5..29d074c305f0 100644 --- a/arch/ppc/platforms/chrp_time.c +++ b/arch/ppc/platforms/chrp_time.c | |||
@@ -52,7 +52,7 @@ long __init chrp_time_init(void) | |||
52 | return 0; | 52 | return 0; |
53 | } | 53 | } |
54 | 54 | ||
55 | int __chrp chrp_cmos_clock_read(int addr) | 55 | int chrp_cmos_clock_read(int addr) |
56 | { | 56 | { |
57 | if (nvram_as1 != 0) | 57 | if (nvram_as1 != 0) |
58 | outb(addr>>8, nvram_as1); | 58 | outb(addr>>8, nvram_as1); |
@@ -60,7 +60,7 @@ int __chrp chrp_cmos_clock_read(int addr) | |||
60 | return (inb(nvram_data)); | 60 | return (inb(nvram_data)); |
61 | } | 61 | } |
62 | 62 | ||
63 | void __chrp chrp_cmos_clock_write(unsigned long val, int addr) | 63 | void chrp_cmos_clock_write(unsigned long val, int addr) |
64 | { | 64 | { |
65 | if (nvram_as1 != 0) | 65 | if (nvram_as1 != 0) |
66 | outb(addr>>8, nvram_as1); | 66 | outb(addr>>8, nvram_as1); |
@@ -72,7 +72,7 @@ void __chrp chrp_cmos_clock_write(unsigned long val, int addr) | |||
72 | /* | 72 | /* |
73 | * Set the hardware clock. -- Cort | 73 | * Set the hardware clock. -- Cort |
74 | */ | 74 | */ |
75 | int __chrp chrp_set_rtc_time(unsigned long nowtime) | 75 | int chrp_set_rtc_time(unsigned long nowtime) |
76 | { | 76 | { |
77 | unsigned char save_control, save_freq_select; | 77 | unsigned char save_control, save_freq_select; |
78 | struct rtc_time tm; | 78 | struct rtc_time tm; |
@@ -118,7 +118,7 @@ int __chrp chrp_set_rtc_time(unsigned long nowtime) | |||
118 | return 0; | 118 | return 0; |
119 | } | 119 | } |
120 | 120 | ||
121 | unsigned long __chrp chrp_get_rtc_time(void) | 121 | unsigned long chrp_get_rtc_time(void) |
122 | { | 122 | { |
123 | unsigned int year, mon, day, hour, min, sec; | 123 | unsigned int year, mon, day, hour, min, sec; |
124 | int uip, i; | 124 | int uip, i; |
diff --git a/arch/ppc/platforms/ev64360.c b/arch/ppc/platforms/ev64360.c index 9811a8a52c25..53388a1c334f 100644 --- a/arch/ppc/platforms/ev64360.c +++ b/arch/ppc/platforms/ev64360.c | |||
@@ -35,6 +35,7 @@ | |||
35 | #include <asm/bootinfo.h> | 35 | #include <asm/bootinfo.h> |
36 | #include <asm/ppcboot.h> | 36 | #include <asm/ppcboot.h> |
37 | #include <asm/mv64x60.h> | 37 | #include <asm/mv64x60.h> |
38 | #include <asm/machdep.h> | ||
38 | #include <platforms/ev64360.h> | 39 | #include <platforms/ev64360.h> |
39 | 40 | ||
40 | #define BOARD_VENDOR "Marvell" | 41 | #define BOARD_VENDOR "Marvell" |
diff --git a/arch/ppc/platforms/fads.h b/arch/ppc/platforms/fads.h index b60c56450b67..a48fb8d723e4 100644 --- a/arch/ppc/platforms/fads.h +++ b/arch/ppc/platforms/fads.h | |||
@@ -25,6 +25,8 @@ | |||
25 | 25 | ||
26 | #if defined(CONFIG_MPC86XADS) | 26 | #if defined(CONFIG_MPC86XADS) |
27 | 27 | ||
28 | #define BOARD_CHIP_NAME "MPC86X" | ||
29 | |||
28 | /* U-Boot maps BCSR to 0xff080000 */ | 30 | /* U-Boot maps BCSR to 0xff080000 */ |
29 | #define BCSR_ADDR ((uint)0xff080000) | 31 | #define BCSR_ADDR ((uint)0xff080000) |
30 | 32 | ||
diff --git a/arch/ppc/platforms/gemini_setup.c b/arch/ppc/platforms/gemini_setup.c index 3a5ff9fb71d6..729897c59033 100644 --- a/arch/ppc/platforms/gemini_setup.c +++ b/arch/ppc/platforms/gemini_setup.c | |||
@@ -35,6 +35,7 @@ | |||
35 | #include <asm/time.h> | 35 | #include <asm/time.h> |
36 | #include <asm/open_pic.h> | 36 | #include <asm/open_pic.h> |
37 | #include <asm/bootinfo.h> | 37 | #include <asm/bootinfo.h> |
38 | #include <asm/machdep.h> | ||
38 | 39 | ||
39 | void gemini_find_bridges(void); | 40 | void gemini_find_bridges(void); |
40 | static int gemini_get_clock_speed(void); | 41 | static int gemini_get_clock_speed(void); |
@@ -555,7 +556,6 @@ void __init platform_init(unsigned long r3, unsigned long r4, unsigned long r5, | |||
555 | 556 | ||
556 | ppc_md.setup_arch = gemini_setup_arch; | 557 | ppc_md.setup_arch = gemini_setup_arch; |
557 | ppc_md.show_cpuinfo = gemini_show_cpuinfo; | 558 | ppc_md.show_cpuinfo = gemini_show_cpuinfo; |
558 | ppc_md.irq_canonicalize = NULL; | ||
559 | ppc_md.init_IRQ = gemini_init_IRQ; | 559 | ppc_md.init_IRQ = gemini_init_IRQ; |
560 | ppc_md.get_irq = openpic_get_irq; | 560 | ppc_md.get_irq = openpic_get_irq; |
561 | ppc_md.init = NULL; | 561 | ppc_md.init = NULL; |
@@ -575,6 +575,6 @@ void __init platform_init(unsigned long r3, unsigned long r4, unsigned long r5, | |||
575 | ppc_md.pcibios_fixup_bus = gemini_pcibios_fixup; | 575 | ppc_md.pcibios_fixup_bus = gemini_pcibios_fixup; |
576 | 576 | ||
577 | #ifdef CONFIG_SMP | 577 | #ifdef CONFIG_SMP |
578 | ppc_md.smp_ops = &gemini_smp_ops; | 578 | smp_ops = &gemini_smp_ops; |
579 | #endif /* CONFIG_SMP */ | 579 | #endif /* CONFIG_SMP */ |
580 | } | 580 | } |
diff --git a/arch/ppc/platforms/hdpu.c b/arch/ppc/platforms/hdpu.c index ff3796860123..b6a66d5e9d83 100644 --- a/arch/ppc/platforms/hdpu.c +++ b/arch/ppc/platforms/hdpu.c | |||
@@ -609,11 +609,6 @@ static void parse_bootinfo(unsigned long r3, | |||
609 | } | 609 | } |
610 | 610 | ||
611 | #if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE) | 611 | #if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE) |
612 | static int hdpu_ide_check_region(ide_ioreg_t from, unsigned int extent) | ||
613 | { | ||
614 | return check_region(from, extent); | ||
615 | } | ||
616 | |||
617 | static void | 612 | static void |
618 | hdpu_ide_request_region(ide_ioreg_t from, unsigned int extent, const char *name) | 613 | hdpu_ide_request_region(ide_ioreg_t from, unsigned int extent, const char *name) |
619 | { | 614 | { |
@@ -753,7 +748,7 @@ static int smp_hdpu_probe(void) | |||
753 | } | 748 | } |
754 | 749 | ||
755 | static void | 750 | static void |
756 | smp_hdpu_message_pass(int target, int msg, unsigned long data, int wait) | 751 | smp_hdpu_message_pass(int target, int msg) |
757 | { | 752 | { |
758 | if (msg > 0x3) { | 753 | if (msg > 0x3) { |
759 | printk("SMP %d: smp_message_pass: unknown msg %d\n", | 754 | printk("SMP %d: smp_message_pass: unknown msg %d\n", |
@@ -949,7 +944,7 @@ platform_init(unsigned long r3, unsigned long r4, unsigned long r5, | |||
949 | #endif /* CONFIG_SERIAL_TEXT_DEBUG */ | 944 | #endif /* CONFIG_SERIAL_TEXT_DEBUG */ |
950 | 945 | ||
951 | #ifdef CONFIG_SMP | 946 | #ifdef CONFIG_SMP |
952 | ppc_md.smp_ops = &hdpu_smp_ops; | 947 | smp_ops = &hdpu_smp_ops; |
953 | #endif /* CONFIG_SMP */ | 948 | #endif /* CONFIG_SMP */ |
954 | 949 | ||
955 | #if defined(CONFIG_SERIAL_MPSC) || defined(CONFIG_MV643XX_ETH) | 950 | #if defined(CONFIG_SERIAL_MPSC) || defined(CONFIG_MV643XX_ETH) |
diff --git a/arch/ppc/platforms/katana.c b/arch/ppc/platforms/katana.c index 2b53afae0e9c..a301c5ac58dd 100644 --- a/arch/ppc/platforms/katana.c +++ b/arch/ppc/platforms/katana.c | |||
@@ -42,6 +42,7 @@ | |||
42 | #include <asm/ppcboot.h> | 42 | #include <asm/ppcboot.h> |
43 | #include <asm/mv64x60.h> | 43 | #include <asm/mv64x60.h> |
44 | #include <platforms/katana.h> | 44 | #include <platforms/katana.h> |
45 | #include <asm/machdep.h> | ||
45 | 46 | ||
46 | static struct mv64x60_handle bh; | 47 | static struct mv64x60_handle bh; |
47 | static katana_id_t katana_id; | 48 | static katana_id_t katana_id; |
@@ -520,7 +521,7 @@ katana_fixup_resources(struct pci_dev *dev) | |||
520 | { | 521 | { |
521 | u16 v16; | 522 | u16 v16; |
522 | 523 | ||
523 | pci_write_config_byte(dev, PCI_CACHE_LINE_SIZE, L1_CACHE_LINE_SIZE>>2); | 524 | pci_write_config_byte(dev, PCI_CACHE_LINE_SIZE, L1_CACHE_BYTES>>2); |
524 | 525 | ||
525 | pci_read_config_word(dev, PCI_COMMAND, &v16); | 526 | pci_read_config_word(dev, PCI_COMMAND, &v16); |
526 | v16 |= PCI_COMMAND_INVALIDATE | PCI_COMMAND_FAST_BACK; | 527 | v16 |= PCI_COMMAND_INVALIDATE | PCI_COMMAND_FAST_BACK; |
diff --git a/arch/ppc/platforms/lite5200.c b/arch/ppc/platforms/lite5200.c index b604cf8b3cae..d44cc991179f 100644 --- a/arch/ppc/platforms/lite5200.c +++ b/arch/ppc/platforms/lite5200.c | |||
@@ -35,6 +35,7 @@ | |||
35 | #include <asm/io.h> | 35 | #include <asm/io.h> |
36 | #include <asm/mpc52xx.h> | 36 | #include <asm/mpc52xx.h> |
37 | #include <asm/ppc_sys.h> | 37 | #include <asm/ppc_sys.h> |
38 | #include <asm/machdep.h> | ||
38 | 39 | ||
39 | #include <syslib/mpc52xx_pci.h> | 40 | #include <syslib/mpc52xx_pci.h> |
40 | 41 | ||
diff --git a/arch/ppc/platforms/lopec.c b/arch/ppc/platforms/lopec.c index a5569525e0af..06d247c23b82 100644 --- a/arch/ppc/platforms/lopec.c +++ b/arch/ppc/platforms/lopec.c | |||
@@ -144,15 +144,6 @@ lopec_show_cpuinfo(struct seq_file *m) | |||
144 | return 0; | 144 | return 0; |
145 | } | 145 | } |
146 | 146 | ||
147 | static u32 | ||
148 | lopec_irq_canonicalize(u32 irq) | ||
149 | { | ||
150 | if (irq == 2) | ||
151 | return 9; | ||
152 | else | ||
153 | return irq; | ||
154 | } | ||
155 | |||
156 | static void | 147 | static void |
157 | lopec_restart(char *cmd) | 148 | lopec_restart(char *cmd) |
158 | { | 149 | { |
@@ -276,15 +267,11 @@ lopec_init_IRQ(void) | |||
276 | openpic_hookup_cascade(NUM_8259_INTERRUPTS, "82c59 cascade", | 267 | openpic_hookup_cascade(NUM_8259_INTERRUPTS, "82c59 cascade", |
277 | &i8259_irq); | 268 | &i8259_irq); |
278 | 269 | ||
279 | /* Map i8259 interrupts */ | ||
280 | for(i = 0; i < NUM_8259_INTERRUPTS; i++) | ||
281 | irq_desc[i].handler = &i8259_pic; | ||
282 | |||
283 | /* | 270 | /* |
284 | * The EPIC allows for a read in the range of 0xFEF00000 -> | 271 | * The EPIC allows for a read in the range of 0xFEF00000 -> |
285 | * 0xFEFFFFFF to generate a PCI interrupt-acknowledge transaction. | 272 | * 0xFEFFFFFF to generate a PCI interrupt-acknowledge transaction. |
286 | */ | 273 | */ |
287 | i8259_init(0xfef00000); | 274 | i8259_init(0xfef00000, 0); |
288 | } | 275 | } |
289 | 276 | ||
290 | static int __init | 277 | static int __init |
@@ -379,10 +366,10 @@ platform_init(unsigned long r3, unsigned long r4, unsigned long r5, | |||
379 | ISA_DMA_THRESHOLD = 0x00ffffff; | 366 | ISA_DMA_THRESHOLD = 0x00ffffff; |
380 | DMA_MODE_READ = 0x44; | 367 | DMA_MODE_READ = 0x44; |
381 | DMA_MODE_WRITE = 0x48; | 368 | DMA_MODE_WRITE = 0x48; |
369 | ppc_do_canonicalize_irqs = 1; | ||
382 | 370 | ||
383 | ppc_md.setup_arch = lopec_setup_arch; | 371 | ppc_md.setup_arch = lopec_setup_arch; |
384 | ppc_md.show_cpuinfo = lopec_show_cpuinfo; | 372 | ppc_md.show_cpuinfo = lopec_show_cpuinfo; |
385 | ppc_md.irq_canonicalize = lopec_irq_canonicalize; | ||
386 | ppc_md.init_IRQ = lopec_init_IRQ; | 373 | ppc_md.init_IRQ = lopec_init_IRQ; |
387 | ppc_md.get_irq = openpic_get_irq; | 374 | ppc_md.get_irq = openpic_get_irq; |
388 | 375 | ||
diff --git a/arch/ppc/platforms/mpc885ads.h b/arch/ppc/platforms/mpc885ads.h index eb386635b0fd..a80b7d116b49 100644 --- a/arch/ppc/platforms/mpc885ads.h +++ b/arch/ppc/platforms/mpc885ads.h | |||
@@ -88,5 +88,7 @@ | |||
88 | #define SICR_ENET_MASK ((uint)0x00ff0000) | 88 | #define SICR_ENET_MASK ((uint)0x00ff0000) |
89 | #define SICR_ENET_CLKRT ((uint)0x002c0000) | 89 | #define SICR_ENET_CLKRT ((uint)0x002c0000) |
90 | 90 | ||
91 | #define BOARD_CHIP_NAME "MPC885" | ||
92 | |||
91 | #endif /* __ASM_MPC885ADS_H__ */ | 93 | #endif /* __ASM_MPC885ADS_H__ */ |
92 | #endif /* __KERNEL__ */ | 94 | #endif /* __KERNEL__ */ |
diff --git a/arch/ppc/platforms/mvme5100.c b/arch/ppc/platforms/mvme5100.c index ce2ce88c8033..108eb182dddc 100644 --- a/arch/ppc/platforms/mvme5100.c +++ b/arch/ppc/platforms/mvme5100.c | |||
@@ -223,11 +223,7 @@ mvme5100_init_IRQ(void) | |||
223 | openpic_hookup_cascade(NUM_8259_INTERRUPTS, "82c59 cascade", | 223 | openpic_hookup_cascade(NUM_8259_INTERRUPTS, "82c59 cascade", |
224 | &i8259_irq); | 224 | &i8259_irq); |
225 | 225 | ||
226 | /* Map i8259 interrupts. */ | 226 | i8259_init(0, 0); |
227 | for (i = 0; i < NUM_8259_INTERRUPTS; i++) | ||
228 | irq_desc[i].handler = &i8259_pic; | ||
229 | |||
230 | i8259_init(0); | ||
231 | #else | 227 | #else |
232 | openpic_init(0); | 228 | openpic_init(0); |
233 | #endif | 229 | #endif |
diff --git a/arch/ppc/platforms/pal4_setup.c b/arch/ppc/platforms/pal4_setup.c index 12446b93e38c..f93a3f871932 100644 --- a/arch/ppc/platforms/pal4_setup.c +++ b/arch/ppc/platforms/pal4_setup.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <asm/io.h> | 28 | #include <asm/io.h> |
29 | #include <asm/todc.h> | 29 | #include <asm/todc.h> |
30 | #include <asm/bootinfo.h> | 30 | #include <asm/bootinfo.h> |
31 | #include <asm/machdep.h> | ||
31 | 32 | ||
32 | #include <syslib/cpc700.h> | 33 | #include <syslib/cpc700.h> |
33 | 34 | ||
diff --git a/arch/ppc/platforms/pmac_backlight.c b/arch/ppc/platforms/pmac_backlight.c index ed2b1cebc19a..8be2f7d071f0 100644 --- a/arch/ppc/platforms/pmac_backlight.c +++ b/arch/ppc/platforms/pmac_backlight.c | |||
@@ -37,7 +37,7 @@ static int backlight_req_enable = -1; | |||
37 | static void backlight_callback(void *); | 37 | static void backlight_callback(void *); |
38 | static DECLARE_WORK(backlight_work, backlight_callback, NULL); | 38 | static DECLARE_WORK(backlight_work, backlight_callback, NULL); |
39 | 39 | ||
40 | void __pmac register_backlight_controller(struct backlight_controller *ctrler, | 40 | void register_backlight_controller(struct backlight_controller *ctrler, |
41 | void *data, char *type) | 41 | void *data, char *type) |
42 | { | 42 | { |
43 | struct device_node* bk_node; | 43 | struct device_node* bk_node; |
@@ -99,7 +99,7 @@ void __pmac register_backlight_controller(struct backlight_controller *ctrler, | |||
99 | } | 99 | } |
100 | EXPORT_SYMBOL(register_backlight_controller); | 100 | EXPORT_SYMBOL(register_backlight_controller); |
101 | 101 | ||
102 | void __pmac unregister_backlight_controller(struct backlight_controller | 102 | void unregister_backlight_controller(struct backlight_controller |
103 | *ctrler, void *data) | 103 | *ctrler, void *data) |
104 | { | 104 | { |
105 | /* We keep the current backlight level (for now) */ | 105 | /* We keep the current backlight level (for now) */ |
@@ -108,7 +108,7 @@ void __pmac unregister_backlight_controller(struct backlight_controller | |||
108 | } | 108 | } |
109 | EXPORT_SYMBOL(unregister_backlight_controller); | 109 | EXPORT_SYMBOL(unregister_backlight_controller); |
110 | 110 | ||
111 | static int __pmac __set_backlight_enable(int enable) | 111 | static int __set_backlight_enable(int enable) |
112 | { | 112 | { |
113 | int rc; | 113 | int rc; |
114 | 114 | ||
@@ -122,7 +122,7 @@ static int __pmac __set_backlight_enable(int enable) | |||
122 | release_console_sem(); | 122 | release_console_sem(); |
123 | return rc; | 123 | return rc; |
124 | } | 124 | } |
125 | int __pmac set_backlight_enable(int enable) | 125 | int set_backlight_enable(int enable) |
126 | { | 126 | { |
127 | if (!backlighter) | 127 | if (!backlighter) |
128 | return -ENODEV; | 128 | return -ENODEV; |
@@ -133,7 +133,7 @@ int __pmac set_backlight_enable(int enable) | |||
133 | 133 | ||
134 | EXPORT_SYMBOL(set_backlight_enable); | 134 | EXPORT_SYMBOL(set_backlight_enable); |
135 | 135 | ||
136 | int __pmac get_backlight_enable(void) | 136 | int get_backlight_enable(void) |
137 | { | 137 | { |
138 | if (!backlighter) | 138 | if (!backlighter) |
139 | return -ENODEV; | 139 | return -ENODEV; |
@@ -141,7 +141,7 @@ int __pmac get_backlight_enable(void) | |||
141 | } | 141 | } |
142 | EXPORT_SYMBOL(get_backlight_enable); | 142 | EXPORT_SYMBOL(get_backlight_enable); |
143 | 143 | ||
144 | static int __pmac __set_backlight_level(int level) | 144 | static int __set_backlight_level(int level) |
145 | { | 145 | { |
146 | int rc = 0; | 146 | int rc = 0; |
147 | 147 | ||
@@ -165,7 +165,7 @@ static int __pmac __set_backlight_level(int level) | |||
165 | } | 165 | } |
166 | return rc; | 166 | return rc; |
167 | } | 167 | } |
168 | int __pmac set_backlight_level(int level) | 168 | int set_backlight_level(int level) |
169 | { | 169 | { |
170 | if (!backlighter) | 170 | if (!backlighter) |
171 | return -ENODEV; | 171 | return -ENODEV; |
@@ -176,7 +176,7 @@ int __pmac set_backlight_level(int level) | |||
176 | 176 | ||
177 | EXPORT_SYMBOL(set_backlight_level); | 177 | EXPORT_SYMBOL(set_backlight_level); |
178 | 178 | ||
179 | int __pmac get_backlight_level(void) | 179 | int get_backlight_level(void) |
180 | { | 180 | { |
181 | if (!backlighter) | 181 | if (!backlighter) |
182 | return -ENODEV; | 182 | return -ENODEV; |
diff --git a/arch/ppc/platforms/pmac_cpufreq.c b/arch/ppc/platforms/pmac_cpufreq.c index d4bc5f67ec53..fba7e4d7c0bf 100644 --- a/arch/ppc/platforms/pmac_cpufreq.c +++ b/arch/ppc/platforms/pmac_cpufreq.c | |||
@@ -136,7 +136,7 @@ static inline void debug_calc_bogomips(void) | |||
136 | 136 | ||
137 | /* Switch CPU speed under 750FX CPU control | 137 | /* Switch CPU speed under 750FX CPU control |
138 | */ | 138 | */ |
139 | static int __pmac cpu_750fx_cpu_speed(int low_speed) | 139 | static int cpu_750fx_cpu_speed(int low_speed) |
140 | { | 140 | { |
141 | u32 hid2; | 141 | u32 hid2; |
142 | 142 | ||
@@ -172,7 +172,7 @@ static int __pmac cpu_750fx_cpu_speed(int low_speed) | |||
172 | return 0; | 172 | return 0; |
173 | } | 173 | } |
174 | 174 | ||
175 | static unsigned int __pmac cpu_750fx_get_cpu_speed(void) | 175 | static unsigned int cpu_750fx_get_cpu_speed(void) |
176 | { | 176 | { |
177 | if (mfspr(SPRN_HID1) & HID1_PS) | 177 | if (mfspr(SPRN_HID1) & HID1_PS) |
178 | return low_freq; | 178 | return low_freq; |
@@ -181,7 +181,7 @@ static unsigned int __pmac cpu_750fx_get_cpu_speed(void) | |||
181 | } | 181 | } |
182 | 182 | ||
183 | /* Switch CPU speed using DFS */ | 183 | /* Switch CPU speed using DFS */ |
184 | static int __pmac dfs_set_cpu_speed(int low_speed) | 184 | static int dfs_set_cpu_speed(int low_speed) |
185 | { | 185 | { |
186 | if (low_speed == 0) { | 186 | if (low_speed == 0) { |
187 | /* ramping up, set voltage first */ | 187 | /* ramping up, set voltage first */ |
@@ -205,7 +205,7 @@ static int __pmac dfs_set_cpu_speed(int low_speed) | |||
205 | return 0; | 205 | return 0; |
206 | } | 206 | } |
207 | 207 | ||
208 | static unsigned int __pmac dfs_get_cpu_speed(void) | 208 | static unsigned int dfs_get_cpu_speed(void) |
209 | { | 209 | { |
210 | if (mfspr(SPRN_HID1) & HID1_DFS) | 210 | if (mfspr(SPRN_HID1) & HID1_DFS) |
211 | return low_freq; | 211 | return low_freq; |
@@ -216,7 +216,7 @@ static unsigned int __pmac dfs_get_cpu_speed(void) | |||
216 | 216 | ||
217 | /* Switch CPU speed using slewing GPIOs | 217 | /* Switch CPU speed using slewing GPIOs |
218 | */ | 218 | */ |
219 | static int __pmac gpios_set_cpu_speed(int low_speed) | 219 | static int gpios_set_cpu_speed(int low_speed) |
220 | { | 220 | { |
221 | int gpio, timeout = 0; | 221 | int gpio, timeout = 0; |
222 | 222 | ||
@@ -258,7 +258,7 @@ static int __pmac gpios_set_cpu_speed(int low_speed) | |||
258 | 258 | ||
259 | /* Switch CPU speed under PMU control | 259 | /* Switch CPU speed under PMU control |
260 | */ | 260 | */ |
261 | static int __pmac pmu_set_cpu_speed(int low_speed) | 261 | static int pmu_set_cpu_speed(int low_speed) |
262 | { | 262 | { |
263 | struct adb_request req; | 263 | struct adb_request req; |
264 | unsigned long save_l2cr; | 264 | unsigned long save_l2cr; |
@@ -354,7 +354,7 @@ static int __pmac pmu_set_cpu_speed(int low_speed) | |||
354 | return 0; | 354 | return 0; |
355 | } | 355 | } |
356 | 356 | ||
357 | static int __pmac do_set_cpu_speed(int speed_mode, int notify) | 357 | static int do_set_cpu_speed(int speed_mode, int notify) |
358 | { | 358 | { |
359 | struct cpufreq_freqs freqs; | 359 | struct cpufreq_freqs freqs; |
360 | unsigned long l3cr; | 360 | unsigned long l3cr; |
@@ -391,17 +391,17 @@ static int __pmac do_set_cpu_speed(int speed_mode, int notify) | |||
391 | return 0; | 391 | return 0; |
392 | } | 392 | } |
393 | 393 | ||
394 | static unsigned int __pmac pmac_cpufreq_get_speed(unsigned int cpu) | 394 | static unsigned int pmac_cpufreq_get_speed(unsigned int cpu) |
395 | { | 395 | { |
396 | return cur_freq; | 396 | return cur_freq; |
397 | } | 397 | } |
398 | 398 | ||
399 | static int __pmac pmac_cpufreq_verify(struct cpufreq_policy *policy) | 399 | static int pmac_cpufreq_verify(struct cpufreq_policy *policy) |
400 | { | 400 | { |
401 | return cpufreq_frequency_table_verify(policy, pmac_cpu_freqs); | 401 | return cpufreq_frequency_table_verify(policy, pmac_cpu_freqs); |
402 | } | 402 | } |
403 | 403 | ||
404 | static int __pmac pmac_cpufreq_target( struct cpufreq_policy *policy, | 404 | static int pmac_cpufreq_target( struct cpufreq_policy *policy, |
405 | unsigned int target_freq, | 405 | unsigned int target_freq, |
406 | unsigned int relation) | 406 | unsigned int relation) |
407 | { | 407 | { |
@@ -414,13 +414,13 @@ static int __pmac pmac_cpufreq_target( struct cpufreq_policy *policy, | |||
414 | return do_set_cpu_speed(newstate, 1); | 414 | return do_set_cpu_speed(newstate, 1); |
415 | } | 415 | } |
416 | 416 | ||
417 | unsigned int __pmac pmac_get_one_cpufreq(int i) | 417 | unsigned int pmac_get_one_cpufreq(int i) |
418 | { | 418 | { |
419 | /* Supports only one CPU for now */ | 419 | /* Supports only one CPU for now */ |
420 | return (i == 0) ? cur_freq : 0; | 420 | return (i == 0) ? cur_freq : 0; |
421 | } | 421 | } |
422 | 422 | ||
423 | static int __pmac pmac_cpufreq_cpu_init(struct cpufreq_policy *policy) | 423 | static int pmac_cpufreq_cpu_init(struct cpufreq_policy *policy) |
424 | { | 424 | { |
425 | if (policy->cpu != 0) | 425 | if (policy->cpu != 0) |
426 | return -ENODEV; | 426 | return -ENODEV; |
@@ -433,7 +433,7 @@ static int __pmac pmac_cpufreq_cpu_init(struct cpufreq_policy *policy) | |||
433 | return cpufreq_frequency_table_cpuinfo(policy, pmac_cpu_freqs); | 433 | return cpufreq_frequency_table_cpuinfo(policy, pmac_cpu_freqs); |
434 | } | 434 | } |
435 | 435 | ||
436 | static u32 __pmac read_gpio(struct device_node *np) | 436 | static u32 read_gpio(struct device_node *np) |
437 | { | 437 | { |
438 | u32 *reg = (u32 *)get_property(np, "reg", NULL); | 438 | u32 *reg = (u32 *)get_property(np, "reg", NULL); |
439 | u32 offset; | 439 | u32 offset; |
@@ -452,7 +452,7 @@ static u32 __pmac read_gpio(struct device_node *np) | |||
452 | return offset; | 452 | return offset; |
453 | } | 453 | } |
454 | 454 | ||
455 | static int __pmac pmac_cpufreq_suspend(struct cpufreq_policy *policy, pm_message_t pmsg) | 455 | static int pmac_cpufreq_suspend(struct cpufreq_policy *policy, pm_message_t pmsg) |
456 | { | 456 | { |
457 | /* Ok, this could be made a bit smarter, but let's be robust for now. We | 457 | /* Ok, this could be made a bit smarter, but let's be robust for now. We |
458 | * always force a speed change to high speed before sleep, to make sure | 458 | * always force a speed change to high speed before sleep, to make sure |
@@ -468,7 +468,7 @@ static int __pmac pmac_cpufreq_suspend(struct cpufreq_policy *policy, pm_message | |||
468 | return 0; | 468 | return 0; |
469 | } | 469 | } |
470 | 470 | ||
471 | static int __pmac pmac_cpufreq_resume(struct cpufreq_policy *policy) | 471 | static int pmac_cpufreq_resume(struct cpufreq_policy *policy) |
472 | { | 472 | { |
473 | /* If we resume, first check if we have a get() function */ | 473 | /* If we resume, first check if we have a get() function */ |
474 | if (get_speed_proc) | 474 | if (get_speed_proc) |
@@ -501,7 +501,7 @@ static struct cpufreq_driver pmac_cpufreq_driver = { | |||
501 | }; | 501 | }; |
502 | 502 | ||
503 | 503 | ||
504 | static int __pmac pmac_cpufreq_init_MacRISC3(struct device_node *cpunode) | 504 | static int pmac_cpufreq_init_MacRISC3(struct device_node *cpunode) |
505 | { | 505 | { |
506 | struct device_node *volt_gpio_np = of_find_node_by_name(NULL, | 506 | struct device_node *volt_gpio_np = of_find_node_by_name(NULL, |
507 | "voltage-gpio"); | 507 | "voltage-gpio"); |
@@ -593,7 +593,7 @@ static int __pmac pmac_cpufreq_init_MacRISC3(struct device_node *cpunode) | |||
593 | return 0; | 593 | return 0; |
594 | } | 594 | } |
595 | 595 | ||
596 | static int __pmac pmac_cpufreq_init_7447A(struct device_node *cpunode) | 596 | static int pmac_cpufreq_init_7447A(struct device_node *cpunode) |
597 | { | 597 | { |
598 | struct device_node *volt_gpio_np; | 598 | struct device_node *volt_gpio_np; |
599 | 599 | ||
@@ -620,7 +620,7 @@ static int __pmac pmac_cpufreq_init_7447A(struct device_node *cpunode) | |||
620 | return 0; | 620 | return 0; |
621 | } | 621 | } |
622 | 622 | ||
623 | static int __pmac pmac_cpufreq_init_750FX(struct device_node *cpunode) | 623 | static int pmac_cpufreq_init_750FX(struct device_node *cpunode) |
624 | { | 624 | { |
625 | struct device_node *volt_gpio_np; | 625 | struct device_node *volt_gpio_np; |
626 | u32 pvr, *value; | 626 | u32 pvr, *value; |
diff --git a/arch/ppc/platforms/pmac_feature.c b/arch/ppc/platforms/pmac_feature.c index dd6d45ae0501..58884a63ebdb 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 |
@@ -2356,7 +2356,7 @@ static struct pmac_mb_def pmac_mb_defs[] __pmacdata = { | |||
2356 | /* | 2356 | /* |
2357 | * The toplevel feature_call callback | 2357 | * The toplevel feature_call callback |
2358 | */ | 2358 | */ |
2359 | long __pmac | 2359 | long |
2360 | pmac_do_feature_call(unsigned int selector, ...) | 2360 | pmac_do_feature_call(unsigned int selector, ...) |
2361 | { | 2361 | { |
2362 | struct device_node* node; | 2362 | struct device_node* node; |
@@ -2939,8 +2939,8 @@ void __init pmac_check_ht_link(void) | |||
2939 | * Early video resume hook | 2939 | * Early video resume hook |
2940 | */ | 2940 | */ |
2941 | 2941 | ||
2942 | static void (*pmac_early_vresume_proc)(void *data) __pmacdata; | 2942 | static void (*pmac_early_vresume_proc)(void *data); |
2943 | static void *pmac_early_vresume_data __pmacdata; | 2943 | static void *pmac_early_vresume_data; |
2944 | 2944 | ||
2945 | void pmac_set_early_video_resume(void (*proc)(void *data), void *data) | 2945 | void pmac_set_early_video_resume(void (*proc)(void *data), void *data) |
2946 | { | 2946 | { |
@@ -2953,7 +2953,7 @@ void pmac_set_early_video_resume(void (*proc)(void *data), void *data) | |||
2953 | } | 2953 | } |
2954 | EXPORT_SYMBOL(pmac_set_early_video_resume); | 2954 | EXPORT_SYMBOL(pmac_set_early_video_resume); |
2955 | 2955 | ||
2956 | void __pmac pmac_call_early_video_resume(void) | 2956 | void pmac_call_early_video_resume(void) |
2957 | { | 2957 | { |
2958 | if (pmac_early_vresume_proc) | 2958 | if (pmac_early_vresume_proc) |
2959 | pmac_early_vresume_proc(pmac_early_vresume_data); | 2959 | pmac_early_vresume_proc(pmac_early_vresume_data); |
@@ -2963,11 +2963,11 @@ void __pmac pmac_call_early_video_resume(void) | |||
2963 | * AGP related suspend/resume code | 2963 | * AGP related suspend/resume code |
2964 | */ | 2964 | */ |
2965 | 2965 | ||
2966 | static struct pci_dev *pmac_agp_bridge __pmacdata; | 2966 | static struct pci_dev *pmac_agp_bridge; |
2967 | static int (*pmac_agp_suspend)(struct pci_dev *bridge) __pmacdata; | 2967 | static int (*pmac_agp_suspend)(struct pci_dev *bridge); |
2968 | static int (*pmac_agp_resume)(struct pci_dev *bridge) __pmacdata; | 2968 | static int (*pmac_agp_resume)(struct pci_dev *bridge); |
2969 | 2969 | ||
2970 | void __pmac pmac_register_agp_pm(struct pci_dev *bridge, | 2970 | void pmac_register_agp_pm(struct pci_dev *bridge, |
2971 | int (*suspend)(struct pci_dev *bridge), | 2971 | int (*suspend)(struct pci_dev *bridge), |
2972 | int (*resume)(struct pci_dev *bridge)) | 2972 | int (*resume)(struct pci_dev *bridge)) |
2973 | { | 2973 | { |
@@ -2984,7 +2984,7 @@ void __pmac pmac_register_agp_pm(struct pci_dev *bridge, | |||
2984 | } | 2984 | } |
2985 | EXPORT_SYMBOL(pmac_register_agp_pm); | 2985 | EXPORT_SYMBOL(pmac_register_agp_pm); |
2986 | 2986 | ||
2987 | void __pmac pmac_suspend_agp_for_card(struct pci_dev *dev) | 2987 | void pmac_suspend_agp_for_card(struct pci_dev *dev) |
2988 | { | 2988 | { |
2989 | if (pmac_agp_bridge == NULL || pmac_agp_suspend == NULL) | 2989 | if (pmac_agp_bridge == NULL || pmac_agp_suspend == NULL) |
2990 | return; | 2990 | return; |
@@ -2994,7 +2994,7 @@ void __pmac pmac_suspend_agp_for_card(struct pci_dev *dev) | |||
2994 | } | 2994 | } |
2995 | EXPORT_SYMBOL(pmac_suspend_agp_for_card); | 2995 | EXPORT_SYMBOL(pmac_suspend_agp_for_card); |
2996 | 2996 | ||
2997 | void __pmac pmac_resume_agp_for_card(struct pci_dev *dev) | 2997 | void pmac_resume_agp_for_card(struct pci_dev *dev) |
2998 | { | 2998 | { |
2999 | if (pmac_agp_bridge == NULL || pmac_agp_resume == NULL) | 2999 | if (pmac_agp_bridge == NULL || pmac_agp_resume == NULL) |
3000 | return; | 3000 | return; |
diff --git a/arch/ppc/platforms/pmac_nvram.c b/arch/ppc/platforms/pmac_nvram.c index c9de64205996..8c9b008c7226 100644 --- a/arch/ppc/platforms/pmac_nvram.c +++ b/arch/ppc/platforms/pmac_nvram.c | |||
@@ -88,17 +88,17 @@ extern int system_running; | |||
88 | static int (*core99_write_bank)(int bank, u8* datas); | 88 | static int (*core99_write_bank)(int bank, u8* datas); |
89 | static int (*core99_erase_bank)(int bank); | 89 | static int (*core99_erase_bank)(int bank); |
90 | 90 | ||
91 | static char *nvram_image __pmacdata; | 91 | static char *nvram_image; |
92 | 92 | ||
93 | 93 | ||
94 | static unsigned char __pmac core99_nvram_read_byte(int addr) | 94 | static unsigned char core99_nvram_read_byte(int addr) |
95 | { | 95 | { |
96 | if (nvram_image == NULL) | 96 | if (nvram_image == NULL) |
97 | return 0xff; | 97 | return 0xff; |
98 | return nvram_image[addr]; | 98 | return nvram_image[addr]; |
99 | } | 99 | } |
100 | 100 | ||
101 | static void __pmac core99_nvram_write_byte(int addr, unsigned char val) | 101 | static void core99_nvram_write_byte(int addr, unsigned char val) |
102 | { | 102 | { |
103 | if (nvram_image == NULL) | 103 | if (nvram_image == NULL) |
104 | return; | 104 | return; |
@@ -106,18 +106,18 @@ static void __pmac core99_nvram_write_byte(int addr, unsigned char val) | |||
106 | } | 106 | } |
107 | 107 | ||
108 | 108 | ||
109 | static unsigned char __openfirmware direct_nvram_read_byte(int addr) | 109 | static unsigned char direct_nvram_read_byte(int addr) |
110 | { | 110 | { |
111 | return in_8(&nvram_data[(addr & (NVRAM_SIZE - 1)) * nvram_mult]); | 111 | return in_8(&nvram_data[(addr & (NVRAM_SIZE - 1)) * nvram_mult]); |
112 | } | 112 | } |
113 | 113 | ||
114 | static void __openfirmware direct_nvram_write_byte(int addr, unsigned char val) | 114 | static void direct_nvram_write_byte(int addr, unsigned char val) |
115 | { | 115 | { |
116 | out_8(&nvram_data[(addr & (NVRAM_SIZE - 1)) * nvram_mult], val); | 116 | out_8(&nvram_data[(addr & (NVRAM_SIZE - 1)) * nvram_mult], val); |
117 | } | 117 | } |
118 | 118 | ||
119 | 119 | ||
120 | static unsigned char __pmac indirect_nvram_read_byte(int addr) | 120 | static unsigned char indirect_nvram_read_byte(int addr) |
121 | { | 121 | { |
122 | unsigned char val; | 122 | unsigned char val; |
123 | unsigned long flags; | 123 | unsigned long flags; |
@@ -130,7 +130,7 @@ static unsigned char __pmac indirect_nvram_read_byte(int addr) | |||
130 | return val; | 130 | return val; |
131 | } | 131 | } |
132 | 132 | ||
133 | static void __pmac indirect_nvram_write_byte(int addr, unsigned char val) | 133 | static void indirect_nvram_write_byte(int addr, unsigned char val) |
134 | { | 134 | { |
135 | unsigned long flags; | 135 | unsigned long flags; |
136 | 136 | ||
@@ -143,13 +143,13 @@ static void __pmac indirect_nvram_write_byte(int addr, unsigned char val) | |||
143 | 143 | ||
144 | #ifdef CONFIG_ADB_PMU | 144 | #ifdef CONFIG_ADB_PMU |
145 | 145 | ||
146 | static void __pmac pmu_nvram_complete(struct adb_request *req) | 146 | static void pmu_nvram_complete(struct adb_request *req) |
147 | { | 147 | { |
148 | if (req->arg) | 148 | if (req->arg) |
149 | complete((struct completion *)req->arg); | 149 | complete((struct completion *)req->arg); |
150 | } | 150 | } |
151 | 151 | ||
152 | static unsigned char __pmac pmu_nvram_read_byte(int addr) | 152 | static unsigned char pmu_nvram_read_byte(int addr) |
153 | { | 153 | { |
154 | struct adb_request req; | 154 | struct adb_request req; |
155 | DECLARE_COMPLETION(req_complete); | 155 | DECLARE_COMPLETION(req_complete); |
@@ -165,7 +165,7 @@ static unsigned char __pmac pmu_nvram_read_byte(int addr) | |||
165 | return req.reply[0]; | 165 | return req.reply[0]; |
166 | } | 166 | } |
167 | 167 | ||
168 | static void __pmac pmu_nvram_write_byte(int addr, unsigned char val) | 168 | static void pmu_nvram_write_byte(int addr, unsigned char val) |
169 | { | 169 | { |
170 | struct adb_request req; | 170 | struct adb_request req; |
171 | DECLARE_COMPLETION(req_complete); | 171 | DECLARE_COMPLETION(req_complete); |
@@ -183,7 +183,7 @@ static void __pmac pmu_nvram_write_byte(int addr, unsigned char val) | |||
183 | #endif /* CONFIG_ADB_PMU */ | 183 | #endif /* CONFIG_ADB_PMU */ |
184 | 184 | ||
185 | 185 | ||
186 | static u8 __pmac chrp_checksum(struct chrp_header* hdr) | 186 | static u8 chrp_checksum(struct chrp_header* hdr) |
187 | { | 187 | { |
188 | u8 *ptr; | 188 | u8 *ptr; |
189 | u16 sum = hdr->signature; | 189 | u16 sum = hdr->signature; |
@@ -194,7 +194,7 @@ static u8 __pmac chrp_checksum(struct chrp_header* hdr) | |||
194 | return sum; | 194 | return sum; |
195 | } | 195 | } |
196 | 196 | ||
197 | static u32 __pmac core99_calc_adler(u8 *buffer) | 197 | static u32 core99_calc_adler(u8 *buffer) |
198 | { | 198 | { |
199 | int cnt; | 199 | int cnt; |
200 | u32 low, high; | 200 | u32 low, high; |
@@ -216,7 +216,7 @@ static u32 __pmac core99_calc_adler(u8 *buffer) | |||
216 | return (high << 16) | low; | 216 | return (high << 16) | low; |
217 | } | 217 | } |
218 | 218 | ||
219 | static u32 __pmac core99_check(u8* datas) | 219 | static u32 core99_check(u8* datas) |
220 | { | 220 | { |
221 | struct core99_header* hdr99 = (struct core99_header*)datas; | 221 | struct core99_header* hdr99 = (struct core99_header*)datas; |
222 | 222 | ||
@@ -235,7 +235,7 @@ static u32 __pmac core99_check(u8* datas) | |||
235 | return hdr99->generation; | 235 | return hdr99->generation; |
236 | } | 236 | } |
237 | 237 | ||
238 | static int __pmac sm_erase_bank(int bank) | 238 | static int sm_erase_bank(int bank) |
239 | { | 239 | { |
240 | int stat, i; | 240 | int stat, i; |
241 | unsigned long timeout; | 241 | unsigned long timeout; |
@@ -267,7 +267,7 @@ static int __pmac sm_erase_bank(int bank) | |||
267 | return 0; | 267 | return 0; |
268 | } | 268 | } |
269 | 269 | ||
270 | static int __pmac sm_write_bank(int bank, u8* datas) | 270 | static int sm_write_bank(int bank, u8* datas) |
271 | { | 271 | { |
272 | int i, stat = 0; | 272 | int i, stat = 0; |
273 | unsigned long timeout; | 273 | unsigned long timeout; |
@@ -302,7 +302,7 @@ static int __pmac sm_write_bank(int bank, u8* datas) | |||
302 | return 0; | 302 | return 0; |
303 | } | 303 | } |
304 | 304 | ||
305 | static int __pmac amd_erase_bank(int bank) | 305 | static int amd_erase_bank(int bank) |
306 | { | 306 | { |
307 | int i, stat = 0; | 307 | int i, stat = 0; |
308 | unsigned long timeout; | 308 | unsigned long timeout; |
@@ -349,7 +349,7 @@ static int __pmac amd_erase_bank(int bank) | |||
349 | return 0; | 349 | return 0; |
350 | } | 350 | } |
351 | 351 | ||
352 | static int __pmac amd_write_bank(int bank, u8* datas) | 352 | static int amd_write_bank(int bank, u8* datas) |
353 | { | 353 | { |
354 | int i, stat = 0; | 354 | int i, stat = 0; |
355 | unsigned long timeout; | 355 | unsigned long timeout; |
@@ -430,7 +430,7 @@ static void __init lookup_partitions(void) | |||
430 | DBG("nvram: NR partition at 0x%x\n", nvram_partitions[pmac_nvram_NR]); | 430 | DBG("nvram: NR partition at 0x%x\n", nvram_partitions[pmac_nvram_NR]); |
431 | } | 431 | } |
432 | 432 | ||
433 | static void __pmac core99_nvram_sync(void) | 433 | static void core99_nvram_sync(void) |
434 | { | 434 | { |
435 | struct core99_header* hdr99; | 435 | struct core99_header* hdr99; |
436 | unsigned long flags; | 436 | unsigned long flags; |
@@ -554,12 +554,12 @@ void __init pmac_nvram_init(void) | |||
554 | lookup_partitions(); | 554 | lookup_partitions(); |
555 | } | 555 | } |
556 | 556 | ||
557 | int __pmac pmac_get_partition(int partition) | 557 | int pmac_get_partition(int partition) |
558 | { | 558 | { |
559 | return nvram_partitions[partition]; | 559 | return nvram_partitions[partition]; |
560 | } | 560 | } |
561 | 561 | ||
562 | u8 __pmac pmac_xpram_read(int xpaddr) | 562 | u8 pmac_xpram_read(int xpaddr) |
563 | { | 563 | { |
564 | int offset = nvram_partitions[pmac_nvram_XPRAM]; | 564 | int offset = nvram_partitions[pmac_nvram_XPRAM]; |
565 | 565 | ||
@@ -569,7 +569,7 @@ u8 __pmac pmac_xpram_read(int xpaddr) | |||
569 | return ppc_md.nvram_read_val(xpaddr + offset); | 569 | return ppc_md.nvram_read_val(xpaddr + offset); |
570 | } | 570 | } |
571 | 571 | ||
572 | void __pmac pmac_xpram_write(int xpaddr, u8 data) | 572 | void pmac_xpram_write(int xpaddr, u8 data) |
573 | { | 573 | { |
574 | int offset = nvram_partitions[pmac_nvram_XPRAM]; | 574 | int offset = nvram_partitions[pmac_nvram_XPRAM]; |
575 | 575 | ||
diff --git a/arch/ppc/platforms/pmac_pci.c b/arch/ppc/platforms/pmac_pci.c index 719fb49fe2bc..786295b6ddd0 100644 --- a/arch/ppc/platforms/pmac_pci.c +++ b/arch/ppc/platforms/pmac_pci.c | |||
@@ -141,7 +141,7 @@ fixup_bus_range(struct device_node *bridge) | |||
141 | |(((unsigned long)(off)) & 0xFCUL) \ | 141 | |(((unsigned long)(off)) & 0xFCUL) \ |
142 | |1UL) | 142 | |1UL) |
143 | 143 | ||
144 | static void volatile __iomem * __pmac | 144 | static void volatile __iomem * |
145 | macrisc_cfg_access(struct pci_controller* hose, u8 bus, u8 dev_fn, u8 offset) | 145 | macrisc_cfg_access(struct pci_controller* hose, u8 bus, u8 dev_fn, u8 offset) |
146 | { | 146 | { |
147 | unsigned int caddr; | 147 | unsigned int caddr; |
@@ -162,7 +162,7 @@ macrisc_cfg_access(struct pci_controller* hose, u8 bus, u8 dev_fn, u8 offset) | |||
162 | return hose->cfg_data + offset; | 162 | return hose->cfg_data + offset; |
163 | } | 163 | } |
164 | 164 | ||
165 | static int __pmac | 165 | static int |
166 | macrisc_read_config(struct pci_bus *bus, unsigned int devfn, int offset, | 166 | macrisc_read_config(struct pci_bus *bus, unsigned int devfn, int offset, |
167 | int len, u32 *val) | 167 | int len, u32 *val) |
168 | { | 168 | { |
@@ -190,7 +190,7 @@ macrisc_read_config(struct pci_bus *bus, unsigned int devfn, int offset, | |||
190 | return PCIBIOS_SUCCESSFUL; | 190 | return PCIBIOS_SUCCESSFUL; |
191 | } | 191 | } |
192 | 192 | ||
193 | static int __pmac | 193 | static int |
194 | macrisc_write_config(struct pci_bus *bus, unsigned int devfn, int offset, | 194 | macrisc_write_config(struct pci_bus *bus, unsigned int devfn, int offset, |
195 | int len, u32 val) | 195 | int len, u32 val) |
196 | { | 196 | { |
@@ -230,7 +230,7 @@ static struct pci_ops macrisc_pci_ops = | |||
230 | /* | 230 | /* |
231 | * Verifiy that a specific (bus, dev_fn) exists on chaos | 231 | * Verifiy that a specific (bus, dev_fn) exists on chaos |
232 | */ | 232 | */ |
233 | static int __pmac | 233 | static int |
234 | chaos_validate_dev(struct pci_bus *bus, int devfn, int offset) | 234 | chaos_validate_dev(struct pci_bus *bus, int devfn, int offset) |
235 | { | 235 | { |
236 | struct device_node *np; | 236 | struct device_node *np; |
@@ -252,7 +252,7 @@ chaos_validate_dev(struct pci_bus *bus, int devfn, int offset) | |||
252 | return PCIBIOS_SUCCESSFUL; | 252 | return PCIBIOS_SUCCESSFUL; |
253 | } | 253 | } |
254 | 254 | ||
255 | static int __pmac | 255 | static int |
256 | chaos_read_config(struct pci_bus *bus, unsigned int devfn, int offset, | 256 | chaos_read_config(struct pci_bus *bus, unsigned int devfn, int offset, |
257 | int len, u32 *val) | 257 | int len, u32 *val) |
258 | { | 258 | { |
@@ -264,7 +264,7 @@ chaos_read_config(struct pci_bus *bus, unsigned int devfn, int offset, | |||
264 | return macrisc_read_config(bus, devfn, offset, len, val); | 264 | return macrisc_read_config(bus, devfn, offset, len, val); |
265 | } | 265 | } |
266 | 266 | ||
267 | static int __pmac | 267 | static int |
268 | chaos_write_config(struct pci_bus *bus, unsigned int devfn, int offset, | 268 | chaos_write_config(struct pci_bus *bus, unsigned int devfn, int offset, |
269 | int len, u32 val) | 269 | int len, u32 val) |
270 | { | 270 | { |
@@ -294,7 +294,7 @@ static struct pci_ops chaos_pci_ops = | |||
294 | + (((unsigned long)bus) << 16) \ | 294 | + (((unsigned long)bus) << 16) \ |
295 | + 0x01000000UL) | 295 | + 0x01000000UL) |
296 | 296 | ||
297 | static void volatile __iomem * __pmac | 297 | static void volatile __iomem * |
298 | u3_ht_cfg_access(struct pci_controller* hose, u8 bus, u8 devfn, u8 offset) | 298 | u3_ht_cfg_access(struct pci_controller* hose, u8 bus, u8 devfn, u8 offset) |
299 | { | 299 | { |
300 | if (bus == hose->first_busno) { | 300 | if (bus == hose->first_busno) { |
@@ -307,7 +307,7 @@ u3_ht_cfg_access(struct pci_controller* hose, u8 bus, u8 devfn, u8 offset) | |||
307 | return hose->cfg_data + U3_HT_CFA1(bus, devfn, offset); | 307 | return hose->cfg_data + U3_HT_CFA1(bus, devfn, offset); |
308 | } | 308 | } |
309 | 309 | ||
310 | static int __pmac | 310 | static int |
311 | u3_ht_read_config(struct pci_bus *bus, unsigned int devfn, int offset, | 311 | u3_ht_read_config(struct pci_bus *bus, unsigned int devfn, int offset, |
312 | int len, u32 *val) | 312 | int len, u32 *val) |
313 | { | 313 | { |
@@ -357,7 +357,7 @@ u3_ht_read_config(struct pci_bus *bus, unsigned int devfn, int offset, | |||
357 | return PCIBIOS_SUCCESSFUL; | 357 | return PCIBIOS_SUCCESSFUL; |
358 | } | 358 | } |
359 | 359 | ||
360 | static int __pmac | 360 | static int |
361 | u3_ht_write_config(struct pci_bus *bus, unsigned int devfn, int offset, | 361 | u3_ht_write_config(struct pci_bus *bus, unsigned int devfn, int offset, |
362 | int len, u32 val) | 362 | int len, u32 val) |
363 | { | 363 | { |
@@ -575,7 +575,7 @@ pmac_find_bridges(void) | |||
575 | * some offset between bus number and domains for now when we | 575 | * some offset between bus number and domains for now when we |
576 | * assign all busses should help for now | 576 | * assign all busses should help for now |
577 | */ | 577 | */ |
578 | if (pci_assign_all_busses) | 578 | if (pci_assign_all_buses) |
579 | pcibios_assign_bus_offset = 0x10; | 579 | pcibios_assign_bus_offset = 0x10; |
580 | 580 | ||
581 | #ifdef CONFIG_POWER4 | 581 | #ifdef CONFIG_POWER4 |
@@ -643,7 +643,7 @@ static inline void grackle_set_loop_snoop(struct pci_controller *bp, int enable) | |||
643 | static int __init | 643 | static int __init |
644 | setup_uninorth(struct pci_controller* hose, struct reg_property* addr) | 644 | setup_uninorth(struct pci_controller* hose, struct reg_property* addr) |
645 | { | 645 | { |
646 | pci_assign_all_busses = 1; | 646 | pci_assign_all_buses = 1; |
647 | has_uninorth = 1; | 647 | has_uninorth = 1; |
648 | hose->ops = ¯isc_pci_ops; | 648 | hose->ops = ¯isc_pci_ops; |
649 | hose->cfg_addr = ioremap(addr->address + 0x800000, 0x1000); | 649 | hose->cfg_addr = ioremap(addr->address + 0x800000, 0x1000); |
@@ -677,7 +677,7 @@ setup_u3_agp(struct pci_controller* hose, struct reg_property* addr) | |||
677 | { | 677 | { |
678 | /* On G5, we move AGP up to high bus number so we don't need | 678 | /* On G5, we move AGP up to high bus number so we don't need |
679 | * to reassign bus numbers for HT. If we ever have P2P bridges | 679 | * to reassign bus numbers for HT. If we ever have P2P bridges |
680 | * on AGP, we'll have to move pci_assign_all_busses to the | 680 | * on AGP, we'll have to move pci_assign_all_buses to the |
681 | * pci_controller structure so we enable it for AGP and not for | 681 | * pci_controller structure so we enable it for AGP and not for |
682 | * HT childs. | 682 | * HT childs. |
683 | * We hard code the address because of the different size of | 683 | * We hard code the address because of the different size of |
@@ -899,7 +899,7 @@ pmac_pcibios_fixup(void) | |||
899 | pcibios_fixup_OF_interrupts(); | 899 | pcibios_fixup_OF_interrupts(); |
900 | } | 900 | } |
901 | 901 | ||
902 | int __pmac | 902 | int |
903 | pmac_pci_enable_device_hook(struct pci_dev *dev, int initial) | 903 | pmac_pci_enable_device_hook(struct pci_dev *dev, int initial) |
904 | { | 904 | { |
905 | struct device_node* node; | 905 | struct device_node* node; |
@@ -1096,7 +1096,7 @@ DECLARE_PCI_FIXUP_FINAL(PCI_ANY_ID, PCI_ANY_ID, pmac_pci_fixup_pciata); | |||
1096 | * Disable second function on K2-SATA, it's broken | 1096 | * Disable second function on K2-SATA, it's broken |
1097 | * and disable IO BARs on first one | 1097 | * and disable IO BARs on first one |
1098 | */ | 1098 | */ |
1099 | void __pmac pmac_pci_fixup_k2_sata(struct pci_dev* dev) | 1099 | void pmac_pci_fixup_k2_sata(struct pci_dev* dev) |
1100 | { | 1100 | { |
1101 | int i; | 1101 | int i; |
1102 | u16 cmd; | 1102 | u16 cmd; |
diff --git a/arch/ppc/platforms/pmac_pic.c b/arch/ppc/platforms/pmac_pic.c index 2ce058895e03..9f2d95ea8564 100644 --- a/arch/ppc/platforms/pmac_pic.c +++ b/arch/ppc/platforms/pmac_pic.c | |||
@@ -35,6 +35,7 @@ | |||
35 | #include <asm/open_pic.h> | 35 | #include <asm/open_pic.h> |
36 | #include <asm/xmon.h> | 36 | #include <asm/xmon.h> |
37 | #include <asm/pmac_feature.h> | 37 | #include <asm/pmac_feature.h> |
38 | #include <asm/machdep.h> | ||
38 | 39 | ||
39 | #include "pmac_pic.h" | 40 | #include "pmac_pic.h" |
40 | 41 | ||
@@ -53,7 +54,7 @@ struct pmac_irq_hw { | |||
53 | }; | 54 | }; |
54 | 55 | ||
55 | /* Default addresses */ | 56 | /* Default addresses */ |
56 | static volatile struct pmac_irq_hw *pmac_irq_hw[4] __pmacdata = { | 57 | static volatile struct pmac_irq_hw *pmac_irq_hw[4] = { |
57 | (struct pmac_irq_hw *) 0xf3000020, | 58 | (struct pmac_irq_hw *) 0xf3000020, |
58 | (struct pmac_irq_hw *) 0xf3000010, | 59 | (struct pmac_irq_hw *) 0xf3000010, |
59 | (struct pmac_irq_hw *) 0xf4000020, | 60 | (struct pmac_irq_hw *) 0xf4000020, |
@@ -64,22 +65,22 @@ static volatile struct pmac_irq_hw *pmac_irq_hw[4] __pmacdata = { | |||
64 | #define OHARE_LEVEL_MASK 0x1ff00000 | 65 | #define OHARE_LEVEL_MASK 0x1ff00000 |
65 | #define HEATHROW_LEVEL_MASK 0x1ff00000 | 66 | #define HEATHROW_LEVEL_MASK 0x1ff00000 |
66 | 67 | ||
67 | static int max_irqs __pmacdata; | 68 | static int max_irqs; |
68 | static int max_real_irqs __pmacdata; | 69 | static int max_real_irqs; |
69 | static u32 level_mask[4] __pmacdata; | 70 | static u32 level_mask[4]; |
70 | 71 | ||
71 | static DEFINE_SPINLOCK(pmac_pic_lock __pmacdata); | 72 | static DEFINE_SPINLOCK(pmac_pic_lock); |
72 | 73 | ||
73 | 74 | ||
74 | #define GATWICK_IRQ_POOL_SIZE 10 | 75 | #define GATWICK_IRQ_POOL_SIZE 10 |
75 | static struct interrupt_info gatwick_int_pool[GATWICK_IRQ_POOL_SIZE] __pmacdata; | 76 | static struct interrupt_info gatwick_int_pool[GATWICK_IRQ_POOL_SIZE]; |
76 | 77 | ||
77 | /* | 78 | /* |
78 | * Mark an irq as "lost". This is only used on the pmac | 79 | * Mark an irq as "lost". This is only used on the pmac |
79 | * since it can lose interrupts (see pmac_set_irq_mask). | 80 | * since it can lose interrupts (see pmac_set_irq_mask). |
80 | * -- Cort | 81 | * -- Cort |
81 | */ | 82 | */ |
82 | void __pmac | 83 | void |
83 | __set_lost(unsigned long irq_nr, int nokick) | 84 | __set_lost(unsigned long irq_nr, int nokick) |
84 | { | 85 | { |
85 | if (!test_and_set_bit(irq_nr, ppc_lost_interrupts)) { | 86 | if (!test_and_set_bit(irq_nr, ppc_lost_interrupts)) { |
@@ -89,7 +90,7 @@ __set_lost(unsigned long irq_nr, int nokick) | |||
89 | } | 90 | } |
90 | } | 91 | } |
91 | 92 | ||
92 | static void __pmac | 93 | static void |
93 | pmac_mask_and_ack_irq(unsigned int irq_nr) | 94 | pmac_mask_and_ack_irq(unsigned int irq_nr) |
94 | { | 95 | { |
95 | unsigned long bit = 1UL << (irq_nr & 0x1f); | 96 | unsigned long bit = 1UL << (irq_nr & 0x1f); |
@@ -114,7 +115,7 @@ pmac_mask_and_ack_irq(unsigned int irq_nr) | |||
114 | spin_unlock_irqrestore(&pmac_pic_lock, flags); | 115 | spin_unlock_irqrestore(&pmac_pic_lock, flags); |
115 | } | 116 | } |
116 | 117 | ||
117 | static void __pmac pmac_set_irq_mask(unsigned int irq_nr, int nokicklost) | 118 | static void pmac_set_irq_mask(unsigned int irq_nr, int nokicklost) |
118 | { | 119 | { |
119 | unsigned long bit = 1UL << (irq_nr & 0x1f); | 120 | unsigned long bit = 1UL << (irq_nr & 0x1f); |
120 | int i = irq_nr >> 5; | 121 | int i = irq_nr >> 5; |
@@ -147,7 +148,7 @@ static void __pmac pmac_set_irq_mask(unsigned int irq_nr, int nokicklost) | |||
147 | /* When an irq gets requested for the first client, if it's an | 148 | /* When an irq gets requested for the first client, if it's an |
148 | * edge interrupt, we clear any previous one on the controller | 149 | * edge interrupt, we clear any previous one on the controller |
149 | */ | 150 | */ |
150 | static unsigned int __pmac pmac_startup_irq(unsigned int irq_nr) | 151 | static unsigned int pmac_startup_irq(unsigned int irq_nr) |
151 | { | 152 | { |
152 | unsigned long bit = 1UL << (irq_nr & 0x1f); | 153 | unsigned long bit = 1UL << (irq_nr & 0x1f); |
153 | int i = irq_nr >> 5; | 154 | int i = irq_nr >> 5; |
@@ -160,20 +161,20 @@ static unsigned int __pmac pmac_startup_irq(unsigned int irq_nr) | |||
160 | return 0; | 161 | return 0; |
161 | } | 162 | } |
162 | 163 | ||
163 | static void __pmac pmac_mask_irq(unsigned int irq_nr) | 164 | static void pmac_mask_irq(unsigned int irq_nr) |
164 | { | 165 | { |
165 | clear_bit(irq_nr, ppc_cached_irq_mask); | 166 | clear_bit(irq_nr, ppc_cached_irq_mask); |
166 | pmac_set_irq_mask(irq_nr, 0); | 167 | pmac_set_irq_mask(irq_nr, 0); |
167 | mb(); | 168 | mb(); |
168 | } | 169 | } |
169 | 170 | ||
170 | static void __pmac pmac_unmask_irq(unsigned int irq_nr) | 171 | static void pmac_unmask_irq(unsigned int irq_nr) |
171 | { | 172 | { |
172 | set_bit(irq_nr, ppc_cached_irq_mask); | 173 | set_bit(irq_nr, ppc_cached_irq_mask); |
173 | pmac_set_irq_mask(irq_nr, 0); | 174 | pmac_set_irq_mask(irq_nr, 0); |
174 | } | 175 | } |
175 | 176 | ||
176 | static void __pmac pmac_end_irq(unsigned int irq_nr) | 177 | static void pmac_end_irq(unsigned int irq_nr) |
177 | { | 178 | { |
178 | if (!(irq_desc[irq_nr].status & (IRQ_DISABLED|IRQ_INPROGRESS)) | 179 | if (!(irq_desc[irq_nr].status & (IRQ_DISABLED|IRQ_INPROGRESS)) |
179 | && irq_desc[irq_nr].action) { | 180 | && irq_desc[irq_nr].action) { |
diff --git a/arch/ppc/platforms/pmac_setup.c b/arch/ppc/platforms/pmac_setup.c index d6356f480d90..55d2beffe560 100644 --- a/arch/ppc/platforms/pmac_setup.c +++ b/arch/ppc/platforms/pmac_setup.c | |||
@@ -122,7 +122,7 @@ extern struct smp_ops_t psurge_smp_ops; | |||
122 | extern struct smp_ops_t core99_smp_ops; | 122 | extern struct smp_ops_t core99_smp_ops; |
123 | #endif /* CONFIG_SMP */ | 123 | #endif /* CONFIG_SMP */ |
124 | 124 | ||
125 | static int __pmac | 125 | static int |
126 | pmac_show_cpuinfo(struct seq_file *m) | 126 | pmac_show_cpuinfo(struct seq_file *m) |
127 | { | 127 | { |
128 | struct device_node *np; | 128 | struct device_node *np; |
@@ -226,7 +226,7 @@ pmac_show_cpuinfo(struct seq_file *m) | |||
226 | return 0; | 226 | return 0; |
227 | } | 227 | } |
228 | 228 | ||
229 | static int __openfirmware | 229 | static int |
230 | pmac_show_percpuinfo(struct seq_file *m, int i) | 230 | pmac_show_percpuinfo(struct seq_file *m, int i) |
231 | { | 231 | { |
232 | #ifdef CONFIG_CPU_FREQ_PMAC | 232 | #ifdef CONFIG_CPU_FREQ_PMAC |
@@ -330,9 +330,9 @@ pmac_setup_arch(void) | |||
330 | #ifdef CONFIG_SMP | 330 | #ifdef CONFIG_SMP |
331 | /* Check for Core99 */ | 331 | /* Check for Core99 */ |
332 | if (find_devices("uni-n") || find_devices("u3")) | 332 | if (find_devices("uni-n") || find_devices("u3")) |
333 | ppc_md.smp_ops = &core99_smp_ops; | 333 | smp_ops = &core99_smp_ops; |
334 | else | 334 | else |
335 | ppc_md.smp_ops = &psurge_smp_ops; | 335 | smp_ops = &psurge_smp_ops; |
336 | #endif /* CONFIG_SMP */ | 336 | #endif /* CONFIG_SMP */ |
337 | 337 | ||
338 | pci_create_OF_bus_map(); | 338 | pci_create_OF_bus_map(); |
@@ -447,7 +447,7 @@ static int pmac_pm_enter(suspend_state_t state) | |||
447 | enable_kernel_fp(); | 447 | enable_kernel_fp(); |
448 | 448 | ||
449 | #ifdef CONFIG_ALTIVEC | 449 | #ifdef CONFIG_ALTIVEC |
450 | if (cur_cpu_spec[0]->cpu_features & CPU_FTR_ALTIVEC) | 450 | if (cur_cpu_spec->cpu_features & CPU_FTR_ALTIVEC) |
451 | enable_kernel_altivec(); | 451 | enable_kernel_altivec(); |
452 | #endif /* CONFIG_ALTIVEC */ | 452 | #endif /* CONFIG_ALTIVEC */ |
453 | 453 | ||
@@ -485,7 +485,7 @@ static int pmac_late_init(void) | |||
485 | late_initcall(pmac_late_init); | 485 | late_initcall(pmac_late_init); |
486 | 486 | ||
487 | /* can't be __init - can be called whenever a disk is first accessed */ | 487 | /* can't be __init - can be called whenever a disk is first accessed */ |
488 | void __pmac | 488 | void |
489 | note_bootable_part(dev_t dev, int part, int goodness) | 489 | note_bootable_part(dev_t dev, int part, int goodness) |
490 | { | 490 | { |
491 | static int found_boot = 0; | 491 | static int found_boot = 0; |
@@ -511,7 +511,7 @@ note_bootable_part(dev_t dev, int part, int goodness) | |||
511 | } | 511 | } |
512 | } | 512 | } |
513 | 513 | ||
514 | static void __pmac | 514 | static void |
515 | pmac_restart(char *cmd) | 515 | pmac_restart(char *cmd) |
516 | { | 516 | { |
517 | #ifdef CONFIG_ADB_CUDA | 517 | #ifdef CONFIG_ADB_CUDA |
@@ -536,7 +536,7 @@ pmac_restart(char *cmd) | |||
536 | } | 536 | } |
537 | } | 537 | } |
538 | 538 | ||
539 | static void __pmac | 539 | static void |
540 | pmac_power_off(void) | 540 | pmac_power_off(void) |
541 | { | 541 | { |
542 | #ifdef CONFIG_ADB_CUDA | 542 | #ifdef CONFIG_ADB_CUDA |
@@ -561,7 +561,7 @@ pmac_power_off(void) | |||
561 | } | 561 | } |
562 | } | 562 | } |
563 | 563 | ||
564 | static void __pmac | 564 | static void |
565 | pmac_halt(void) | 565 | pmac_halt(void) |
566 | { | 566 | { |
567 | pmac_power_off(); | 567 | pmac_power_off(); |
@@ -661,7 +661,6 @@ pmac_init(unsigned long r3, unsigned long r4, unsigned long r5, | |||
661 | ppc_md.setup_arch = pmac_setup_arch; | 661 | ppc_md.setup_arch = pmac_setup_arch; |
662 | ppc_md.show_cpuinfo = pmac_show_cpuinfo; | 662 | ppc_md.show_cpuinfo = pmac_show_cpuinfo; |
663 | ppc_md.show_percpuinfo = pmac_show_percpuinfo; | 663 | ppc_md.show_percpuinfo = pmac_show_percpuinfo; |
664 | ppc_md.irq_canonicalize = NULL; | ||
665 | ppc_md.init_IRQ = pmac_pic_init; | 664 | ppc_md.init_IRQ = pmac_pic_init; |
666 | ppc_md.get_irq = pmac_get_irq; /* Changed later on ... */ | 665 | ppc_md.get_irq = pmac_get_irq; /* Changed later on ... */ |
667 | 666 | ||
diff --git a/arch/ppc/platforms/pmac_sleep.S b/arch/ppc/platforms/pmac_sleep.S index 88419c77ac43..22b113d19b24 100644 --- a/arch/ppc/platforms/pmac_sleep.S +++ b/arch/ppc/platforms/pmac_sleep.S | |||
@@ -387,10 +387,10 @@ turn_on_mmu: | |||
387 | #endif /* defined(CONFIG_PM) || defined(CONFIG_CPU_FREQ) */ | 387 | #endif /* defined(CONFIG_PM) || defined(CONFIG_CPU_FREQ) */ |
388 | 388 | ||
389 | .section .data | 389 | .section .data |
390 | .balign L1_CACHE_LINE_SIZE | 390 | .balign L1_CACHE_BYTES |
391 | sleep_storage: | 391 | sleep_storage: |
392 | .long 0 | 392 | .long 0 |
393 | .balign L1_CACHE_LINE_SIZE, 0 | 393 | .balign L1_CACHE_BYTES, 0 |
394 | 394 | ||
395 | #endif /* CONFIG_6xx */ | 395 | #endif /* CONFIG_6xx */ |
396 | .section .text | 396 | .section .text |
diff --git a/arch/ppc/platforms/pmac_smp.c b/arch/ppc/platforms/pmac_smp.c index 794a23994b82..26ff26238f03 100644 --- a/arch/ppc/platforms/pmac_smp.c +++ b/arch/ppc/platforms/pmac_smp.c | |||
@@ -186,7 +186,7 @@ static inline void psurge_clr_ipi(int cpu) | |||
186 | */ | 186 | */ |
187 | static unsigned long psurge_smp_message[NR_CPUS]; | 187 | static unsigned long psurge_smp_message[NR_CPUS]; |
188 | 188 | ||
189 | void __pmac psurge_smp_message_recv(struct pt_regs *regs) | 189 | void psurge_smp_message_recv(struct pt_regs *regs) |
190 | { | 190 | { |
191 | int cpu = smp_processor_id(); | 191 | int cpu = smp_processor_id(); |
192 | int msg; | 192 | int msg; |
@@ -203,14 +203,13 @@ void __pmac psurge_smp_message_recv(struct pt_regs *regs) | |||
203 | smp_message_recv(msg, regs); | 203 | smp_message_recv(msg, regs); |
204 | } | 204 | } |
205 | 205 | ||
206 | irqreturn_t __pmac psurge_primary_intr(int irq, void *d, struct pt_regs *regs) | 206 | irqreturn_t psurge_primary_intr(int irq, void *d, struct pt_regs *regs) |
207 | { | 207 | { |
208 | psurge_smp_message_recv(regs); | 208 | psurge_smp_message_recv(regs); |
209 | return IRQ_HANDLED; | 209 | return IRQ_HANDLED; |
210 | } | 210 | } |
211 | 211 | ||
212 | static void __pmac smp_psurge_message_pass(int target, int msg, unsigned long data, | 212 | static void smp_psurge_message_pass(int target, int msg) |
213 | int wait) | ||
214 | { | 213 | { |
215 | int i; | 214 | int i; |
216 | 215 | ||
@@ -629,7 +628,7 @@ void smp_core99_give_timebase(void) | |||
629 | 628 | ||
630 | 629 | ||
631 | /* PowerSurge-style Macs */ | 630 | /* PowerSurge-style Macs */ |
632 | struct smp_ops_t psurge_smp_ops __pmacdata = { | 631 | struct smp_ops_t psurge_smp_ops = { |
633 | .message_pass = smp_psurge_message_pass, | 632 | .message_pass = smp_psurge_message_pass, |
634 | .probe = smp_psurge_probe, | 633 | .probe = smp_psurge_probe, |
635 | .kick_cpu = smp_psurge_kick_cpu, | 634 | .kick_cpu = smp_psurge_kick_cpu, |
@@ -639,7 +638,7 @@ struct smp_ops_t psurge_smp_ops __pmacdata = { | |||
639 | }; | 638 | }; |
640 | 639 | ||
641 | /* Core99 Macs (dual G4s) */ | 640 | /* Core99 Macs (dual G4s) */ |
642 | struct smp_ops_t core99_smp_ops __pmacdata = { | 641 | struct smp_ops_t core99_smp_ops = { |
643 | .message_pass = smp_openpic_message_pass, | 642 | .message_pass = smp_openpic_message_pass, |
644 | .probe = smp_core99_probe, | 643 | .probe = smp_core99_probe, |
645 | .kick_cpu = smp_core99_kick_cpu, | 644 | .kick_cpu = smp_core99_kick_cpu, |
diff --git a/arch/ppc/platforms/pmac_time.c b/arch/ppc/platforms/pmac_time.c index efb819f9490d..edb9fcc64790 100644 --- a/arch/ppc/platforms/pmac_time.c +++ b/arch/ppc/platforms/pmac_time.c | |||
@@ -77,7 +77,7 @@ pmac_time_init(void) | |||
77 | #endif | 77 | #endif |
78 | } | 78 | } |
79 | 79 | ||
80 | unsigned long __pmac | 80 | unsigned long |
81 | pmac_get_rtc_time(void) | 81 | pmac_get_rtc_time(void) |
82 | { | 82 | { |
83 | #if defined(CONFIG_ADB_CUDA) || defined(CONFIG_ADB_PMU) | 83 | #if defined(CONFIG_ADB_CUDA) || defined(CONFIG_ADB_PMU) |
@@ -118,7 +118,7 @@ pmac_get_rtc_time(void) | |||
118 | return 0; | 118 | return 0; |
119 | } | 119 | } |
120 | 120 | ||
121 | int __pmac | 121 | int |
122 | pmac_set_rtc_time(unsigned long nowtime) | 122 | pmac_set_rtc_time(unsigned long nowtime) |
123 | { | 123 | { |
124 | #if defined(CONFIG_ADB_CUDA) || defined(CONFIG_ADB_PMU) | 124 | #if defined(CONFIG_ADB_CUDA) || defined(CONFIG_ADB_PMU) |
@@ -210,7 +210,7 @@ via_calibrate_decr(void) | |||
210 | /* | 210 | /* |
211 | * Reset the time after a sleep. | 211 | * Reset the time after a sleep. |
212 | */ | 212 | */ |
213 | static int __pmac | 213 | static int |
214 | time_sleep_notify(struct pmu_sleep_notifier *self, int when) | 214 | time_sleep_notify(struct pmu_sleep_notifier *self, int when) |
215 | { | 215 | { |
216 | static unsigned long time_diff; | 216 | static unsigned long time_diff; |
@@ -235,7 +235,7 @@ time_sleep_notify(struct pmu_sleep_notifier *self, int when) | |||
235 | return PBOOK_SLEEP_OK; | 235 | return PBOOK_SLEEP_OK; |
236 | } | 236 | } |
237 | 237 | ||
238 | static struct pmu_sleep_notifier time_sleep_notifier __pmacdata = { | 238 | static struct pmu_sleep_notifier time_sleep_notifier = { |
239 | time_sleep_notify, SLEEP_LEVEL_MISC, | 239 | time_sleep_notify, SLEEP_LEVEL_MISC, |
240 | }; | 240 | }; |
241 | #endif /* CONFIG_PM */ | 241 | #endif /* CONFIG_PM */ |
diff --git a/arch/ppc/platforms/pplus.c b/arch/ppc/platforms/pplus.c index e70aae20d6f9..22bd40cfb092 100644 --- a/arch/ppc/platforms/pplus.c +++ b/arch/ppc/platforms/pplus.c | |||
@@ -646,14 +646,6 @@ static void pplus_power_off(void) | |||
646 | pplus_halt(); | 646 | pplus_halt(); |
647 | } | 647 | } |
648 | 648 | ||
649 | static unsigned int pplus_irq_canonicalize(u_int irq) | ||
650 | { | ||
651 | if (irq == 2) | ||
652 | return 9; | ||
653 | else | ||
654 | return irq; | ||
655 | } | ||
656 | |||
657 | static void __init pplus_init_IRQ(void) | 649 | static void __init pplus_init_IRQ(void) |
658 | { | 650 | { |
659 | int i; | 651 | int i; |
@@ -673,10 +665,7 @@ static void __init pplus_init_IRQ(void) | |||
673 | ppc_md.get_irq = openpic_get_irq; | 665 | ppc_md.get_irq = openpic_get_irq; |
674 | } | 666 | } |
675 | 667 | ||
676 | for (i = 0; i < NUM_8259_INTERRUPTS; i++) | 668 | i8259_init(0, 0); |
677 | irq_desc[i].handler = &i8259_pic; | ||
678 | |||
679 | i8259_init(0); | ||
680 | 669 | ||
681 | if (ppc_md.progress) | 670 | if (ppc_md.progress) |
682 | ppc_md.progress("init_irq: exit", 0); | 671 | ppc_md.progress("init_irq: exit", 0); |
@@ -872,10 +861,10 @@ platform_init(unsigned long r3, unsigned long r4, unsigned long r5, | |||
872 | ISA_DMA_THRESHOLD = 0x00ffffff; | 861 | ISA_DMA_THRESHOLD = 0x00ffffff; |
873 | DMA_MODE_READ = 0x44; | 862 | DMA_MODE_READ = 0x44; |
874 | DMA_MODE_WRITE = 0x48; | 863 | DMA_MODE_WRITE = 0x48; |
864 | ppc_do_canonicalize_irqs = 1; | ||
875 | 865 | ||
876 | ppc_md.setup_arch = pplus_setup_arch; | 866 | ppc_md.setup_arch = pplus_setup_arch; |
877 | ppc_md.show_cpuinfo = pplus_show_cpuinfo; | 867 | ppc_md.show_cpuinfo = pplus_show_cpuinfo; |
878 | ppc_md.irq_canonicalize = pplus_irq_canonicalize; | ||
879 | ppc_md.init_IRQ = pplus_init_IRQ; | 868 | ppc_md.init_IRQ = pplus_init_IRQ; |
880 | /* this gets changed later on if we have an OpenPIC -- Cort */ | 869 | /* this gets changed later on if we have an OpenPIC -- Cort */ |
881 | ppc_md.get_irq = i8259_irq; | 870 | ppc_md.get_irq = i8259_irq; |
@@ -911,6 +900,6 @@ platform_init(unsigned long r3, unsigned long r4, unsigned long r5, | |||
911 | ppc_md.kgdb_map_scc = gen550_kgdb_map_scc; | 900 | ppc_md.kgdb_map_scc = gen550_kgdb_map_scc; |
912 | #endif | 901 | #endif |
913 | #ifdef CONFIG_SMP | 902 | #ifdef CONFIG_SMP |
914 | ppc_md.smp_ops = &pplus_smp_ops; | 903 | smp_ops = &pplus_smp_ops; |
915 | #endif /* CONFIG_SMP */ | 904 | #endif /* CONFIG_SMP */ |
916 | } | 905 | } |
diff --git a/arch/ppc/platforms/prep_pci.c b/arch/ppc/platforms/prep_pci.c index 4760cb64251d..e50b9996848c 100644 --- a/arch/ppc/platforms/prep_pci.c +++ b/arch/ppc/platforms/prep_pci.c | |||
@@ -43,7 +43,7 @@ static unsigned long *ProcInfo; | |||
43 | /* Tables for known hardware */ | 43 | /* Tables for known hardware */ |
44 | 44 | ||
45 | /* Motorola PowerStackII - Utah */ | 45 | /* Motorola PowerStackII - Utah */ |
46 | static char Utah_pci_IRQ_map[23] __prepdata = | 46 | static char Utah_pci_IRQ_map[23] = |
47 | { | 47 | { |
48 | 0, /* Slot 0 - unused */ | 48 | 0, /* Slot 0 - unused */ |
49 | 0, /* Slot 1 - unused */ | 49 | 0, /* Slot 1 - unused */ |
@@ -72,7 +72,7 @@ static char Utah_pci_IRQ_map[23] __prepdata = | |||
72 | 0, /* Slot 22 - unused */ | 72 | 0, /* Slot 22 - unused */ |
73 | }; | 73 | }; |
74 | 74 | ||
75 | static char Utah_pci_IRQ_routes[] __prepdata = | 75 | static char Utah_pci_IRQ_routes[] = |
76 | { | 76 | { |
77 | 0, /* Line 0 - Unused */ | 77 | 0, /* Line 0 - Unused */ |
78 | 9, /* Line 1 */ | 78 | 9, /* Line 1 */ |
@@ -84,7 +84,7 @@ static char Utah_pci_IRQ_routes[] __prepdata = | |||
84 | 84 | ||
85 | /* Motorola PowerStackII - Omaha */ | 85 | /* Motorola PowerStackII - Omaha */ |
86 | /* no integrated SCSI or ethernet */ | 86 | /* no integrated SCSI or ethernet */ |
87 | static char Omaha_pci_IRQ_map[23] __prepdata = | 87 | static char Omaha_pci_IRQ_map[23] = |
88 | { | 88 | { |
89 | 0, /* Slot 0 - unused */ | 89 | 0, /* Slot 0 - unused */ |
90 | 0, /* Slot 1 - unused */ | 90 | 0, /* Slot 1 - unused */ |
@@ -111,7 +111,7 @@ static char Omaha_pci_IRQ_map[23] __prepdata = | |||
111 | 0, | 111 | 0, |
112 | }; | 112 | }; |
113 | 113 | ||
114 | static char Omaha_pci_IRQ_routes[] __prepdata = | 114 | static char Omaha_pci_IRQ_routes[] = |
115 | { | 115 | { |
116 | 0, /* Line 0 - Unused */ | 116 | 0, /* Line 0 - Unused */ |
117 | 9, /* Line 1 */ | 117 | 9, /* Line 1 */ |
@@ -121,7 +121,7 @@ static char Omaha_pci_IRQ_routes[] __prepdata = | |||
121 | }; | 121 | }; |
122 | 122 | ||
123 | /* Motorola PowerStack */ | 123 | /* Motorola PowerStack */ |
124 | static char Blackhawk_pci_IRQ_map[19] __prepdata = | 124 | static char Blackhawk_pci_IRQ_map[19] = |
125 | { | 125 | { |
126 | 0, /* Slot 0 - unused */ | 126 | 0, /* Slot 0 - unused */ |
127 | 0, /* Slot 1 - unused */ | 127 | 0, /* Slot 1 - unused */ |
@@ -144,7 +144,7 @@ static char Blackhawk_pci_IRQ_map[19] __prepdata = | |||
144 | 3, /* Slot P5 */ | 144 | 3, /* Slot P5 */ |
145 | }; | 145 | }; |
146 | 146 | ||
147 | static char Blackhawk_pci_IRQ_routes[] __prepdata = | 147 | static char Blackhawk_pci_IRQ_routes[] = |
148 | { | 148 | { |
149 | 0, /* Line 0 - Unused */ | 149 | 0, /* Line 0 - Unused */ |
150 | 9, /* Line 1 */ | 150 | 9, /* Line 1 */ |
@@ -154,7 +154,7 @@ static char Blackhawk_pci_IRQ_routes[] __prepdata = | |||
154 | }; | 154 | }; |
155 | 155 | ||
156 | /* Motorola Mesquite */ | 156 | /* Motorola Mesquite */ |
157 | static char Mesquite_pci_IRQ_map[23] __prepdata = | 157 | static char Mesquite_pci_IRQ_map[23] = |
158 | { | 158 | { |
159 | 0, /* Slot 0 - unused */ | 159 | 0, /* Slot 0 - unused */ |
160 | 0, /* Slot 1 - unused */ | 160 | 0, /* Slot 1 - unused */ |
@@ -182,7 +182,7 @@ static char Mesquite_pci_IRQ_map[23] __prepdata = | |||
182 | }; | 182 | }; |
183 | 183 | ||
184 | /* Motorola Sitka */ | 184 | /* Motorola Sitka */ |
185 | static char Sitka_pci_IRQ_map[21] __prepdata = | 185 | static char Sitka_pci_IRQ_map[21] = |
186 | { | 186 | { |
187 | 0, /* Slot 0 - unused */ | 187 | 0, /* Slot 0 - unused */ |
188 | 0, /* Slot 1 - unused */ | 188 | 0, /* Slot 1 - unused */ |
@@ -208,7 +208,7 @@ static char Sitka_pci_IRQ_map[21] __prepdata = | |||
208 | }; | 208 | }; |
209 | 209 | ||
210 | /* Motorola MTX */ | 210 | /* Motorola MTX */ |
211 | static char MTX_pci_IRQ_map[23] __prepdata = | 211 | static char MTX_pci_IRQ_map[23] = |
212 | { | 212 | { |
213 | 0, /* Slot 0 - unused */ | 213 | 0, /* Slot 0 - unused */ |
214 | 0, /* Slot 1 - unused */ | 214 | 0, /* Slot 1 - unused */ |
@@ -237,7 +237,7 @@ static char MTX_pci_IRQ_map[23] __prepdata = | |||
237 | 237 | ||
238 | /* Motorola MTX Plus */ | 238 | /* Motorola MTX Plus */ |
239 | /* Secondary bus interrupt routing is not supported yet */ | 239 | /* Secondary bus interrupt routing is not supported yet */ |
240 | static char MTXplus_pci_IRQ_map[23] __prepdata = | 240 | static char MTXplus_pci_IRQ_map[23] = |
241 | { | 241 | { |
242 | 0, /* Slot 0 - unused */ | 242 | 0, /* Slot 0 - unused */ |
243 | 0, /* Slot 1 - unused */ | 243 | 0, /* Slot 1 - unused */ |
@@ -264,13 +264,13 @@ static char MTXplus_pci_IRQ_map[23] __prepdata = | |||
264 | 0, /* Slot 22 - unused */ | 264 | 0, /* Slot 22 - unused */ |
265 | }; | 265 | }; |
266 | 266 | ||
267 | static char Raven_pci_IRQ_routes[] __prepdata = | 267 | static char Raven_pci_IRQ_routes[] = |
268 | { | 268 | { |
269 | 0, /* This is a dummy structure */ | 269 | 0, /* This is a dummy structure */ |
270 | }; | 270 | }; |
271 | 271 | ||
272 | /* Motorola MVME16xx */ | 272 | /* Motorola MVME16xx */ |
273 | static char Genesis_pci_IRQ_map[16] __prepdata = | 273 | static char Genesis_pci_IRQ_map[16] = |
274 | { | 274 | { |
275 | 0, /* Slot 0 - unused */ | 275 | 0, /* Slot 0 - unused */ |
276 | 0, /* Slot 1 - unused */ | 276 | 0, /* Slot 1 - unused */ |
@@ -290,7 +290,7 @@ static char Genesis_pci_IRQ_map[16] __prepdata = | |||
290 | 0, /* Slot 15 - unused */ | 290 | 0, /* Slot 15 - unused */ |
291 | }; | 291 | }; |
292 | 292 | ||
293 | static char Genesis_pci_IRQ_routes[] __prepdata = | 293 | static char Genesis_pci_IRQ_routes[] = |
294 | { | 294 | { |
295 | 0, /* Line 0 - Unused */ | 295 | 0, /* Line 0 - Unused */ |
296 | 10, /* Line 1 */ | 296 | 10, /* Line 1 */ |
@@ -299,7 +299,7 @@ static char Genesis_pci_IRQ_routes[] __prepdata = | |||
299 | 15 /* Line 4 */ | 299 | 15 /* Line 4 */ |
300 | }; | 300 | }; |
301 | 301 | ||
302 | static char Genesis2_pci_IRQ_map[23] __prepdata = | 302 | static char Genesis2_pci_IRQ_map[23] = |
303 | { | 303 | { |
304 | 0, /* Slot 0 - unused */ | 304 | 0, /* Slot 0 - unused */ |
305 | 0, /* Slot 1 - unused */ | 305 | 0, /* Slot 1 - unused */ |
@@ -327,7 +327,7 @@ static char Genesis2_pci_IRQ_map[23] __prepdata = | |||
327 | }; | 327 | }; |
328 | 328 | ||
329 | /* Motorola Series-E */ | 329 | /* Motorola Series-E */ |
330 | static char Comet_pci_IRQ_map[23] __prepdata = | 330 | static char Comet_pci_IRQ_map[23] = |
331 | { | 331 | { |
332 | 0, /* Slot 0 - unused */ | 332 | 0, /* Slot 0 - unused */ |
333 | 0, /* Slot 1 - unused */ | 333 | 0, /* Slot 1 - unused */ |
@@ -354,7 +354,7 @@ static char Comet_pci_IRQ_map[23] __prepdata = | |||
354 | 0, | 354 | 0, |
355 | }; | 355 | }; |
356 | 356 | ||
357 | static char Comet_pci_IRQ_routes[] __prepdata = | 357 | static char Comet_pci_IRQ_routes[] = |
358 | { | 358 | { |
359 | 0, /* Line 0 - Unused */ | 359 | 0, /* Line 0 - Unused */ |
360 | 10, /* Line 1 */ | 360 | 10, /* Line 1 */ |
@@ -364,7 +364,7 @@ static char Comet_pci_IRQ_routes[] __prepdata = | |||
364 | }; | 364 | }; |
365 | 365 | ||
366 | /* Motorola Series-EX */ | 366 | /* Motorola Series-EX */ |
367 | static char Comet2_pci_IRQ_map[23] __prepdata = | 367 | static char Comet2_pci_IRQ_map[23] = |
368 | { | 368 | { |
369 | 0, /* Slot 0 - unused */ | 369 | 0, /* Slot 0 - unused */ |
370 | 0, /* Slot 1 - unused */ | 370 | 0, /* Slot 1 - unused */ |
@@ -391,7 +391,7 @@ static char Comet2_pci_IRQ_map[23] __prepdata = | |||
391 | 0, | 391 | 0, |
392 | }; | 392 | }; |
393 | 393 | ||
394 | static char Comet2_pci_IRQ_routes[] __prepdata = | 394 | static char Comet2_pci_IRQ_routes[] = |
395 | { | 395 | { |
396 | 0, /* Line 0 - Unused */ | 396 | 0, /* Line 0 - Unused */ |
397 | 10, /* Line 1 */ | 397 | 10, /* Line 1 */ |
@@ -405,7 +405,7 @@ static char Comet2_pci_IRQ_routes[] __prepdata = | |||
405 | * This is actually based on the Carolina motherboard | 405 | * This is actually based on the Carolina motherboard |
406 | * -- Cort | 406 | * -- Cort |
407 | */ | 407 | */ |
408 | static char ibm8xx_pci_IRQ_map[23] __prepdata = { | 408 | static char ibm8xx_pci_IRQ_map[23] = { |
409 | 0, /* Slot 0 - unused */ | 409 | 0, /* Slot 0 - unused */ |
410 | 0, /* Slot 1 - unused */ | 410 | 0, /* Slot 1 - unused */ |
411 | 0, /* Slot 2 - unused */ | 411 | 0, /* Slot 2 - unused */ |
@@ -431,7 +431,7 @@ static char ibm8xx_pci_IRQ_map[23] __prepdata = { | |||
431 | 2, /* Slot 22 - PCI slot 1 PCIINTx# (See below) */ | 431 | 2, /* Slot 22 - PCI slot 1 PCIINTx# (See below) */ |
432 | }; | 432 | }; |
433 | 433 | ||
434 | static char ibm8xx_pci_IRQ_routes[] __prepdata = { | 434 | static char ibm8xx_pci_IRQ_routes[] = { |
435 | 0, /* Line 0 - unused */ | 435 | 0, /* Line 0 - unused */ |
436 | 15, /* Line 1 */ | 436 | 15, /* Line 1 */ |
437 | 15, /* Line 2 */ | 437 | 15, /* Line 2 */ |
@@ -443,7 +443,7 @@ static char ibm8xx_pci_IRQ_routes[] __prepdata = { | |||
443 | * a 6015 ibm board | 443 | * a 6015 ibm board |
444 | * -- Cort | 444 | * -- Cort |
445 | */ | 445 | */ |
446 | static char ibm6015_pci_IRQ_map[23] __prepdata = { | 446 | static char ibm6015_pci_IRQ_map[23] = { |
447 | 0, /* Slot 0 - unused */ | 447 | 0, /* Slot 0 - unused */ |
448 | 0, /* Slot 1 - unused */ | 448 | 0, /* Slot 1 - unused */ |
449 | 0, /* Slot 2 - unused */ | 449 | 0, /* Slot 2 - unused */ |
@@ -469,7 +469,7 @@ static char ibm6015_pci_IRQ_map[23] __prepdata = { | |||
469 | 2, /* Slot 22 - */ | 469 | 2, /* Slot 22 - */ |
470 | }; | 470 | }; |
471 | 471 | ||
472 | static char ibm6015_pci_IRQ_routes[] __prepdata = { | 472 | static char ibm6015_pci_IRQ_routes[] = { |
473 | 0, /* Line 0 - unused */ | 473 | 0, /* Line 0 - unused */ |
474 | 13, /* Line 1 */ | 474 | 13, /* Line 1 */ |
475 | 15, /* Line 2 */ | 475 | 15, /* Line 2 */ |
@@ -479,7 +479,7 @@ static char ibm6015_pci_IRQ_routes[] __prepdata = { | |||
479 | 479 | ||
480 | 480 | ||
481 | /* IBM Nobis and Thinkpad 850 */ | 481 | /* IBM Nobis and Thinkpad 850 */ |
482 | static char Nobis_pci_IRQ_map[23] __prepdata ={ | 482 | static char Nobis_pci_IRQ_map[23] ={ |
483 | 0, /* Slot 0 - unused */ | 483 | 0, /* Slot 0 - unused */ |
484 | 0, /* Slot 1 - unused */ | 484 | 0, /* Slot 1 - unused */ |
485 | 0, /* Slot 2 - unused */ | 485 | 0, /* Slot 2 - unused */ |
@@ -498,7 +498,7 @@ static char Nobis_pci_IRQ_map[23] __prepdata ={ | |||
498 | 0, /* Slot 15 - unused */ | 498 | 0, /* Slot 15 - unused */ |
499 | }; | 499 | }; |
500 | 500 | ||
501 | static char Nobis_pci_IRQ_routes[] __prepdata = { | 501 | static char Nobis_pci_IRQ_routes[] = { |
502 | 0, /* Line 0 - Unused */ | 502 | 0, /* Line 0 - Unused */ |
503 | 13, /* Line 1 */ | 503 | 13, /* Line 1 */ |
504 | 13, /* Line 2 */ | 504 | 13, /* Line 2 */ |
@@ -510,7 +510,7 @@ static char Nobis_pci_IRQ_routes[] __prepdata = { | |||
510 | * IBM RS/6000 43p/140 -- paulus | 510 | * IBM RS/6000 43p/140 -- paulus |
511 | * XXX we should get all this from the residual data | 511 | * XXX we should get all this from the residual data |
512 | */ | 512 | */ |
513 | static char ibm43p_pci_IRQ_map[23] __prepdata = { | 513 | static char ibm43p_pci_IRQ_map[23] = { |
514 | 0, /* Slot 0 - unused */ | 514 | 0, /* Slot 0 - unused */ |
515 | 0, /* Slot 1 - unused */ | 515 | 0, /* Slot 1 - unused */ |
516 | 0, /* Slot 2 - unused */ | 516 | 0, /* Slot 2 - unused */ |
@@ -536,7 +536,7 @@ static char ibm43p_pci_IRQ_map[23] __prepdata = { | |||
536 | 1, /* Slot 22 - PCI slot 1 PCIINTx# (See below) */ | 536 | 1, /* Slot 22 - PCI slot 1 PCIINTx# (See below) */ |
537 | }; | 537 | }; |
538 | 538 | ||
539 | static char ibm43p_pci_IRQ_routes[] __prepdata = { | 539 | static char ibm43p_pci_IRQ_routes[] = { |
540 | 0, /* Line 0 - unused */ | 540 | 0, /* Line 0 - unused */ |
541 | 15, /* Line 1 */ | 541 | 15, /* Line 1 */ |
542 | 15, /* Line 2 */ | 542 | 15, /* Line 2 */ |
@@ -559,7 +559,7 @@ struct powerplus_irq_list | |||
559 | * are routed to OpenPIC inputs 5-8. These values are offset by | 559 | * are routed to OpenPIC inputs 5-8. These values are offset by |
560 | * 16 in the table to reflect the Linux kernel interrupt value. | 560 | * 16 in the table to reflect the Linux kernel interrupt value. |
561 | */ | 561 | */ |
562 | struct powerplus_irq_list Powerplus_pci_IRQ_list __prepdata = | 562 | struct powerplus_irq_list Powerplus_pci_IRQ_list = |
563 | { | 563 | { |
564 | {25, 26, 27, 28}, | 564 | {25, 26, 27, 28}, |
565 | {21, 22, 23, 24} | 565 | {21, 22, 23, 24} |
@@ -572,7 +572,7 @@ struct powerplus_irq_list Powerplus_pci_IRQ_list __prepdata = | |||
572 | * are routed to OpenPIC inputs 12-15. These values are offset by | 572 | * are routed to OpenPIC inputs 12-15. These values are offset by |
573 | * 16 in the table to reflect the Linux kernel interrupt value. | 573 | * 16 in the table to reflect the Linux kernel interrupt value. |
574 | */ | 574 | */ |
575 | struct powerplus_irq_list Mesquite_pci_IRQ_list __prepdata = | 575 | struct powerplus_irq_list Mesquite_pci_IRQ_list = |
576 | { | 576 | { |
577 | {24, 25, 26, 27}, | 577 | {24, 25, 26, 27}, |
578 | {28, 29, 30, 31} | 578 | {28, 29, 30, 31} |
@@ -582,7 +582,7 @@ struct powerplus_irq_list Mesquite_pci_IRQ_list __prepdata = | |||
582 | * This table represents the standard PCI swizzle defined in the | 582 | * This table represents the standard PCI swizzle defined in the |
583 | * PCI bus specification. | 583 | * PCI bus specification. |
584 | */ | 584 | */ |
585 | static unsigned char prep_pci_intpins[4][4] __prepdata = | 585 | static unsigned char prep_pci_intpins[4][4] = |
586 | { | 586 | { |
587 | { 1, 2, 3, 4}, /* Buses 0, 4, 8, ... */ | 587 | { 1, 2, 3, 4}, /* Buses 0, 4, 8, ... */ |
588 | { 2, 3, 4, 1}, /* Buses 1, 5, 9, ... */ | 588 | { 2, 3, 4, 1}, /* Buses 1, 5, 9, ... */ |
@@ -622,7 +622,7 @@ static unsigned char prep_pci_intpins[4][4] __prepdata = | |||
622 | #define MIN_DEVNR 11 | 622 | #define MIN_DEVNR 11 |
623 | #define MAX_DEVNR 22 | 623 | #define MAX_DEVNR 22 |
624 | 624 | ||
625 | static int __prep | 625 | static int |
626 | prep_read_config(struct pci_bus *bus, unsigned int devfn, int offset, | 626 | prep_read_config(struct pci_bus *bus, unsigned int devfn, int offset, |
627 | int len, u32 *val) | 627 | int len, u32 *val) |
628 | { | 628 | { |
@@ -652,7 +652,7 @@ prep_read_config(struct pci_bus *bus, unsigned int devfn, int offset, | |||
652 | return PCIBIOS_SUCCESSFUL; | 652 | return PCIBIOS_SUCCESSFUL; |
653 | } | 653 | } |
654 | 654 | ||
655 | static int __prep | 655 | static int |
656 | prep_write_config(struct pci_bus *bus, unsigned int devfn, int offset, | 656 | prep_write_config(struct pci_bus *bus, unsigned int devfn, int offset, |
657 | int len, u32 val) | 657 | int len, u32 val) |
658 | { | 658 | { |
@@ -804,7 +804,7 @@ struct mot_info { | |||
804 | void (*map_non0_bus)(struct pci_dev *); /* For boards with more than bus 0 devices. */ | 804 | void (*map_non0_bus)(struct pci_dev *); /* For boards with more than bus 0 devices. */ |
805 | struct powerplus_irq_list *pci_irq_list; /* List of PCI MPIC inputs */ | 805 | struct powerplus_irq_list *pci_irq_list; /* List of PCI MPIC inputs */ |
806 | unsigned char secondary_bridge_devfn; /* devfn of secondary bus transparent bridge */ | 806 | unsigned char secondary_bridge_devfn; /* devfn of secondary bus transparent bridge */ |
807 | } mot_info[] __prepdata = { | 807 | } mot_info[] = { |
808 | {0x300, 0x00, 0x00, "MVME 2400", Genesis2_pci_IRQ_map, Raven_pci_IRQ_routes, Powerplus_Map_Non0, &Powerplus_pci_IRQ_list, 0xFF}, | 808 | {0x300, 0x00, 0x00, "MVME 2400", Genesis2_pci_IRQ_map, Raven_pci_IRQ_routes, Powerplus_Map_Non0, &Powerplus_pci_IRQ_list, 0xFF}, |
809 | {0x010, 0x00, 0x00, "Genesis", Genesis_pci_IRQ_map, Genesis_pci_IRQ_routes, Powerplus_Map_Non0, &Powerplus_pci_IRQ_list, 0x00}, | 809 | {0x010, 0x00, 0x00, "Genesis", Genesis_pci_IRQ_map, Genesis_pci_IRQ_routes, Powerplus_Map_Non0, &Powerplus_pci_IRQ_list, 0x00}, |
810 | {0x020, 0x00, 0x00, "Powerstack (Series E)", Comet_pci_IRQ_map, Comet_pci_IRQ_routes, NULL, NULL, 0x00}, | 810 | {0x020, 0x00, 0x00, "Powerstack (Series E)", Comet_pci_IRQ_map, Comet_pci_IRQ_routes, NULL, NULL, 0x00}, |
diff --git a/arch/ppc/platforms/prep_setup.c b/arch/ppc/platforms/prep_setup.c index bc926be95472..067d7d53b81e 100644 --- a/arch/ppc/platforms/prep_setup.c +++ b/arch/ppc/platforms/prep_setup.c | |||
@@ -89,9 +89,6 @@ extern void prep_tiger1_setup_pci(char *irq_edge_mask_lo, char *irq_edge_mask_hi | |||
89 | #define cached_21 (((char *)(ppc_cached_irq_mask))[3]) | 89 | #define cached_21 (((char *)(ppc_cached_irq_mask))[3]) |
90 | #define cached_A1 (((char *)(ppc_cached_irq_mask))[2]) | 90 | #define cached_A1 (((char *)(ppc_cached_irq_mask))[2]) |
91 | 91 | ||
92 | /* for the mac fs */ | ||
93 | dev_t boot_dev; | ||
94 | |||
95 | #ifdef CONFIG_SOUND_CS4232 | 92 | #ifdef CONFIG_SOUND_CS4232 |
96 | long ppc_cs4232_dma, ppc_cs4232_dma2; | 93 | long ppc_cs4232_dma, ppc_cs4232_dma2; |
97 | #endif | 94 | #endif |
@@ -173,7 +170,7 @@ prep_carolina_enable_l2(void) | |||
173 | } | 170 | } |
174 | 171 | ||
175 | /* cpuinfo code common to all IBM PReP */ | 172 | /* cpuinfo code common to all IBM PReP */ |
176 | static void __prep | 173 | static void |
177 | prep_ibm_cpuinfo(struct seq_file *m) | 174 | prep_ibm_cpuinfo(struct seq_file *m) |
178 | { | 175 | { |
179 | unsigned int equip_reg = inb(PREP_IBM_EQUIPMENT); | 176 | unsigned int equip_reg = inb(PREP_IBM_EQUIPMENT); |
@@ -209,14 +206,14 @@ prep_ibm_cpuinfo(struct seq_file *m) | |||
209 | } | 206 | } |
210 | } | 207 | } |
211 | 208 | ||
212 | static int __prep | 209 | static int |
213 | prep_gen_cpuinfo(struct seq_file *m) | 210 | prep_gen_cpuinfo(struct seq_file *m) |
214 | { | 211 | { |
215 | prep_ibm_cpuinfo(m); | 212 | prep_ibm_cpuinfo(m); |
216 | return 0; | 213 | return 0; |
217 | } | 214 | } |
218 | 215 | ||
219 | static int __prep | 216 | static int |
220 | prep_sandalfoot_cpuinfo(struct seq_file *m) | 217 | prep_sandalfoot_cpuinfo(struct seq_file *m) |
221 | { | 218 | { |
222 | unsigned int equip_reg = inb(PREP_IBM_EQUIPMENT); | 219 | unsigned int equip_reg = inb(PREP_IBM_EQUIPMENT); |
@@ -243,7 +240,7 @@ prep_sandalfoot_cpuinfo(struct seq_file *m) | |||
243 | return 0; | 240 | return 0; |
244 | } | 241 | } |
245 | 242 | ||
246 | static int __prep | 243 | static int |
247 | prep_thinkpad_cpuinfo(struct seq_file *m) | 244 | prep_thinkpad_cpuinfo(struct seq_file *m) |
248 | { | 245 | { |
249 | unsigned int equip_reg = inb(PREP_IBM_EQUIPMENT); | 246 | unsigned int equip_reg = inb(PREP_IBM_EQUIPMENT); |
@@ -314,7 +311,7 @@ prep_thinkpad_cpuinfo(struct seq_file *m) | |||
314 | return 0; | 311 | return 0; |
315 | } | 312 | } |
316 | 313 | ||
317 | static int __prep | 314 | static int |
318 | prep_carolina_cpuinfo(struct seq_file *m) | 315 | prep_carolina_cpuinfo(struct seq_file *m) |
319 | { | 316 | { |
320 | unsigned int equip_reg = inb(PREP_IBM_EQUIPMENT); | 317 | unsigned int equip_reg = inb(PREP_IBM_EQUIPMENT); |
@@ -350,7 +347,7 @@ prep_carolina_cpuinfo(struct seq_file *m) | |||
350 | return 0; | 347 | return 0; |
351 | } | 348 | } |
352 | 349 | ||
353 | static int __prep | 350 | static int |
354 | prep_tiger1_cpuinfo(struct seq_file *m) | 351 | prep_tiger1_cpuinfo(struct seq_file *m) |
355 | { | 352 | { |
356 | unsigned int l2_reg = inb(PREP_IBM_L2INFO); | 353 | unsigned int l2_reg = inb(PREP_IBM_L2INFO); |
@@ -393,7 +390,7 @@ prep_tiger1_cpuinfo(struct seq_file *m) | |||
393 | 390 | ||
394 | 391 | ||
395 | /* Used by all Motorola PReP */ | 392 | /* Used by all Motorola PReP */ |
396 | static int __prep | 393 | static int |
397 | prep_mot_cpuinfo(struct seq_file *m) | 394 | prep_mot_cpuinfo(struct seq_file *m) |
398 | { | 395 | { |
399 | unsigned int cachew = *((unsigned char *)CACHECRBA); | 396 | unsigned int cachew = *((unsigned char *)CACHECRBA); |
@@ -454,7 +451,7 @@ no_l2: | |||
454 | return 0; | 451 | return 0; |
455 | } | 452 | } |
456 | 453 | ||
457 | static void __prep | 454 | static void |
458 | prep_restart(char *cmd) | 455 | prep_restart(char *cmd) |
459 | { | 456 | { |
460 | #define PREP_SP92 0x92 /* Special Port 92 */ | 457 | #define PREP_SP92 0x92 /* Special Port 92 */ |
@@ -473,7 +470,7 @@ prep_restart(char *cmd) | |||
473 | #undef PREP_SP92 | 470 | #undef PREP_SP92 |
474 | } | 471 | } |
475 | 472 | ||
476 | static void __prep | 473 | static void |
477 | prep_halt(void) | 474 | prep_halt(void) |
478 | { | 475 | { |
479 | local_irq_disable(); /* no interrupts */ | 476 | local_irq_disable(); /* no interrupts */ |
@@ -488,7 +485,7 @@ prep_halt(void) | |||
488 | /* Carrera is the power manager in the Thinkpads. Unfortunately not much is | 485 | /* Carrera is the power manager in the Thinkpads. Unfortunately not much is |
489 | * known about it, so we can't power down. | 486 | * known about it, so we can't power down. |
490 | */ | 487 | */ |
491 | static void __prep | 488 | static void |
492 | prep_carrera_poweroff(void) | 489 | prep_carrera_poweroff(void) |
493 | { | 490 | { |
494 | prep_halt(); | 491 | prep_halt(); |
@@ -501,7 +498,7 @@ prep_carrera_poweroff(void) | |||
501 | * somewhat in the IBM Carolina Technical Specification. | 498 | * somewhat in the IBM Carolina Technical Specification. |
502 | * -Hollis | 499 | * -Hollis |
503 | */ | 500 | */ |
504 | static void __prep | 501 | static void |
505 | utah_sig87c750_setbit(unsigned int bytenum, unsigned int bitnum, int value) | 502 | utah_sig87c750_setbit(unsigned int bytenum, unsigned int bitnum, int value) |
506 | { | 503 | { |
507 | /* | 504 | /* |
@@ -539,7 +536,7 @@ utah_sig87c750_setbit(unsigned int bytenum, unsigned int bitnum, int value) | |||
539 | udelay(100); /* important: let controller recover */ | 536 | udelay(100); /* important: let controller recover */ |
540 | } | 537 | } |
541 | 538 | ||
542 | static void __prep | 539 | static void |
543 | prep_sig750_poweroff(void) | 540 | prep_sig750_poweroff(void) |
544 | { | 541 | { |
545 | /* tweak the power manager found in most IBM PRePs (except Thinkpads) */ | 542 | /* tweak the power manager found in most IBM PRePs (except Thinkpads) */ |
@@ -554,7 +551,7 @@ prep_sig750_poweroff(void) | |||
554 | /* not reached */ | 551 | /* not reached */ |
555 | } | 552 | } |
556 | 553 | ||
557 | static int __prep | 554 | static int |
558 | prep_show_percpuinfo(struct seq_file *m, int i) | 555 | prep_show_percpuinfo(struct seq_file *m, int i) |
559 | { | 556 | { |
560 | /* PREP's without residual data will give incorrect values here */ | 557 | /* PREP's without residual data will give incorrect values here */ |
@@ -700,12 +697,12 @@ prep_set_bat(void) | |||
700 | /* | 697 | /* |
701 | * IBM 3-digit status LED | 698 | * IBM 3-digit status LED |
702 | */ | 699 | */ |
703 | static unsigned int ibm_statusled_base __prepdata; | 700 | static unsigned int ibm_statusled_base; |
704 | 701 | ||
705 | static void __prep | 702 | static void |
706 | ibm_statusled_progress(char *s, unsigned short hex); | 703 | ibm_statusled_progress(char *s, unsigned short hex); |
707 | 704 | ||
708 | static int __prep | 705 | static int |
709 | ibm_statusled_panic(struct notifier_block *dummy1, unsigned long dummy2, | 706 | ibm_statusled_panic(struct notifier_block *dummy1, unsigned long dummy2, |
710 | void * dummy3) | 707 | void * dummy3) |
711 | { | 708 | { |
@@ -713,13 +710,13 @@ ibm_statusled_panic(struct notifier_block *dummy1, unsigned long dummy2, | |||
713 | return NOTIFY_DONE; | 710 | return NOTIFY_DONE; |
714 | } | 711 | } |
715 | 712 | ||
716 | static struct notifier_block ibm_statusled_block __prepdata = { | 713 | static struct notifier_block ibm_statusled_block = { |
717 | ibm_statusled_panic, | 714 | ibm_statusled_panic, |
718 | NULL, | 715 | NULL, |
719 | INT_MAX /* try to do it first */ | 716 | INT_MAX /* try to do it first */ |
720 | }; | 717 | }; |
721 | 718 | ||
722 | static void __prep | 719 | static void |
723 | ibm_statusled_progress(char *s, unsigned short hex) | 720 | ibm_statusled_progress(char *s, unsigned short hex) |
724 | { | 721 | { |
725 | static int notifier_installed; | 722 | static int notifier_installed; |
@@ -945,19 +942,6 @@ prep_calibrate_decr(void) | |||
945 | todc_calibrate_decr(); | 942 | todc_calibrate_decr(); |
946 | } | 943 | } |
947 | 944 | ||
948 | static unsigned int __prep | ||
949 | prep_irq_canonicalize(u_int irq) | ||
950 | { | ||
951 | if (irq == 2) | ||
952 | { | ||
953 | return 9; | ||
954 | } | ||
955 | else | ||
956 | { | ||
957 | return irq; | ||
958 | } | ||
959 | } | ||
960 | |||
961 | static void __init | 945 | static void __init |
962 | prep_init_IRQ(void) | 946 | prep_init_IRQ(void) |
963 | { | 947 | { |
@@ -970,11 +954,9 @@ prep_init_IRQ(void) | |||
970 | openpic_hookup_cascade(NUM_8259_INTERRUPTS, "82c59 cascade", | 954 | openpic_hookup_cascade(NUM_8259_INTERRUPTS, "82c59 cascade", |
971 | i8259_irq); | 955 | i8259_irq); |
972 | } | 956 | } |
973 | for ( i = 0 ; i < NUM_8259_INTERRUPTS ; i++ ) | ||
974 | irq_desc[i].handler = &i8259_pic; | ||
975 | 957 | ||
976 | if (have_residual_data) { | 958 | if (have_residual_data) { |
977 | i8259_init(residual_isapic_addr()); | 959 | i8259_init(residual_isapic_addr(), 0); |
978 | return; | 960 | return; |
979 | } | 961 | } |
980 | 962 | ||
@@ -985,18 +967,18 @@ prep_init_IRQ(void) | |||
985 | if (((pci_viddid & 0xffff) == PCI_VENDOR_ID_MOTOROLA) | 967 | if (((pci_viddid & 0xffff) == PCI_VENDOR_ID_MOTOROLA) |
986 | && ((pci_did == PCI_DEVICE_ID_MOTOROLA_RAVEN) | 968 | && ((pci_did == PCI_DEVICE_ID_MOTOROLA_RAVEN) |
987 | || (pci_did == PCI_DEVICE_ID_MOTOROLA_HAWK))) | 969 | || (pci_did == PCI_DEVICE_ID_MOTOROLA_HAWK))) |
988 | i8259_init(0); | 970 | i8259_init(0, 0); |
989 | else | 971 | else |
990 | /* PCI interrupt ack address given in section 6.1.8 of the | 972 | /* PCI interrupt ack address given in section 6.1.8 of the |
991 | * PReP specification. */ | 973 | * PReP specification. */ |
992 | i8259_init(MPC10X_MAPA_PCI_INTACK_ADDR); | 974 | i8259_init(MPC10X_MAPA_PCI_INTACK_ADDR, 0); |
993 | } | 975 | } |
994 | 976 | ||
995 | #if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE) | 977 | #if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE) |
996 | /* | 978 | /* |
997 | * IDE stuff. | 979 | * IDE stuff. |
998 | */ | 980 | */ |
999 | static int __prep | 981 | static int |
1000 | prep_ide_default_irq(unsigned long base) | 982 | prep_ide_default_irq(unsigned long base) |
1001 | { | 983 | { |
1002 | switch (base) { | 984 | switch (base) { |
@@ -1010,7 +992,7 @@ prep_ide_default_irq(unsigned long base) | |||
1010 | } | 992 | } |
1011 | } | 993 | } |
1012 | 994 | ||
1013 | static unsigned long __prep | 995 | static unsigned long |
1014 | prep_ide_default_io_base(int index) | 996 | prep_ide_default_io_base(int index) |
1015 | { | 997 | { |
1016 | switch (index) { | 998 | switch (index) { |
@@ -1055,7 +1037,7 @@ smp_prep_setup_cpu(int cpu_nr) | |||
1055 | do_openpic_setup_cpu(); | 1037 | do_openpic_setup_cpu(); |
1056 | } | 1038 | } |
1057 | 1039 | ||
1058 | static struct smp_ops_t prep_smp_ops __prepdata = { | 1040 | static struct smp_ops_t prep_smp_ops = { |
1059 | smp_openpic_message_pass, | 1041 | smp_openpic_message_pass, |
1060 | smp_prep_probe, | 1042 | smp_prep_probe, |
1061 | smp_prep_kick_cpu, | 1043 | smp_prep_kick_cpu, |
@@ -1113,6 +1095,7 @@ prep_init(unsigned long r3, unsigned long r4, unsigned long r5, | |||
1113 | ISA_DMA_THRESHOLD = 0x00ffffff; | 1095 | ISA_DMA_THRESHOLD = 0x00ffffff; |
1114 | DMA_MODE_READ = 0x44; | 1096 | DMA_MODE_READ = 0x44; |
1115 | DMA_MODE_WRITE = 0x48; | 1097 | DMA_MODE_WRITE = 0x48; |
1098 | ppc_do_canonicalize_irqs = 1; | ||
1116 | 1099 | ||
1117 | /* figure out what kind of prep workstation we are */ | 1100 | /* figure out what kind of prep workstation we are */ |
1118 | if (have_residual_data) { | 1101 | if (have_residual_data) { |
@@ -1139,7 +1122,6 @@ prep_init(unsigned long r3, unsigned long r4, unsigned long r5, | |||
1139 | ppc_md.setup_arch = prep_setup_arch; | 1122 | ppc_md.setup_arch = prep_setup_arch; |
1140 | ppc_md.show_percpuinfo = prep_show_percpuinfo; | 1123 | ppc_md.show_percpuinfo = prep_show_percpuinfo; |
1141 | ppc_md.show_cpuinfo = NULL; /* set in prep_setup_arch() */ | 1124 | ppc_md.show_cpuinfo = NULL; /* set in prep_setup_arch() */ |
1142 | ppc_md.irq_canonicalize = prep_irq_canonicalize; | ||
1143 | ppc_md.init_IRQ = prep_init_IRQ; | 1125 | ppc_md.init_IRQ = prep_init_IRQ; |
1144 | /* this gets changed later on if we have an OpenPIC -- Cort */ | 1126 | /* this gets changed later on if we have an OpenPIC -- Cort */ |
1145 | ppc_md.get_irq = i8259_irq; | 1127 | ppc_md.get_irq = i8259_irq; |
@@ -1176,6 +1158,6 @@ prep_init(unsigned long r3, unsigned long r4, unsigned long r5, | |||
1176 | #endif | 1158 | #endif |
1177 | 1159 | ||
1178 | #ifdef CONFIG_SMP | 1160 | #ifdef CONFIG_SMP |
1179 | ppc_md.smp_ops = &prep_smp_ops; | 1161 | smp_ops = &prep_smp_ops; |
1180 | #endif /* CONFIG_SMP */ | 1162 | #endif /* CONFIG_SMP */ |
1181 | } | 1163 | } |
diff --git a/arch/ppc/platforms/radstone_ppc7d.c b/arch/ppc/platforms/radstone_ppc7d.c index 0376c8cff5d1..6f97911c330d 100644 --- a/arch/ppc/platforms/radstone_ppc7d.c +++ b/arch/ppc/platforms/radstone_ppc7d.c | |||
@@ -514,13 +514,9 @@ static void __init ppc7d_init_irq(void) | |||
514 | int irq; | 514 | int irq; |
515 | 515 | ||
516 | pr_debug("%s\n", __FUNCTION__); | 516 | pr_debug("%s\n", __FUNCTION__); |
517 | i8259_init(0); | 517 | i8259_init(0, 0); |
518 | mv64360_init_irq(); | 518 | mv64360_init_irq(); |
519 | 519 | ||
520 | /* IRQ 0..15 are handled by the cascaded 8259's of the Ali1535 */ | ||
521 | for (irq = 0; irq < 16; irq++) { | ||
522 | irq_desc[irq].handler = &i8259_pic; | ||
523 | } | ||
524 | /* IRQs 5,6,9,10,11,14,15 are level sensitive */ | 520 | /* IRQs 5,6,9,10,11,14,15 are level sensitive */ |
525 | irq_desc[5].status |= IRQ_LEVEL; | 521 | irq_desc[5].status |= IRQ_LEVEL; |
526 | irq_desc[6].status |= IRQ_LEVEL; | 522 | irq_desc[6].status |= IRQ_LEVEL; |
@@ -1183,18 +1179,18 @@ static void __init ppc7d_setup_arch(void) | |||
1183 | ROOT_DEV = Root_HDA1; | 1179 | ROOT_DEV = Root_HDA1; |
1184 | #endif | 1180 | #endif |
1185 | 1181 | ||
1186 | if ((cur_cpu_spec[0]->cpu_features & CPU_FTR_SPEC7450) || | 1182 | if ((cur_cpu_spec->cpu_features & CPU_FTR_SPEC7450) || |
1187 | (cur_cpu_spec[0]->cpu_features & CPU_FTR_L3CR)) | 1183 | (cur_cpu_spec->cpu_features & CPU_FTR_L3CR)) |
1188 | /* 745x is different. We only want to pass along enable. */ | 1184 | /* 745x is different. We only want to pass along enable. */ |
1189 | _set_L2CR(L2CR_L2E); | 1185 | _set_L2CR(L2CR_L2E); |
1190 | else if (cur_cpu_spec[0]->cpu_features & CPU_FTR_L2CR) | 1186 | else if (cur_cpu_spec->cpu_features & CPU_FTR_L2CR) |
1191 | /* All modules have 1MB of L2. We also assume that an | 1187 | /* All modules have 1MB of L2. We also assume that an |
1192 | * L2 divisor of 3 will work. | 1188 | * L2 divisor of 3 will work. |
1193 | */ | 1189 | */ |
1194 | _set_L2CR(L2CR_L2E | L2CR_L2SIZ_1MB | L2CR_L2CLK_DIV3 | 1190 | _set_L2CR(L2CR_L2E | L2CR_L2SIZ_1MB | L2CR_L2CLK_DIV3 |
1195 | | L2CR_L2RAM_PIPE | L2CR_L2OH_1_0 | L2CR_L2DF); | 1191 | | L2CR_L2RAM_PIPE | L2CR_L2OH_1_0 | L2CR_L2DF); |
1196 | 1192 | ||
1197 | if (cur_cpu_spec[0]->cpu_features & CPU_FTR_L3CR) | 1193 | if (cur_cpu_spec->cpu_features & CPU_FTR_L3CR) |
1198 | /* No L3 cache */ | 1194 | /* No L3 cache */ |
1199 | _set_L3CR(0); | 1195 | _set_L3CR(0); |
1200 | 1196 | ||
@@ -1424,6 +1420,7 @@ void __init platform_init(unsigned long r3, unsigned long r4, unsigned long r5, | |||
1424 | ppc_md.setup_arch = ppc7d_setup_arch; | 1420 | ppc_md.setup_arch = ppc7d_setup_arch; |
1425 | ppc_md.init = ppc7d_init2; | 1421 | ppc_md.init = ppc7d_init2; |
1426 | ppc_md.show_cpuinfo = ppc7d_show_cpuinfo; | 1422 | ppc_md.show_cpuinfo = ppc7d_show_cpuinfo; |
1423 | /* XXX this is broken... */ | ||
1427 | ppc_md.irq_canonicalize = ppc7d_irq_canonicalize; | 1424 | ppc_md.irq_canonicalize = ppc7d_irq_canonicalize; |
1428 | ppc_md.init_IRQ = ppc7d_init_irq; | 1425 | ppc_md.init_IRQ = ppc7d_init_irq; |
1429 | ppc_md.get_irq = ppc7d_get_irq; | 1426 | ppc_md.get_irq = ppc7d_get_irq; |
diff --git a/arch/ppc/platforms/residual.c b/arch/ppc/platforms/residual.c index 0f84ca603612..c9911601cfdf 100644 --- a/arch/ppc/platforms/residual.c +++ b/arch/ppc/platforms/residual.c | |||
@@ -47,7 +47,7 @@ | |||
47 | #include <asm/ide.h> | 47 | #include <asm/ide.h> |
48 | 48 | ||
49 | 49 | ||
50 | unsigned char __res[sizeof(RESIDUAL)] __prepdata = {0,}; | 50 | unsigned char __res[sizeof(RESIDUAL)] = {0,}; |
51 | RESIDUAL *res = (RESIDUAL *)&__res; | 51 | RESIDUAL *res = (RESIDUAL *)&__res; |
52 | 52 | ||
53 | char * PnP_BASE_TYPES[] __initdata = { | 53 | char * PnP_BASE_TYPES[] __initdata = { |
diff --git a/arch/ppc/platforms/sandpoint.c b/arch/ppc/platforms/sandpoint.c index 5232283c1974..9eeed3572309 100644 --- a/arch/ppc/platforms/sandpoint.c +++ b/arch/ppc/platforms/sandpoint.c | |||
@@ -494,27 +494,10 @@ sandpoint_init_IRQ(void) | |||
494 | i8259_irq); | 494 | i8259_irq); |
495 | 495 | ||
496 | /* | 496 | /* |
497 | * openpic_init() has set up irq_desc[16-31] to be openpic | ||
498 | * interrupts. We need to set irq_desc[0-15] to be i8259 | ||
499 | * interrupts. | ||
500 | */ | ||
501 | for(i=0; i < NUM_8259_INTERRUPTS; i++) | ||
502 | irq_desc[i].handler = &i8259_pic; | ||
503 | |||
504 | /* | ||
505 | * The EPIC allows for a read in the range of 0xFEF00000 -> | 497 | * The EPIC allows for a read in the range of 0xFEF00000 -> |
506 | * 0xFEFFFFFF to generate a PCI interrupt-acknowledge transaction. | 498 | * 0xFEFFFFFF to generate a PCI interrupt-acknowledge transaction. |
507 | */ | 499 | */ |
508 | i8259_init(0xfef00000); | 500 | i8259_init(0xfef00000, 0); |
509 | } | ||
510 | |||
511 | static u32 | ||
512 | sandpoint_irq_canonicalize(u32 irq) | ||
513 | { | ||
514 | if (irq == 2) | ||
515 | return 9; | ||
516 | else | ||
517 | return irq; | ||
518 | } | 501 | } |
519 | 502 | ||
520 | static unsigned long __init | 503 | static unsigned long __init |
@@ -727,10 +710,10 @@ platform_init(unsigned long r3, unsigned long r4, unsigned long r5, | |||
727 | ISA_DMA_THRESHOLD = 0x00ffffff; | 710 | ISA_DMA_THRESHOLD = 0x00ffffff; |
728 | DMA_MODE_READ = 0x44; | 711 | DMA_MODE_READ = 0x44; |
729 | DMA_MODE_WRITE = 0x48; | 712 | DMA_MODE_WRITE = 0x48; |
713 | ppc_do_canonicalize_irqs = 1; | ||
730 | 714 | ||
731 | ppc_md.setup_arch = sandpoint_setup_arch; | 715 | ppc_md.setup_arch = sandpoint_setup_arch; |
732 | ppc_md.show_cpuinfo = sandpoint_show_cpuinfo; | 716 | ppc_md.show_cpuinfo = sandpoint_show_cpuinfo; |
733 | ppc_md.irq_canonicalize = sandpoint_irq_canonicalize; | ||
734 | ppc_md.init_IRQ = sandpoint_init_IRQ; | 717 | ppc_md.init_IRQ = sandpoint_init_IRQ; |
735 | ppc_md.get_irq = openpic_get_irq; | 718 | ppc_md.get_irq = openpic_get_irq; |
736 | 719 | ||