Subject: Re: understanding an IO question

From: Florian Boelstler <[email-masked]>
Date: Wed, 21 Feb 2007 15:54:08 +0100

Charles Krinke schrieb:
> I apologize for not making myself clearer. This is a kernel driver
> issue, not a user space issue. The issue is addressing the registers in
> a PCI device in its driver.
> 
> We have a functioning code base that works with Linux 2.6.17.11 on our
> 8241 platform. We have built a new board using the 8541. Although the
> registers are addressable from uboot and can be read/written, once Linux
> boots, the registers cannot be addressed.
> 
> I suspect this to be in either TLB1 setup or Outbound Address
> Translation windows.
> 
> So,... my questions really are 
> 2. "Are Outbound Address Translation windows reset by the arch/ppc/...
> Linux initialization and if so, where. If they are reset, where is the
> best place to put them back to the state I had set them up in uboot.

Well may be Kumar is the one to answer that at best.
However I am working on a solution, which uses MPC8540/MPC8541 and I 
know for sure that POWBARs and friends aren't reset during Linux boot 
*when PCI is completely disabled* in kernel config.

You may check if the appropriate set of POTAR, POWBAR and POWAR 
registers are still configured after boot.
POTAR reflects your external device address, POWBAR your local one (e.g. 
0x84000000, but only the 20 most-significant bits).
POWAR must be set to something like 0x80044013 (for a 1MB window).
Also a set of LAWBAR/LAWAR must appropriately match these settings.

See "Reference Manual" for details.

Good luck,

   Florian