]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
pci: When disabling pref MEM set all base bits
authorPali Rohár <pali@kernel.org>
Thu, 25 Nov 2021 10:34:37 +0000 (11:34 +0100)
committerTom Rini <trini@konsulko.com>
Wed, 12 Jan 2022 19:21:24 +0000 (14:21 -0500)
It is common to set all base address bits to one and all limit address bits
to zero for disabling address forwarding. Forwarding is disabled when base
address is higher than limit address, so this change should not have any
effect.

Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Stefan Roese <sr@denx.de>
drivers/pci/pci_auto.c

index 6e5ed194f24791969a6154b33259f3d048802e84..c0acf331398d8d3623b2028fca84c8cdfe096718 100644 (file)
@@ -243,7 +243,7 @@ void dm_pciauto_prescan_setup_bridge(struct udevice *dev, int sub_bus)
                cmdstat |= PCI_COMMAND_MEMORY;
        } else {
                /* We don't support prefetchable memory for now, so disable */
-               dm_pci_write_config16(dev, PCI_PREF_MEMORY_BASE, 0x1000 |
+               dm_pci_write_config16(dev, PCI_PREF_MEMORY_BASE, 0xfff0 |
                                                                prefechable_64);
                dm_pci_write_config16(dev, PCI_PREF_MEMORY_LIMIT, 0x0 |
                                                                prefechable_64);