Am Mittwoch, 14. Mai 2003 13:14 schrieben Sie: > > ioremap always returns a null pointer. It seems that it needs to > > be used for memory mapped IO only... The documentation with the > > kernel seems to imply that it needs to be always used (for > > portability). > > ioremap is used for mmio along with readb/writeb etc > outb/outw/.. don't need ioremap > > > IO using [in|out][b|w|l] seems to work, ie doesn't crash but does > > not return correct results either. > > The right order is something like > > pci_enable_device(foo); > unsigned long ioaddr = pci_resource_start(foo, n); > > outl(0, ioaddr+N) Maybe I missed the point, but 1. Rubini mentioned it in his book. 2. the saa7134 driver and IIRC bttv does it that way /* get mmio */ if (!request_mem_region(pci_resource_start(pci_dev,0), pci_resource_len(pci_dev,0), dev->name)) { err = -EBUSY; printk(KERN_ERR "%s: can't get MMIO memory @ 0x%lx\n", dev->name,pci_resource_start(pci_dev,0)); goto fail1; } dev->lmmio = ioremap(pci_resource_start(pci_dev,0), 0x1000); Franz