• Bjorn Helgaas's avatar
    agp/intel: Use pci_bus_address() to get MMADR bus address · 5ef6d8f4
    Bjorn Helgaas authored
    Per the Intel 915G/915GV/... Chipset spec (document number 301467-005),
    MMADR is a standard PCI BAR.
    
    The PCI core reads MMADR at enumeration-time.  Use pci_bus_address()
    instead of reading it again in the driver.  This works correctly for both
    32-bit and 64-bit BARs.  The spec above only mentions 32-bit MMADR, but we
    should still use the standard interface.
    
    Also, stop clearing the low 19 bits of the bus address because it's invalid
    to use addresses outside the region defined by the BAR.  The spec claims
    MMADR is 512KB; if that's the case, those bits will be zero anyway.
    Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
    Reviewed-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
    5ef6d8f4
intel-gtt.c 35.9 KB