On Wed, Apr 10, 2013 at 11:16:46AM -0500, H Hartley Sweeten wrote: > On Wednesday, March 06, 2013 4:34 PM, H Hartley Sweeten wrote: > > > > Question, when doing an ioremap() of a PCI resource which is more correct? > > > > iobase = pci_resource_start(pcidev, bar); > > len = pci_resource_len(pcidev, bar); > > mmio = ioremap(iobase, len); > > > > or > > > > mmio = pci_ioremap_bar(pcidev, bar); > > > > pci_ioremap_bar() does some extra sanity checking to make sure the bar > > is actually a memory resource and then does an ioremap_nocache(). > > > > If the ioremap() is in order to talk to the registers on the PCI device wouldn't > > the pci_ioremap_bar() be more correct? > > Greg / Ian / Dan, > > Do you have any ideas/opinions on the question above? It's been so long since I used to know this, I have forgotten, sorry. Try asking on the linux-pci mailing list instead. greg k-h _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/devel