aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2005-10-11 08:03:09 -0400
committerPaul Mackerras <paulus@samba.org>2005-10-11 08:03:09 -0400
commit35d81a4bfe28a6ea81c9f67c9ce40543124ded0b (patch)
tree43ed0161b53e0b4c620066c6b1c49d04b13188f5
parentcc5aa206d2c853929ce67d8f5ebb57cd1c7fd413 (diff)
ppc: Adapt to asm-powerpc/irq.h irq_canonicalize changes
Now instead of having a ppc_md function, we just have a variable which says whether to do the i8259 irq canonicalization or not, and set that variable on the platforms that need that. It looks to me that radstone_ppc7d was trying to use irq canonicalization for something else in a broken kind of way - it will need to be fixed properly. Signed-off-by: Paul Mackerras <paulus@samba.org>
-rw-r--r--arch/ppc/kernel/setup.c5
-rw-r--r--arch/ppc/platforms/chestnut.c1
-rw-r--r--arch/ppc/platforms/chrp_setup.c10
-rw-r--r--arch/ppc/platforms/gemini_setup.c1
-rw-r--r--arch/ppc/platforms/lopec.c11
-rw-r--r--arch/ppc/platforms/pmac_setup.c1
-rw-r--r--arch/ppc/platforms/pplus.c10
-rw-r--r--arch/ppc/platforms/prep_setup.c15
-rw-r--r--arch/ppc/platforms/radstone_ppc7d.c1
-rw-r--r--arch/ppc/platforms/sandpoint.c11
-rw-r--r--arch/ppc/syslib/m8xx_setup.c1
11 files changed, 11 insertions, 56 deletions
diff --git a/arch/ppc/kernel/setup.c b/arch/ppc/kernel/setup.c
index 62022eacf63e..fae6335193ef 100644
--- a/arch/ppc/kernel/setup.c
+++ b/arch/ppc/kernel/setup.c
@@ -87,6 +87,11 @@ extern void chrp_init(unsigned long r3, unsigned long r4,
87dev_t boot_dev; 87dev_t boot_dev;
88#endif /* CONFIG_PPC_MULTIPLATFORM */ 88#endif /* CONFIG_PPC_MULTIPLATFORM */
89 89
90#ifdef __DO_IRQ_CANON
91int ppc_do_canonicalize_irqs;
92EXPORT_SYMBOL(ppc_do_canonicalize_irqs);
93#endif
94
90#ifdef CONFIG_MAGIC_SYSRQ 95#ifdef CONFIG_MAGIC_SYSRQ
91unsigned long SYSRQ_KEY = 0x54; 96unsigned long SYSRQ_KEY = 0x54;
92#endif /* CONFIG_MAGIC_SYSRQ */ 97#endif /* CONFIG_MAGIC_SYSRQ */
diff --git a/arch/ppc/platforms/chestnut.c b/arch/ppc/platforms/chestnut.c
index 7786818bd9d0..b3d3bdb3936b 100644
--- a/arch/ppc/platforms/chestnut.c
+++ b/arch/ppc/platforms/chestnut.c
@@ -542,7 +542,6 @@ platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
542 542
543 ppc_md.setup_arch = chestnut_setup_arch; 543 ppc_md.setup_arch = chestnut_setup_arch;
544 ppc_md.show_cpuinfo = chestnut_show_cpuinfo; 544 ppc_md.show_cpuinfo = chestnut_show_cpuinfo;
545 ppc_md.irq_canonicalize = NULL;
546 ppc_md.init_IRQ = mv64360_init_irq; 545 ppc_md.init_IRQ = mv64360_init_irq;
547 ppc_md.get_irq = mv64360_get_irq; 546 ppc_md.get_irq = mv64360_get_irq;
548 ppc_md.init = NULL; 547 ppc_md.init = NULL;
diff --git a/arch/ppc/platforms/chrp_setup.c b/arch/ppc/platforms/chrp_setup.c
index 47b154c27617..a0cf1b6fdbfe 100644
--- a/arch/ppc/platforms/chrp_setup.c
+++ b/arch/ppc/platforms/chrp_setup.c
@@ -337,14 +337,6 @@ chrp_halt(void)
337 chrp_power_off(); 337 chrp_power_off();
338} 338}
339 339
340u_int
341chrp_irq_canonicalize(u_int irq)
342{
343 if (irq == 2)
344 return 9;
345 return irq;
346}
347
348/* 340/*
349 * Finds the open-pic node and sets OpenPIC_Addr based on its reg property. 341 * Finds the open-pic node and sets OpenPIC_Addr based on its reg property.
350 * Then checks if it has an interrupt-ranges property. If it does then 342 * Then checks if it has an interrupt-ranges property. If it does then
@@ -500,6 +492,7 @@ chrp_init(unsigned long r3, unsigned long r4, unsigned long r5,
500 DMA_MODE_READ = 0x44; 492 DMA_MODE_READ = 0x44;
501 DMA_MODE_WRITE = 0x48; 493 DMA_MODE_WRITE = 0x48;
502 isa_io_base = CHRP_ISA_IO_BASE; /* default value */ 494 isa_io_base = CHRP_ISA_IO_BASE; /* default value */
495 ppc_do_canonicalize_irqs = 1;
503 496
504 if (root) 497 if (root)
505 machine = get_property(root, "model", NULL); 498 machine = get_property(root, "model", NULL);
@@ -518,7 +511,6 @@ chrp_init(unsigned long r3, unsigned long r4, unsigned long r5,
518 ppc_md.show_percpuinfo = of_show_percpuinfo; 511 ppc_md.show_percpuinfo = of_show_percpuinfo;
519 ppc_md.show_cpuinfo = chrp_show_cpuinfo; 512 ppc_md.show_cpuinfo = chrp_show_cpuinfo;
520 513
521 ppc_md.irq_canonicalize = chrp_irq_canonicalize;
522 ppc_md.init_IRQ = chrp_init_IRQ; 514 ppc_md.init_IRQ = chrp_init_IRQ;
523 if (_chrp_type == _CHRP_Pegasos) 515 if (_chrp_type == _CHRP_Pegasos)
524 ppc_md.get_irq = i8259_irq; 516 ppc_md.get_irq = i8259_irq;
diff --git a/arch/ppc/platforms/gemini_setup.c b/arch/ppc/platforms/gemini_setup.c
index e391e52383c7..a8ed5c0a2980 100644
--- a/arch/ppc/platforms/gemini_setup.c
+++ b/arch/ppc/platforms/gemini_setup.c
@@ -556,7 +556,6 @@ void __init platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
556 556
557 ppc_md.setup_arch = gemini_setup_arch; 557 ppc_md.setup_arch = gemini_setup_arch;
558 ppc_md.show_cpuinfo = gemini_show_cpuinfo; 558 ppc_md.show_cpuinfo = gemini_show_cpuinfo;
559 ppc_md.irq_canonicalize = NULL;
560 ppc_md.init_IRQ = gemini_init_IRQ; 559 ppc_md.init_IRQ = gemini_init_IRQ;
561 ppc_md.get_irq = openpic_get_irq; 560 ppc_md.get_irq = openpic_get_irq;
562 ppc_md.init = NULL; 561 ppc_md.init = NULL;
diff --git a/arch/ppc/platforms/lopec.c b/arch/ppc/platforms/lopec.c
index a5569525e0af..800c56a07a97 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
147static u32
148lopec_irq_canonicalize(u32 irq)
149{
150 if (irq == 2)
151 return 9;
152 else
153 return irq;
154}
155
156static void 147static void
157lopec_restart(char *cmd) 148lopec_restart(char *cmd)
158{ 149{
@@ -379,10 +370,10 @@ platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
379 ISA_DMA_THRESHOLD = 0x00ffffff; 370 ISA_DMA_THRESHOLD = 0x00ffffff;
380 DMA_MODE_READ = 0x44; 371 DMA_MODE_READ = 0x44;
381 DMA_MODE_WRITE = 0x48; 372 DMA_MODE_WRITE = 0x48;
373 ppc_do_canonicalize_irqs = 1;
382 374
383 ppc_md.setup_arch = lopec_setup_arch; 375 ppc_md.setup_arch = lopec_setup_arch;
384 ppc_md.show_cpuinfo = lopec_show_cpuinfo; 376 ppc_md.show_cpuinfo = lopec_show_cpuinfo;
385 ppc_md.irq_canonicalize = lopec_irq_canonicalize;
386 ppc_md.init_IRQ = lopec_init_IRQ; 377 ppc_md.init_IRQ = lopec_init_IRQ;
387 ppc_md.get_irq = openpic_get_irq; 378 ppc_md.get_irq = openpic_get_irq;
388 379
diff --git a/arch/ppc/platforms/pmac_setup.c b/arch/ppc/platforms/pmac_setup.c
index e6a12182bfbb..8e7b79b110e7 100644
--- a/arch/ppc/platforms/pmac_setup.c
+++ b/arch/ppc/platforms/pmac_setup.c
@@ -662,7 +662,6 @@ pmac_init(unsigned long r3, unsigned long r4, unsigned long r5,
662 ppc_md.setup_arch = pmac_setup_arch; 662 ppc_md.setup_arch = pmac_setup_arch;
663 ppc_md.show_cpuinfo = pmac_show_cpuinfo; 663 ppc_md.show_cpuinfo = pmac_show_cpuinfo;
664 ppc_md.show_percpuinfo = pmac_show_percpuinfo; 664 ppc_md.show_percpuinfo = pmac_show_percpuinfo;
665 ppc_md.irq_canonicalize = NULL;
666 ppc_md.init_IRQ = pmac_pic_init; 665 ppc_md.init_IRQ = pmac_pic_init;
667 ppc_md.get_irq = pmac_get_irq; /* Changed later on ... */ 666 ppc_md.get_irq = pmac_get_irq; /* Changed later on ... */
668 667
diff --git a/arch/ppc/platforms/pplus.c b/arch/ppc/platforms/pplus.c
index 65705c911795..93e9c7b889f7 100644
--- a/arch/ppc/platforms/pplus.c
+++ b/arch/ppc/platforms/pplus.c
@@ -647,14 +647,6 @@ static void pplus_power_off(void)
647 pplus_halt(); 647 pplus_halt();
648} 648}
649 649
650static unsigned int pplus_irq_canonicalize(u_int irq)
651{
652 if (irq == 2)
653 return 9;
654 else
655 return irq;
656}
657
658static void __init pplus_init_IRQ(void) 650static void __init pplus_init_IRQ(void)
659{ 651{
660 int i; 652 int i;
@@ -873,10 +865,10 @@ platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
873 ISA_DMA_THRESHOLD = 0x00ffffff; 865 ISA_DMA_THRESHOLD = 0x00ffffff;
874 DMA_MODE_READ = 0x44; 866 DMA_MODE_READ = 0x44;
875 DMA_MODE_WRITE = 0x48; 867 DMA_MODE_WRITE = 0x48;
868 ppc_do_canonicalize_irqs = 1;
876 869
877 ppc_md.setup_arch = pplus_setup_arch; 870 ppc_md.setup_arch = pplus_setup_arch;
878 ppc_md.show_cpuinfo = pplus_show_cpuinfo; 871 ppc_md.show_cpuinfo = pplus_show_cpuinfo;
879 ppc_md.irq_canonicalize = pplus_irq_canonicalize;
880 ppc_md.init_IRQ = pplus_init_IRQ; 872 ppc_md.init_IRQ = pplus_init_IRQ;
881 /* this gets changed later on if we have an OpenPIC -- Cort */ 873 /* this gets changed later on if we have an OpenPIC -- Cort */
882 ppc_md.get_irq = i8259_irq; 874 ppc_md.get_irq = i8259_irq;
diff --git a/arch/ppc/platforms/prep_setup.c b/arch/ppc/platforms/prep_setup.c
index 8bc734fe6682..490ff175c902 100644
--- a/arch/ppc/platforms/prep_setup.c
+++ b/arch/ppc/platforms/prep_setup.c
@@ -942,19 +942,6 @@ prep_calibrate_decr(void)
942 todc_calibrate_decr(); 942 todc_calibrate_decr();
943} 943}
944 944
945static unsigned int
946prep_irq_canonicalize(u_int irq)
947{
948 if (irq == 2)
949 {
950 return 9;
951 }
952 else
953 {
954 return irq;
955 }
956}
957
958static void __init 945static void __init
959prep_init_IRQ(void) 946prep_init_IRQ(void)
960{ 947{
@@ -1110,6 +1097,7 @@ prep_init(unsigned long r3, unsigned long r4, unsigned long r5,
1110 ISA_DMA_THRESHOLD = 0x00ffffff; 1097 ISA_DMA_THRESHOLD = 0x00ffffff;
1111 DMA_MODE_READ = 0x44; 1098 DMA_MODE_READ = 0x44;
1112 DMA_MODE_WRITE = 0x48; 1099 DMA_MODE_WRITE = 0x48;
1100 ppc_do_canonicalize_irqs = 1;
1113 1101
1114 /* figure out what kind of prep workstation we are */ 1102 /* figure out what kind of prep workstation we are */
1115 if (have_residual_data) { 1103 if (have_residual_data) {
@@ -1136,7 +1124,6 @@ prep_init(unsigned long r3, unsigned long r4, unsigned long r5,
1136 ppc_md.setup_arch = prep_setup_arch; 1124 ppc_md.setup_arch = prep_setup_arch;
1137 ppc_md.show_percpuinfo = prep_show_percpuinfo; 1125 ppc_md.show_percpuinfo = prep_show_percpuinfo;
1138 ppc_md.show_cpuinfo = NULL; /* set in prep_setup_arch() */ 1126 ppc_md.show_cpuinfo = NULL; /* set in prep_setup_arch() */
1139 ppc_md.irq_canonicalize = prep_irq_canonicalize;
1140 ppc_md.init_IRQ = prep_init_IRQ; 1127 ppc_md.init_IRQ = prep_init_IRQ;
1141 /* this gets changed later on if we have an OpenPIC -- Cort */ 1128 /* this gets changed later on if we have an OpenPIC -- Cort */
1142 ppc_md.get_irq = i8259_irq; 1129 ppc_md.get_irq = i8259_irq;
diff --git a/arch/ppc/platforms/radstone_ppc7d.c b/arch/ppc/platforms/radstone_ppc7d.c
index 06ec30f7e2f4..3cf74aa5fed0 100644
--- a/arch/ppc/platforms/radstone_ppc7d.c
+++ b/arch/ppc/platforms/radstone_ppc7d.c
@@ -1426,6 +1426,7 @@ void __init platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
1426 ppc_md.setup_arch = ppc7d_setup_arch; 1426 ppc_md.setup_arch = ppc7d_setup_arch;
1427 ppc_md.init = ppc7d_init2; 1427 ppc_md.init = ppc7d_init2;
1428 ppc_md.show_cpuinfo = ppc7d_show_cpuinfo; 1428 ppc_md.show_cpuinfo = ppc7d_show_cpuinfo;
1429 /* XXX this is broken... */
1429 ppc_md.irq_canonicalize = ppc7d_irq_canonicalize; 1430 ppc_md.irq_canonicalize = ppc7d_irq_canonicalize;
1430 ppc_md.init_IRQ = ppc7d_init_irq; 1431 ppc_md.init_IRQ = ppc7d_init_irq;
1431 ppc_md.get_irq = ppc7d_get_irq; 1432 ppc_md.get_irq = ppc7d_get_irq;
diff --git a/arch/ppc/platforms/sandpoint.c b/arch/ppc/platforms/sandpoint.c
index 21e31346b12b..84c96cb9ac2b 100644
--- a/arch/ppc/platforms/sandpoint.c
+++ b/arch/ppc/platforms/sandpoint.c
@@ -509,15 +509,6 @@ sandpoint_init_IRQ(void)
509 i8259_init(0xfef00000); 509 i8259_init(0xfef00000);
510} 510}
511 511
512static u32
513sandpoint_irq_canonicalize(u32 irq)
514{
515 if (irq == 2)
516 return 9;
517 else
518 return irq;
519}
520
521static unsigned long __init 512static unsigned long __init
522sandpoint_find_end_of_memory(void) 513sandpoint_find_end_of_memory(void)
523{ 514{
@@ -728,10 +719,10 @@ platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
728 ISA_DMA_THRESHOLD = 0x00ffffff; 719 ISA_DMA_THRESHOLD = 0x00ffffff;
729 DMA_MODE_READ = 0x44; 720 DMA_MODE_READ = 0x44;
730 DMA_MODE_WRITE = 0x48; 721 DMA_MODE_WRITE = 0x48;
722 ppc_do_canonicalize_irqs = 1;
731 723
732 ppc_md.setup_arch = sandpoint_setup_arch; 724 ppc_md.setup_arch = sandpoint_setup_arch;
733 ppc_md.show_cpuinfo = sandpoint_show_cpuinfo; 725 ppc_md.show_cpuinfo = sandpoint_show_cpuinfo;
734 ppc_md.irq_canonicalize = sandpoint_irq_canonicalize;
735 ppc_md.init_IRQ = sandpoint_init_IRQ; 726 ppc_md.init_IRQ = sandpoint_init_IRQ;
736 ppc_md.get_irq = openpic_get_irq; 727 ppc_md.get_irq = openpic_get_irq;
737 728
diff --git a/arch/ppc/syslib/m8xx_setup.c b/arch/ppc/syslib/m8xx_setup.c
index 4c888da89b3c..c88e2d4dceb7 100644
--- a/arch/ppc/syslib/m8xx_setup.c
+++ b/arch/ppc/syslib/m8xx_setup.c
@@ -406,7 +406,6 @@ platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
406 406
407 ppc_md.setup_arch = m8xx_setup_arch; 407 ppc_md.setup_arch = m8xx_setup_arch;
408 ppc_md.show_percpuinfo = m8xx_show_percpuinfo; 408 ppc_md.show_percpuinfo = m8xx_show_percpuinfo;
409 ppc_md.irq_canonicalize = NULL;
410 ppc_md.init_IRQ = m8xx_init_IRQ; 409 ppc_md.init_IRQ = m8xx_init_IRQ;
411 ppc_md.get_irq = m8xx_get_irq; 410 ppc_md.get_irq = m8xx_get_irq;
412 ppc_md.init = NULL; 411 ppc_md.init = NULL;