RE: ioremap of PCI resources

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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?

Thanks,
Hartley

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux