Subject: MPC8641D PEX: programming OWBAR in Endpoint mode?

From: [email-masked]
Date: Wed, 22 Sep 2010 10:55:38 -0500

I am trying to get the PCIe interfaces of a Freescale MPC8641D working in
endpoint mode (i.e. as a PCI device rather than a PCI root complex host).

I can get the device to show up on the host's PCI bus, I can program the
inbound ATMUs such that the BARS are updated when the host (re-)scans
them, but I cannot for the life of me get the PPC's Outbound ATMUS to
work.

When I attempt to program them, I can program ALL the registers EXCEPT the
OWBAR - which steadfastly remains 0 no matter what I write to it.

As a result, when I attempt to bus master out from the PPC to the PCIe
address spaces via the outbound ATMUs, I get a bus fault on the PPC as
there is no device at the address I am accessing.

I've double-checked the LAWs to make sure the PEX is mapped into local
space, I've put the OWBAR in that address space, I've tried different
outbound ATMUs, and NOTHING works. Not ATMU0, not ATMU1, etc.

I've been trying to work with our Freescale rep, but I am getting nowhere
on that front.

Does anybody have any suggestions on what I might be doing wrong? I mean,
it looks like it should be a simple out_be32(addr_of_OWBAR,value), just
like all the other accesses to the ATMU registers that seem to be working
(as in, I read back what I wrote).