[PATCH/RFC] powerpc: Add MPC5200 Interrupt Controller support.

Sylvain Munaut tnt at 246tNt.com
Sun Nov 5 11:27:24 EST 2006


>> +	picnode = find_mpc52xx_picnode();
>> +	sdmanode = find_mpc52xx_sdmanode();
>>     
>
> Any reason why you have those inline 1-line functions and just not put
> the actual of_find_* call in here ?
>   
I think it might be worth creating a
arch/powerpc/sysdev/mpc52xx_common.c (we'll probably need it later on
anyway)
with a helper that would do
 - The find_node
 - get_address / translate /  get_size
 - ioremap

Something like :

intr = mpc52xx_find_and_map("mpc52xx-intr");
sdma = mpc52xx_find_and_map("mpc52xx-sdma");

would be more elegant. Especially since finding and mapping things like
intr/sdma/xlb/cdm ... will be done at several place. That would prevent
repeating all that code for nothing.




Also, in the Makefile, I would make the compilation conditionnal to
CONFIG_PPC_MPC52xx and not CONFIG_PPC_MPC52xx_PIC ...
If you're on a 52xx, you most likely want the interrupt controller ...

But the CONFIG_PPC_MPC52xx option should be in arch/powerpc/Kconfig
and not in the platform/embedded6xx/Kconfig


        Sylvain



More information about the Linuxppc-embedded mailing list