[PATCH 3/6] powerpc/85xx: separate MPIC handling code

Scott Wood scottwood at freescale.com
Fri Nov 18 08:33:07 EST 2011


On Thu, Nov 17, 2011 at 09:56:18PM +0400, Dmitry Eremin-Solenikov wrote:
> All mpc85xx boards deal with MPIC initialization in more or less the
> same way. The only difrerences are some flags (WANTS_RESET,
> BROKEN_FRR_NIRQS, SINGLE_DEST_CPU), and some bugs like leaking device
> node counter, etc. To minimize problems, switch all boards to use one
> single instance of code.

SINGLE_DEST_CPU should apply to all 85xx (the boards that omit it are
probably non-SMP where it doesn't matter), and probably BROKEN_FRR_NIRQS
as well (shouldn't hurt, at least).

> +	mpc85xx_init_mpic(0, 1, 1);

This is awkward to read, named flags are better -- and already exist for
this. :-)

Something like this should be clearer and still allow any override the
board wishes (such as for 85xx CAMP):

#define MPC85XX_MPIC_FLAGS (...)

most_boards:

mpc85xx_init_mpic(MPC85XX_MPIC_FLAGS)

85xx CAMP:

mpc85xx_init_mpic(MPC85XX_MPIC_FLAGS & ~MPIC_WANTS_RESET);

-Scott



More information about the Linuxppc-dev mailing list