[PATCH 1/3] powerpc/mpc85xx: remove the unneeded pci init functions for corenet ds board
Benjamin Herrenschmidt
benh at kernel.crashing.org
Fri May 31 20:11:20 EST 2013
On Fri, 2013-05-31 at 14:41 +0800, Kevin Hao wrote:
> Hi Ben,
>
> Could you shed some light on this issue? Do we really has the restriction
> that we have to pick one bus controller as primary even there is no
> ISA bus on the board? I did check the current code and found no code
> has a requirement for this. I also searched the archives and but found
> nothing useful. :-(
You can just pick the first one as primary... The reason we somewhat need
a primary is related to how we handle IO space.
We ioremap the IO space of all busses and assign the base of the primary
one to a global "_IO_BASE". Then any "port" access is an offset from that
which means that non-primary can end up having negative offsets. We fix
up all resources, which works fine ... unless drivers do stupid casts
and the wrap-around fails.
The main reason we did that originally is because we still had a slew of
x86 originated HW that would access hard wired IO ports, especially on things
like CHRP machines, looking for things like 8259 PIC, legacy kbd controllers,
UARTs, etc... at fixed IO port numbers.
We still support some of these boxes (though I do wonder how long since
somebody last booted a Pegasos) so I'm not quite yet keen on getting rid
of that stuff...
Cheers,
Ben.
More information about the Linuxppc-dev
mailing list