Documentation/IO-mapping.txt
> I was under the impression that the readb/w/l and writeb/w/l were only for
> spaces marked as I/O space in PCI. I thought that if it was in PCI memory
> space you could directly reference the address after you used ioremap().
No. NO DIRECT REFERENCES OF IOREMAP'd ADDRESSES. It works on some
architectures, but is not portable. ALWAYS use {read,write}[bwl]
> If this is true, you can't just directly access the virtual address, then
> somebody should really add this information to the Documentation/pci.txt
> file.
It's already in Documentation/IO-mapping.txt
> [ snip ]
> > Remember that the base_address[] value are not some that we just make
> > out of nowhere, they are assigned by the hardware/bios at boot time
> > and we read them out of registers.
>
> Actually, my understanding is that the base_address[] is assigned in the PCI
> configuration. The configuration registers are programmed with the PCI
> physical address, and the base_address[] is set to the system physical
> address (which may be different.)
base_address[] is a bus address
> If people really want to get the device drivers all working correctly, you
> should probably start by agreeing on AND DOCUMENTING exactly what 'correct'
> is. Without such information available, people are going to keep on having
> problems writing device drivers.
You can't complain if you aren't reading all the docs ;)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/