PCI: mvebu: Propagate errors when updating PCI_IO_BASE and PCI_MEM_BASE registers
authorPali Rohár <pali@kernel.org>
Thu, 25 Nov 2021 12:45:58 +0000 (13:45 +0100)
committerLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Tue, 4 Jan 2022 14:58:55 +0000 (14:58 +0000)
commite7a01876729c3e650c5f6ee446b71a309d1c55ab
tree43a874a5c704e8051bf5cf257086f6ea38254296
parent2cf150216e5b5619d7c25180ccf2cc8ac7bebc13
PCI: mvebu: Propagate errors when updating PCI_IO_BASE and PCI_MEM_BASE registers

Properly propagate failure from mvebu_pcie_add_windows() function back to
the caller mvebu_pci_bridge_emul_base_conf_write() and correctly updates
PCI_IO_BASE, PCI_MEM_BASE and PCI_IO_BASE_UPPER16 registers on error.
On error set base value higher than limit value which indicates that
address range is disabled. When IO is unsupported then let IO registers
zeroed as required by PCIe base specification.

Link: https://lore.kernel.org/r/20211125124605.25915-9-pali@kernel.org
Signed-off-by: Pali Rohár <pali@kernel.org>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
drivers/pci/controller/pci-mvebu.c