On 11/25/21 11:34, Pali Rohár wrote:
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 <p...@kernel.org>
---
  drivers/pci/pci_auto.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pci/pci_auto.c b/drivers/pci/pci_auto.c
index 6e5ed194f247..c0acf331398d 100644
--- a/drivers/pci/pci_auto.c
+++ b/drivers/pci/pci_auto.c
@@ -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);

Again, does it make sense to add / use a macro for this 0xfff0 above?

Other than this:

Reviewed-by: Stefan Roese <s...@denx.de>

Thanks,
Stefan


                dm_pci_write_config16(dev, PCI_PREF_MEMORY_LIMIT, 0x0 |
                                                                prefechable_64);


Viele Grüße,
Stefan Roese

--
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: s...@denx.de

Reply via email to