mirror of
https://github.com/ipxe/ipxe
synced 2025-12-17 10:01:03 +03:00
[pci] Update drivers to use pci_ioremap()
Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
@@ -175,7 +175,7 @@ static void * hvm_ioremap ( struct hvm_device *hvm, unsigned int space,
|
||||
}
|
||||
|
||||
/* Map this space */
|
||||
mmio = ioremap ( ( hvm->mmio + hvm->mmio_offset ), len );
|
||||
mmio = pci_ioremap ( hvm->pci, ( hvm->mmio + hvm->mmio_offset ), len );
|
||||
if ( ! mmio ) {
|
||||
DBGC ( hvm, "HVM could not map MMIO space [%08lx,%08lx)\n",
|
||||
( hvm->mmio + hvm->mmio_offset ),
|
||||
@@ -371,7 +371,8 @@ static int hvm_map_xenstore ( struct hvm_device *hvm ) {
|
||||
xenstore_phys = ( xenstore_pfn * PAGE_SIZE );
|
||||
|
||||
/* Map XenStore */
|
||||
hvm->xen.store.intf = ioremap ( xenstore_phys, PAGE_SIZE );
|
||||
hvm->xen.store.intf = pci_ioremap ( hvm->pci, xenstore_phys,
|
||||
PAGE_SIZE );
|
||||
if ( ! hvm->xen.store.intf ) {
|
||||
DBGC ( hvm, "HVM could not map XenStore at [%08lx,%08lx)\n",
|
||||
xenstore_phys, ( xenstore_phys + PAGE_SIZE ) );
|
||||
@@ -420,6 +421,7 @@ static int hvm_probe ( struct pci_device *pci ) {
|
||||
rc = -ENOMEM;
|
||||
goto err_alloc;
|
||||
}
|
||||
hvm->pci = pci;
|
||||
hvm->mmio = pci_bar_start ( pci, HVM_MMIO_BAR );
|
||||
hvm->mmio_len = pci_bar_size ( pci, HVM_MMIO_BAR );
|
||||
DBGC2 ( hvm, "HVM has MMIO space [%08lx,%08lx)\n",
|
||||
|
||||
@@ -39,6 +39,8 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
|
||||
struct hvm_device {
|
||||
/** Xen hypervisor */
|
||||
struct xen_hypervisor xen;
|
||||
/** PCI device */
|
||||
struct pci_device *pci;
|
||||
/** CPUID base */
|
||||
uint32_t cpuid_base;
|
||||
/** Length of hypercall table */
|
||||
|
||||
Reference in New Issue
Block a user