PCI: mvebu: Fix duplicate resource requests
authorRob Herring <robh@kernel.org>
Fri, 23 Oct 2020 14:52:52 +0000 (09:52 -0500)
committerBjorn Helgaas <bhelgaas@google.com>
Wed, 4 Nov 2020 19:55:30 +0000 (13:55 -0600)
commit832ea234277a2465ec6602fa6a4db5cd9ee87ae3
treeb3a0bafdc0d6b2798973d16d22b92dc4abb1fe29
parent9fff3256f93da6eb2b806eeaec8c1dc6e9a87194
PCI: mvebu: Fix duplicate resource requests

With commit 669cbc708122 ("PCI: Move DT resource setup into
devm_pci_alloc_host_bridge()"), the DT 'ranges' is parsed and populated
into resources when the host bridge is allocated. The resources are
requested as well, but that happens a second time for the mvebu driver in
mvebu_pcie_parse_request_resources(). We should only be requesting the
additional resources added in mvebu_pcie_parse_request_resources().  These
are not added by default because they use custom properties rather than
standard DT address translation.

Also, the bus ranges was also populated by default, so we can remove it
from mvebu_pci_host_probe().

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=209729
Fixes: 669cbc708122 ("PCI: Move DT resource setup into devm_pci_alloc_host_bridge()")
Link: https://lore.kernel.org/r/20201023145252.2691779-1-robh@kernel.org
Reported-by: vtolkm@googlemail.com
Tested-by: Jan Kundrát <jan.kundrat@cesnet.cz>
Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Cc: Jason Cooper <jason@lakedaemon.net>
Cc: Russell King <linux@armlinux.org.uk>
drivers/pci/controller/pci-mvebu.c