Subject: Re: mv64x60 updates

From: Linwoes <[email-masked]>
Date: Mon, 7 Mar 2005 08:23:25 -0500

>
> About arch/ppc/syslibs/ mv64x60 code. Well, it's a bit evil as it has
> hardcoded IRQ, hardcoded register base, it changes
> chipset configuration... whereas all of these is already done by the
> Pegasos II OpenFirmWare.
>
All of the hardcoded IRQs are not really hardcoded. They are easily 
overridable in you platform file using a fixup routine as seen in katana.c 
flags can be added also. 

As far as the register base being hardcoded, I don't see it. The config 
options:
CONFIG_MV64X60_BASE=0xf1000000
CONFIG_MV64X60_NEW_BASE=0xf1000000
will allow you register base to be anywhere you would like it.

If you don't need to reinitialize the chip, then don't call mv64x60_init(). 
The only part of mv64x60_init() I see that is not chip related is the 
pci_alloc_hoses(). I guess you could make a new function for that part and 
maybe others you need so the code does not get duplicated in your platform 
files.
Again, mv64x60_early_init() does very little non-chipset stuff and you could 
probably just place the:
        mv64x60_bridge_pbase = bh->p_base;
        mv64x60_bridge_vbase = bh->v_base;
initializers into your platform files.

Thanks
Brian