Commit 35d81a4b authored by Paul Mackerras's avatar Paul Mackerras

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: default avatarPaul Mackerras <paulus@samba.org>
parent cc5aa206
...@@ -87,6 +87,11 @@ extern void chrp_init(unsigned long r3, unsigned long r4, ...@@ -87,6 +87,11 @@ extern void chrp_init(unsigned long r3, unsigned long r4,
dev_t boot_dev; dev_t boot_dev;
#endif /* CONFIG_PPC_MULTIPLATFORM */ #endif /* CONFIG_PPC_MULTIPLATFORM */
#ifdef __DO_IRQ_CANON
int ppc_do_canonicalize_irqs;
EXPORT_SYMBOL(ppc_do_canonicalize_irqs);
#endif
#ifdef CONFIG_MAGIC_SYSRQ #ifdef CONFIG_MAGIC_SYSRQ
unsigned long SYSRQ_KEY = 0x54; unsigned long SYSRQ_KEY = 0x54;
#endif /* CONFIG_MAGIC_SYSRQ */ #endif /* CONFIG_MAGIC_SYSRQ */
......
...@@ -542,7 +542,6 @@ platform_init(unsigned long r3, unsigned long r4, unsigned long r5, ...@@ -542,7 +542,6 @@ platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
ppc_md.setup_arch = chestnut_setup_arch; ppc_md.setup_arch = chestnut_setup_arch;
ppc_md.show_cpuinfo = chestnut_show_cpuinfo; ppc_md.show_cpuinfo = chestnut_show_cpuinfo;
ppc_md.irq_canonicalize = NULL;
ppc_md.init_IRQ = mv64360_init_irq; ppc_md.init_IRQ = mv64360_init_irq;
ppc_md.get_irq = mv64360_get_irq; ppc_md.get_irq = mv64360_get_irq;
ppc_md.init = NULL; ppc_md.init = NULL;
......
...@@ -337,14 +337,6 @@ chrp_halt(void) ...@@ -337,14 +337,6 @@ chrp_halt(void)
chrp_power_off(); 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. * 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 * 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,6 +492,7 @@ chrp_init(unsigned long r3, unsigned long r4, unsigned long r5,
DMA_MODE_READ = 0x44; DMA_MODE_READ = 0x44;
DMA_MODE_WRITE = 0x48; DMA_MODE_WRITE = 0x48;
isa_io_base = CHRP_ISA_IO_BASE; /* default value */ isa_io_base = CHRP_ISA_IO_BASE; /* default value */
ppc_do_canonicalize_irqs = 1;
if (root) if (root)
machine = get_property(root, "model", NULL); machine = get_property(root, "model", NULL);
...@@ -518,7 +511,6 @@ chrp_init(unsigned long r3, unsigned long r4, unsigned long r5, ...@@ -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_percpuinfo = of_show_percpuinfo;
ppc_md.show_cpuinfo = chrp_show_cpuinfo; ppc_md.show_cpuinfo = chrp_show_cpuinfo;
ppc_md.irq_canonicalize = chrp_irq_canonicalize;
ppc_md.init_IRQ = chrp_init_IRQ; ppc_md.init_IRQ = chrp_init_IRQ;
if (_chrp_type == _CHRP_Pegasos) if (_chrp_type == _CHRP_Pegasos)
ppc_md.get_irq = i8259_irq; ppc_md.get_irq = i8259_irq;
......
...@@ -556,7 +556,6 @@ void __init platform_init(unsigned long r3, unsigned long r4, unsigned long r5, ...@@ -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.setup_arch = gemini_setup_arch;
ppc_md.show_cpuinfo = gemini_show_cpuinfo; ppc_md.show_cpuinfo = gemini_show_cpuinfo;
ppc_md.irq_canonicalize = NULL;
ppc_md.init_IRQ = gemini_init_IRQ; ppc_md.init_IRQ = gemini_init_IRQ;
ppc_md.get_irq = openpic_get_irq; ppc_md.get_irq = openpic_get_irq;
ppc_md.init = NULL; ppc_md.init = NULL;
......
...@@ -144,15 +144,6 @@ lopec_show_cpuinfo(struct seq_file *m) ...@@ -144,15 +144,6 @@ lopec_show_cpuinfo(struct seq_file *m)
return 0; return 0;
} }
static u32
lopec_irq_canonicalize(u32 irq)
{
if (irq == 2)
return 9;
else
return irq;
}
static void static void
lopec_restart(char *cmd) lopec_restart(char *cmd)
{ {
...@@ -379,10 +370,10 @@ platform_init(unsigned long r3, unsigned long r4, unsigned long r5, ...@@ -379,10 +370,10 @@ platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
ISA_DMA_THRESHOLD = 0x00ffffff; ISA_DMA_THRESHOLD = 0x00ffffff;
DMA_MODE_READ = 0x44; DMA_MODE_READ = 0x44;
DMA_MODE_WRITE = 0x48; DMA_MODE_WRITE = 0x48;
ppc_do_canonicalize_irqs = 1;
ppc_md.setup_arch = lopec_setup_arch; ppc_md.setup_arch = lopec_setup_arch;
ppc_md.show_cpuinfo = lopec_show_cpuinfo; ppc_md.show_cpuinfo = lopec_show_cpuinfo;
ppc_md.irq_canonicalize = lopec_irq_canonicalize;
ppc_md.init_IRQ = lopec_init_IRQ; ppc_md.init_IRQ = lopec_init_IRQ;
ppc_md.get_irq = openpic_get_irq; ppc_md.get_irq = openpic_get_irq;
......
...@@ -662,7 +662,6 @@ pmac_init(unsigned long r3, unsigned long r4, unsigned long r5, ...@@ -662,7 +662,6 @@ pmac_init(unsigned long r3, unsigned long r4, unsigned long r5,
ppc_md.setup_arch = pmac_setup_arch; ppc_md.setup_arch = pmac_setup_arch;
ppc_md.show_cpuinfo = pmac_show_cpuinfo; ppc_md.show_cpuinfo = pmac_show_cpuinfo;
ppc_md.show_percpuinfo = pmac_show_percpuinfo; ppc_md.show_percpuinfo = pmac_show_percpuinfo;
ppc_md.irq_canonicalize = NULL;
ppc_md.init_IRQ = pmac_pic_init; ppc_md.init_IRQ = pmac_pic_init;
ppc_md.get_irq = pmac_get_irq; /* Changed later on ... */ ppc_md.get_irq = pmac_get_irq; /* Changed later on ... */
......
...@@ -647,14 +647,6 @@ static void pplus_power_off(void) ...@@ -647,14 +647,6 @@ static void pplus_power_off(void)
pplus_halt(); 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) static void __init pplus_init_IRQ(void)
{ {
int i; int i;
...@@ -873,10 +865,10 @@ platform_init(unsigned long r3, unsigned long r4, unsigned long r5, ...@@ -873,10 +865,10 @@ platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
ISA_DMA_THRESHOLD = 0x00ffffff; ISA_DMA_THRESHOLD = 0x00ffffff;
DMA_MODE_READ = 0x44; DMA_MODE_READ = 0x44;
DMA_MODE_WRITE = 0x48; DMA_MODE_WRITE = 0x48;
ppc_do_canonicalize_irqs = 1;
ppc_md.setup_arch = pplus_setup_arch; ppc_md.setup_arch = pplus_setup_arch;
ppc_md.show_cpuinfo = pplus_show_cpuinfo; ppc_md.show_cpuinfo = pplus_show_cpuinfo;
ppc_md.irq_canonicalize = pplus_irq_canonicalize;
ppc_md.init_IRQ = pplus_init_IRQ; ppc_md.init_IRQ = pplus_init_IRQ;
/* this gets changed later on if we have an OpenPIC -- Cort */ /* this gets changed later on if we have an OpenPIC -- Cort */
ppc_md.get_irq = i8259_irq; ppc_md.get_irq = i8259_irq;
......
...@@ -942,19 +942,6 @@ prep_calibrate_decr(void) ...@@ -942,19 +942,6 @@ prep_calibrate_decr(void)
todc_calibrate_decr(); todc_calibrate_decr();
} }
static unsigned int
prep_irq_canonicalize(u_int irq)
{
if (irq == 2)
{
return 9;
}
else
{
return irq;
}
}
static void __init static void __init
prep_init_IRQ(void) prep_init_IRQ(void)
{ {
...@@ -1110,6 +1097,7 @@ prep_init(unsigned long r3, unsigned long r4, unsigned long r5, ...@@ -1110,6 +1097,7 @@ prep_init(unsigned long r3, unsigned long r4, unsigned long r5,
ISA_DMA_THRESHOLD = 0x00ffffff; ISA_DMA_THRESHOLD = 0x00ffffff;
DMA_MODE_READ = 0x44; DMA_MODE_READ = 0x44;
DMA_MODE_WRITE = 0x48; DMA_MODE_WRITE = 0x48;
ppc_do_canonicalize_irqs = 1;
/* figure out what kind of prep workstation we are */ /* figure out what kind of prep workstation we are */
if (have_residual_data) { if (have_residual_data) {
...@@ -1136,7 +1124,6 @@ prep_init(unsigned long r3, unsigned long r4, unsigned long r5, ...@@ -1136,7 +1124,6 @@ prep_init(unsigned long r3, unsigned long r4, unsigned long r5,
ppc_md.setup_arch = prep_setup_arch; ppc_md.setup_arch = prep_setup_arch;
ppc_md.show_percpuinfo = prep_show_percpuinfo; ppc_md.show_percpuinfo = prep_show_percpuinfo;
ppc_md.show_cpuinfo = NULL; /* set in prep_setup_arch() */ ppc_md.show_cpuinfo = NULL; /* set in prep_setup_arch() */
ppc_md.irq_canonicalize = prep_irq_canonicalize;
ppc_md.init_IRQ = prep_init_IRQ; ppc_md.init_IRQ = prep_init_IRQ;
/* this gets changed later on if we have an OpenPIC -- Cort */ /* this gets changed later on if we have an OpenPIC -- Cort */
ppc_md.get_irq = i8259_irq; ppc_md.get_irq = i8259_irq;
......
...@@ -1426,6 +1426,7 @@ void __init platform_init(unsigned long r3, unsigned long r4, unsigned long r5, ...@@ -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.setup_arch = ppc7d_setup_arch;
ppc_md.init = ppc7d_init2; ppc_md.init = ppc7d_init2;
ppc_md.show_cpuinfo = ppc7d_show_cpuinfo; ppc_md.show_cpuinfo = ppc7d_show_cpuinfo;
/* XXX this is broken... */
ppc_md.irq_canonicalize = ppc7d_irq_canonicalize; ppc_md.irq_canonicalize = ppc7d_irq_canonicalize;
ppc_md.init_IRQ = ppc7d_init_irq; ppc_md.init_IRQ = ppc7d_init_irq;
ppc_md.get_irq = ppc7d_get_irq; ppc_md.get_irq = ppc7d_get_irq;
......
...@@ -509,15 +509,6 @@ sandpoint_init_IRQ(void) ...@@ -509,15 +509,6 @@ sandpoint_init_IRQ(void)
i8259_init(0xfef00000); i8259_init(0xfef00000);
} }
static u32
sandpoint_irq_canonicalize(u32 irq)
{
if (irq == 2)
return 9;
else
return irq;
}
static unsigned long __init static unsigned long __init
sandpoint_find_end_of_memory(void) sandpoint_find_end_of_memory(void)
{ {
...@@ -728,10 +719,10 @@ platform_init(unsigned long r3, unsigned long r4, unsigned long r5, ...@@ -728,10 +719,10 @@ platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
ISA_DMA_THRESHOLD = 0x00ffffff; ISA_DMA_THRESHOLD = 0x00ffffff;
DMA_MODE_READ = 0x44; DMA_MODE_READ = 0x44;
DMA_MODE_WRITE = 0x48; DMA_MODE_WRITE = 0x48;
ppc_do_canonicalize_irqs = 1;
ppc_md.setup_arch = sandpoint_setup_arch; ppc_md.setup_arch = sandpoint_setup_arch;
ppc_md.show_cpuinfo = sandpoint_show_cpuinfo; ppc_md.show_cpuinfo = sandpoint_show_cpuinfo;
ppc_md.irq_canonicalize = sandpoint_irq_canonicalize;
ppc_md.init_IRQ = sandpoint_init_IRQ; ppc_md.init_IRQ = sandpoint_init_IRQ;
ppc_md.get_irq = openpic_get_irq; ppc_md.get_irq = openpic_get_irq;
......
...@@ -406,7 +406,6 @@ platform_init(unsigned long r3, unsigned long r4, unsigned long r5, ...@@ -406,7 +406,6 @@ platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
ppc_md.setup_arch = m8xx_setup_arch; ppc_md.setup_arch = m8xx_setup_arch;
ppc_md.show_percpuinfo = m8xx_show_percpuinfo; ppc_md.show_percpuinfo = m8xx_show_percpuinfo;
ppc_md.irq_canonicalize = NULL;
ppc_md.init_IRQ = m8xx_init_IRQ; ppc_md.init_IRQ = m8xx_init_IRQ;
ppc_md.get_irq = m8xx_get_irq; ppc_md.get_irq = m8xx_get_irq;
ppc_md.init = NULL; ppc_md.init = NULL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment