Question: ioremap of PCI resources

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

 



Hello all,

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?

Thanks for any replies,
Hartley
--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux