Messages in this thread | | | Subject | Re: Need help for pci driver on powerpc | From | Alan Cox <> | Date | 23 Mar 2003 18:53:08 +0000 |
| |
On Sun, 2003-03-23 at 17:30, Christian Jaeger wrote: > - What does pci_resource_start return, a phys/virt/bus address?
Normally a pci bus address, but its really a cookie
> - What does ioremap expect?
The same cookie
> - do I need pci_set_master? Which other PCI calls are important?
You need enable_device, and before you touch the others. That should ensure the hardware is in D0 (active) not powersaving or some other inconvenience
Basically the logic goes
Ask the pci layer for pci register values Feed values to ioremap Get a cookie for use with readb/readw/readl etc
The return of ioremap may be a physical mapping, it might be the cpu view of the bus address, or something else.
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |