Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -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 */
+0 −1
Original line number Diff line number Diff line
@@ -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;
+1 −9
Original line number Diff line number Diff line
@@ -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;
+0 −1
Original line number Diff line number Diff line
@@ -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;
+1 −10
Original line number Diff line number Diff line
@@ -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;

Loading