Home
last modified time | relevance | path

Searched hist:"2 d43e873a29ca4959ba6a30fc7fb396d3fd0dccf" (Results 1 – 2 of 2) sorted by relevance

/rk3399_rockchip-uboot/drivers/pci/
H A Dpci_common.c3526285068598f4e2ddaf19d4bd94f253de06ce9 Fri Oct 23 21:48:01 UTC 2015 Cheng Gu <chenggu@marvell.com> pci: fix checking PCI_REGION_MEM in pci_hose_phys_to_bus()

When converting between PCI bus and phys addresses, a two pass search
was introduced with preference to non-PCI_REGION_SYS_MEMORY regions.
See commit 2d43e873a29ca4959ba6a30fc7fb396d3fd0dccf.

However, since PCI_REGION_MEM is defined as 0, the if statement was
always asserted true: ((flags & PCI_REGION_MEM) == PCI_REGION_MEM)

This patch uses PCI_REGION_TYPE bit to check if the region is
PCI_REGION_MEM: ((flags & PCI_REGION_TYPE) == PCI_REGION_MEM)

Signed-off-by: Cheng Gu <chenggu@marvell.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
H A Dpci.c2d43e873a29ca4959ba6a30fc7fb396d3fd0dccf Fri Feb 06 15:49:32 UTC 2009 Kumar Gala <galak@kernel.crashing.org> pci: give preference to non-PCI_REGION_SYS_MEMORY regions when matching

When we search for an address match in pci_hose_{phys_to_bus,bus_to_phys}
we should give preference to memory regions that aren't system memory.

Its possible that we have over mapped system memory in the regions and
we want to avoid depending on the order of the regions.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>