ppc: Adapt to asm-powerpc/irq.h irq_canonicalize changes
authorPaul Mackerras <paulus@samba.org>
Tue, 11 Oct 2005 12:03:09 +0000 (22:03 +1000)
committerPaul Mackerras <paulus@samba.org>
Tue, 11 Oct 2005 12:03:09 +0000 (22:03 +1000)
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>
arch/ppc/kernel/setup.c
arch/ppc/platforms/chestnut.c
arch/ppc/platforms/chrp_setup.c
arch/ppc/platforms/gemini_setup.c
arch/ppc/platforms/lopec.c
arch/ppc/platforms/pmac_setup.c
arch/ppc/platforms/pplus.c
arch/ppc/platforms/prep_setup.c
arch/ppc/platforms/radstone_ppc7d.c
arch/ppc/platforms/sandpoint.c
arch/ppc/syslib/m8xx_setup.c

index 62022eacf63ef1f8803ab467047809ec17621293..fae6335193efc66a74f82d7d0e62c47eabbf9c77 100644 (file)
@@ -87,6 +87,11 @@ extern void chrp_init(unsigned long r3, unsigned long r4,
 dev_t boot_dev;
 #endif /* CONFIG_PPC_MULTIPLATFORM */
 
+#ifdef __DO_IRQ_CANON
+int ppc_do_canonicalize_irqs;
+EXPORT_SYMBOL(ppc_do_canonicalize_irqs);
+#endif
+
 #ifdef CONFIG_MAGIC_SYSRQ
 unsigned long SYSRQ_KEY = 0x54;
 #endif /* CONFIG_MAGIC_SYSRQ */
index 7786818bd9d03709253dbdecc76edd1c472073f6..b3d3bdb3936bb1b503992cb86f438f68180a156e 100644 (file)
@@ -542,7 +542,6 @@ platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
 
        ppc_md.setup_arch = chestnut_setup_arch;
        ppc_md.show_cpuinfo = chestnut_show_cpuinfo;
-       ppc_md.irq_canonicalize = NULL;
        ppc_md.init_IRQ = mv64360_init_irq;
        ppc_md.get_irq = mv64360_get_irq;
        ppc_md.init = NULL;
index 47b154c27617b66ea1e6068974b62c0b64a4bfa9..a0cf1b6fdbfe4937138cec8fdce82a8a772be93c 100644 (file)
@@ -337,14 +337,6 @@ chrp_halt(void)
        chrp_power_off();
 }
 
-u_int
-chrp_irq_canonicalize(u_int irq)
-{
-       if (irq == 2)
-               return 9;
-       return irq;
-}
-
 /*
  * Finds the open-pic node and sets OpenPIC_Addr based on its reg property.
  * 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,
        DMA_MODE_READ = 0x44;
        DMA_MODE_WRITE = 0x48;
        isa_io_base = CHRP_ISA_IO_BASE;         /* default value */
+       ppc_do_canonicalize_irqs = 1;
 
        if (root)
                machine = get_property(root, "model", NULL);
@@ -518,7 +511,6 @@ chrp_init(unsigned long r3, unsigned long r4, unsigned long r5,
        ppc_md.show_percpuinfo = of_show_percpuinfo;
        ppc_md.show_cpuinfo   = chrp_show_cpuinfo;
 
-       ppc_md.irq_canonicalize = chrp_irq_canonicalize;
        ppc_md.init_IRQ       = chrp_init_IRQ;
        if (_chrp_type == _CHRP_Pegasos)
                ppc_md.get_irq        = i8259_irq;
index e391e52383c7e1455b7e3da5047522eedcca937b..a8ed5c0a298061f60a91375647accbdcb5f1aa32 100644 (file)
@@ -556,7 +556,6 @@ void __init platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
 
        ppc_md.setup_arch = gemini_setup_arch;
        ppc_md.show_cpuinfo = gemini_show_cpuinfo;
-       ppc_md.irq_canonicalize = NULL;
        ppc_md.init_IRQ = gemini_init_IRQ;
        ppc_md.get_irq = openpic_get_irq;
        ppc_md.init = NULL;
index a5569525e0aff1104ca189057fe9b85115a498fc..800c56a07a97a9fcbb66a515511f882589f1efbd 100644 (file)
@@ -144,15 +144,6 @@ lopec_show_cpuinfo(struct seq_file *m)
        return 0;
 }
 
-static u32
-lopec_irq_canonicalize(u32 irq)
-{
-       if (irq == 2)
-               return 9;
-       else
-               return irq;
-}
-
 static void
 lopec_restart(char *cmd)
 {
@@ -379,10 +370,10 @@ platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
        ISA_DMA_THRESHOLD = 0x00ffffff;
        DMA_MODE_READ = 0x44;
        DMA_MODE_WRITE = 0x48;
+       ppc_do_canonicalize_irqs = 1;
 
        ppc_md.setup_arch = lopec_setup_arch;
        ppc_md.show_cpuinfo = lopec_show_cpuinfo;
-       ppc_md.irq_canonicalize = lopec_irq_canonicalize;
        ppc_md.init_IRQ = lopec_init_IRQ;
        ppc_md.get_irq = openpic_get_irq;
 
index e6a12182bfbb0b2ec41ffcfd0df273d71725031d..8e7b79b110e7976293eb710e55b7276759d8280a 100644 (file)
@@ -662,7 +662,6 @@ pmac_init(unsigned long r3, unsigned long r4, unsigned long r5,
        ppc_md.setup_arch     = pmac_setup_arch;
        ppc_md.show_cpuinfo   = pmac_show_cpuinfo;
        ppc_md.show_percpuinfo = pmac_show_percpuinfo;
-       ppc_md.irq_canonicalize = NULL;
        ppc_md.init_IRQ       = pmac_pic_init;
        ppc_md.get_irq        = pmac_get_irq; /* Changed later on ... */
 
index 65705c9117950d097792f06068a0388f88db8f4a..93e9c7b889f7896c66b6a23da731567f1afb2199 100644 (file)
@@ -647,14 +647,6 @@ static void pplus_power_off(void)
        pplus_halt();
 }
 
-static unsigned int pplus_irq_canonicalize(u_int irq)
-{
-       if (irq == 2)
-               return 9;
-       else
-               return irq;
-}
-
 static void __init pplus_init_IRQ(void)
 {
        int i;
@@ -873,10 +865,10 @@ platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
        ISA_DMA_THRESHOLD = 0x00ffffff;
        DMA_MODE_READ = 0x44;
        DMA_MODE_WRITE = 0x48;
+       ppc_do_canonicalize_irqs = 1;
 
        ppc_md.setup_arch = pplus_setup_arch;
        ppc_md.show_cpuinfo = pplus_show_cpuinfo;
-       ppc_md.irq_canonicalize = pplus_irq_canonicalize;
        ppc_md.init_IRQ = pplus_init_IRQ;
        /* this gets changed later on if we have an OpenPIC -- Cort */
        ppc_md.get_irq = i8259_irq;
index 8bc734fe6682e8c03078562b3b3782c0134fe3ff..490ff175c902c3e8e98cc529dc7b1e97f0d4eda5 100644 (file)
@@ -942,19 +942,6 @@ prep_calibrate_decr(void)
                todc_calibrate_decr();
 }
 
-static unsigned int
-prep_irq_canonicalize(u_int irq)
-{
-       if (irq == 2)
-       {
-               return 9;
-       }
-       else
-       {
-               return irq;
-       }
-}
-
 static void __init
 prep_init_IRQ(void)
 {
@@ -1110,6 +1097,7 @@ prep_init(unsigned long r3, unsigned long r4, unsigned long r5,
        ISA_DMA_THRESHOLD = 0x00ffffff;
        DMA_MODE_READ = 0x44;
        DMA_MODE_WRITE = 0x48;
+       ppc_do_canonicalize_irqs = 1;
 
        /* figure out what kind of prep workstation we are */
        if (have_residual_data) {
@@ -1136,7 +1124,6 @@ prep_init(unsigned long r3, unsigned long r4, unsigned long r5,
        ppc_md.setup_arch     = prep_setup_arch;
        ppc_md.show_percpuinfo = prep_show_percpuinfo;
        ppc_md.show_cpuinfo   = NULL; /* set in prep_setup_arch() */
-       ppc_md.irq_canonicalize = prep_irq_canonicalize;
        ppc_md.init_IRQ       = prep_init_IRQ;
        /* this gets changed later on if we have an OpenPIC -- Cort */
        ppc_md.get_irq        = i8259_irq;
index 06ec30f7e2f42ba18678659287a52c4d3056d426..3cf74aa5fed03166508388a051b07046b3842316 100644 (file)
@@ -1426,6 +1426,7 @@ void __init platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
        ppc_md.setup_arch = ppc7d_setup_arch;
        ppc_md.init = ppc7d_init2;
        ppc_md.show_cpuinfo = ppc7d_show_cpuinfo;
+       /* XXX this is broken... */
        ppc_md.irq_canonicalize = ppc7d_irq_canonicalize;
        ppc_md.init_IRQ = ppc7d_init_irq;
        ppc_md.get_irq = ppc7d_get_irq;
index 21e31346b12ba6856db725af94f7ac648ab00e5f..84c96cb9ac2b6b9689bf5b1a8ce9d154c1f7db15 100644 (file)
@@ -509,15 +509,6 @@ sandpoint_init_IRQ(void)
        i8259_init(0xfef00000);
 }
 
-static u32
-sandpoint_irq_canonicalize(u32 irq)
-{
-       if (irq == 2)
-               return 9;
-       else
-               return irq;
-}
-
 static unsigned long __init
 sandpoint_find_end_of_memory(void)
 {
@@ -728,10 +719,10 @@ platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
        ISA_DMA_THRESHOLD = 0x00ffffff;
        DMA_MODE_READ = 0x44;
        DMA_MODE_WRITE = 0x48;
+       ppc_do_canonicalize_irqs = 1;
 
        ppc_md.setup_arch = sandpoint_setup_arch;
        ppc_md.show_cpuinfo = sandpoint_show_cpuinfo;
-       ppc_md.irq_canonicalize = sandpoint_irq_canonicalize;
        ppc_md.init_IRQ = sandpoint_init_IRQ;
        ppc_md.get_irq = openpic_get_irq;
 
index 4c888da89b3c117c4aa709fc94a36b1165a7e150..c88e2d4dceb7ae193d0c1eb5f28726322471f81d 100644 (file)
@@ -406,7 +406,6 @@ platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
 
        ppc_md.setup_arch               = m8xx_setup_arch;
        ppc_md.show_percpuinfo          = m8xx_show_percpuinfo;
-       ppc_md.irq_canonicalize = NULL;
        ppc_md.init_IRQ                 = m8xx_init_IRQ;
        ppc_md.get_irq                  = m8xx_get_irq;
        ppc_md.init                     = NULL;