[PATCH 2/2] Export Physical IO base address
Benjamin Herrenschmidt
benh at kernel.crashing.org
Tue Nov 1 10:27:23 EST 2005
On Mon, 2005-10-31 at 15:45 -0600, Jake Moilanen wrote:
> On Sat, 29 Oct 2005 08:54:47 +1000
> Benjamin Herrenschmidt <benh at kernel.crashing.org> wrote:
>
> > On Fri, 2005-10-28 at 15:08 -0500, Jake Moilanen wrote:
> > > This patch exports the physical IO base address so drivers can pick it
> > > up when using addresses from the device-tree.
> >
> > Why ? What is your driver exactly trying to do ?
>
> TPM needs to get the base address for IO as an offset into IO space.
>
> This base physical address is stored in the reg property in the
> device-node.
>
> To calculate the offset, need to do: TPM_base_phy_addr - io_base_phys.
>
> Thus the need to export this address.
Hrm... that is sooo bogus. If the device-tree exposes a full physical
address in "reg", then just use that with ioremap (ignore the fact that
it's actually IO space). Additionally, tell the firmware folks to fix
their device-tree, this is all very bogus to me. The TPM device is on
the LPC bus right ? Thus it should appear below the LPC/ISA bridge and
thus get proper address space. It's totally broken to put it anywhere
else
Ben.
More information about the Linuxppc64-dev
mailing list