pci_dev start/stop addresses
tmorrison at empirix.com
Tue Mar 6 03:37:13 EST 2007
I am trying to port/debug a driver on a 32bit MPC8548E platform
that is reading the resource start address in the PCI Device
structure (struct pci_dev). I should mention this driver was
original developed on an X86 platform and works flawlessly...
But, when this driver reads the start value in this struct
into a local unsigned long value - it comes up as '0x0' (and
prints out the same via %lx).
Looking closer, it seems that this value is a size - resource_size_t
- that resolves into a u32 value (and I have printed the physical
size sizeof(resource_size_t)) and it seems to be the correct size(4).
I am also looking into the sysfs and it appears that for
this device on the pci bus - it is being 'stored' in this
resource file as a 64bit value?
I am confused as to what is actually in this PCI device
structure and/or what is actually returned. I do know that
the even though the start address is coming back as '0',
the length being calculated is correct (end-start=length)?
It seems to be me, I have some type of mismatch in the
device tree types and/or an endian problem.
Any insight would be appreciated here!
Principal Software Engineer
20 Crosby Drive - Bedford, MA 01730
p: 781.266.3567 f: 781.266.3670
email: tmorrison at empirix.com
More information about the Linuxppc-dev