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

Commit e55d7f73 authored by Kyle Moffett's avatar Kyle Moffett Committed by Benjamin Herrenschmidt
Browse files

powerpc/mpic: Remove duplicate MPIC_WANTS_RESET flag



There are two separate flags controlling whether or not the MPIC is
reset during initialization, which is completely unnecessary, and only
one of them can be specified in the device tree.

Also, most platforms in-tree right now do actually want to reset the
MPIC during initialization anyways, which means lots of duplicate code
passing the MPIC_WANTS_RESET flag.

Fix all of the callers which currently do not pass the MPIC_WANTS_RESET
flag to pass the MPIC_NO_RESET flag, then remove the MPIC_WANTS_RESET
flag and make the code reset the MPIC by default.

Signed-off-by: default avatarKyle Moffett <Kyle.D.Moffett@boeing.com>
Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
parent c1b8d45d
Loading
Loading
Loading
Loading
+1 −5
Original line number Diff line number Diff line
@@ -348,8 +348,6 @@ struct mpic
#define MPIC_U3_HT_IRQS			0x00000004
/* Broken IPI registers (autodetected) */
#define MPIC_BROKEN_IPI			0x00000008
/* MPIC wants a reset */
#define MPIC_WANTS_RESET		0x00000010
/* Spurious vector requires EOI */
#define MPIC_SPV_EOI			0x00000020
/* No passthrough disable */
@@ -366,9 +364,7 @@ struct mpic
#define MPIC_SINGLE_DEST_CPU		0x00001000
/* Enable CoreInt delivery of interrupts */
#define MPIC_ENABLE_COREINT		0x00002000
/* Disable resetting of the MPIC.
 * NOTE: This flag trumps MPIC_WANTS_RESET.
 */
/* Do not reset the MPIC during initialization */
#define MPIC_NO_RESET			0x00004000
/* Freescale MPIC (compatible includes "fsl,mpic") */
#define MPIC_FSL			0x00008000
+1 −1
Original line number Diff line number Diff line
@@ -83,7 +83,7 @@ static void __init ppc47x_init_irq(void)
		 * device-tree, just pass 0 to all arguments
		 */
		struct mpic *mpic =
			mpic_alloc(np, 0, 0, 0, 0, " MPIC     ");
			mpic_alloc(np, 0, MPIC_NO_RESET, 0, 0, " MPIC     ");
		BUG_ON(mpic == NULL);
		mpic_init(mpic);
		ppc_md.get_irq = mpic_get_irq;
+1 −2
Original line number Diff line number Diff line
@@ -71,8 +71,7 @@ static void __init iss4xx_init_irq(void)
		/* The MPIC driver will get everything it needs from the
		 * device-tree, just pass 0 to all arguments
		 */
		struct mpic *mpic = mpic_alloc(np, 0, 0, 0, 0,
					       " MPIC     ");
		struct mpic *mpic = mpic_alloc(np, 0, MPIC_NO_RESET, 0, 0, " MPIC     ");
		BUG_ON(mpic == NULL);
		mpic_init(mpic);
		ppc_md.get_irq = mpic_get_irq;
+2 −1
Original line number Diff line number Diff line
@@ -36,7 +36,8 @@
void __init corenet_ds_pic_init(void)
{
	struct mpic *mpic;
	unsigned int flags = MPIC_BIG_ENDIAN | MPIC_SINGLE_DEST_CPU;
	unsigned int flags = MPIC_BIG_ENDIAN | MPIC_SINGLE_DEST_CPU |
		MPIC_NO_RESET;

	if (ppc_md.get_irq == mpic_get_coreint_irq)
		flags |= MPIC_ENABLE_COREINT;
+1 −2
Original line number Diff line number Diff line
@@ -57,8 +57,7 @@ static void machine_restart(char *cmd)

static void __init ksi8560_pic_init(void)
{
	struct mpic *mpic = mpic_alloc(NULL, 0,
			MPIC_WANTS_RESET | MPIC_BIG_ENDIAN,
	struct mpic *mpic = mpic_alloc(NULL, 0, MPIC_BIG_ENDIAN,
			0, 256, " OpenPIC  ");
	BUG_ON(mpic == NULL);
	mpic_init(mpic);
Loading