Messages in this thread | | | From | Patrick Lerda <> | Subject | RE: Specifying properly the PCI driver model on all linux archite ctur es, (ioremap(), bus_to_virt() ...) | Date | Tue, 2 Nov 1999 17:00:45 +0100 |
| |
In my opinion the best way to implement ioremap() is with a physical memory pointer as argument, not a PCI bus memory pointer. But no specification exists, and the different answers are not clear. This question is fundamental on architectures like PREP PowerPC where all memory spaces are different and need a translation.
The specification of base_address[] is missing too, and need to be defined. I think using the physical address for base_address is the best way.
Physical memory is the only memory space with a different segment for all space available: SDRAM memory, PCI memory, PCI IO memory... With this definition ioremap don't change on x86 platform and can be used to get a virtual memory pointer an a PCI IO space. I think this is the right way.
Functions like readl() or writel() can't in my opinion be compatible with ioremap(). ioremap() returns a virtual memory pointer, and if an indirect access must be used to access PCI memory, an other programming model must be used... The file IO-mapping.txt is obsolete...
I agree with you Bret, we must clarify and write this documentation.
Patrick LERDA
- 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/
| |