On Tue, 2002-11-05 at 10:25, Dave Samuel wrote:
> I'm trying to find the pci address of a pci extension board in my hitachi
> solution engine, so that I can mmap the address and write to the board.
>=20
> How can I find the pci address this extension card has received ?
>=20
The mapped BARs happen at init time, and depending on your board, you
may even need BAR fixups.
If you're attempting to write a driver for this board, I'm quite at a
loss as to why you would want to expose an mmap() interface for the BAR
so you can remap through userspace.
If you want to ioremap() the mem BAR, you can certainly do so. Take a
look at /proc/pci or grab pciutils and take a look at 'lspci -vvv' to
determine where the mem BAR you want to remap is situated.
Linux exposes PCI access routines to do this in the form of
pci_resource_start(pdev, BAR_nr) and pci_resource_len(pdev, BAR_nr),
which you can pass to ioremap()/ioremap_nocache() directly to get a
corresponding cached/uncached virtual address.
Regards,
--=20
Paul Mundt
pau...@ti...
TimeSys Corporation
|