mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-11 00:51:47 +00:00
powerpc/pci: Fix IMMRBAR address
For PEXCSRBAR, bit 3-0 indicate prefetchable and address type. So when getting base address, these bits should be masked, otherwise we may get incorrect base address. Signed-off-by: Minghuan Lian <Minghuan.Lian@freescale.com> Signed-off-by: Scott Wood <scottwood@freescale.com>
This commit is contained in:
parent
5d1a566e51
commit
a424b97b7e
1 changed files with 8 additions and 0 deletions
|
@ -868,6 +868,14 @@ u64 fsl_pci_immrbar_base(struct pci_controller *hose)
|
||||||
|
|
||||||
pci_bus_read_config_dword(hose->bus,
|
pci_bus_read_config_dword(hose->bus,
|
||||||
PCI_DEVFN(0, 0), PCI_BASE_ADDRESS_0, &base);
|
PCI_DEVFN(0, 0), PCI_BASE_ADDRESS_0, &base);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* For PEXCSRBAR, bit 3-0 indicate prefetchable and
|
||||||
|
* address type. So when getting base address, these
|
||||||
|
* bits should be masked
|
||||||
|
*/
|
||||||
|
base &= PCI_BASE_ADDRESS_MEM_MASK;
|
||||||
|
|
||||||
return base;
|
return base;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue