pci-scan: Fix pci-bridge-set-mem-base and pci-bridge-set-mem-limit

The functions used a bogus mixture between programming the registers
with pci-next-mem64 and pci-next-mem - the upper register bits were
filled with the value from the 64-bit memory space while the lower
bits were filled with the bits from the 32-bit memory space variable.

This separates handling of pci-{next|max}-mem64 from pci-{next|max}-mem.

This zeroes bottom 4 bits of the prefetchable memory limit and
prefetchable memory base registers for 32bit windows to enforce
that the resources are marked as 32bit.

This simplifies updating of the prefetchable memory limit in
ci-bridge-set-mem-limit.

Signed-off-by: Thomas Huth <thuth@redhat.com>
[aik: extended commit log with 32bit window changes]
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Reviewed-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
1 file changed