Skip to contentSkip to conversation

pci: mvebu: Unable to assign mbus windows for 2nd pcie controller

PATCH In review Tony Dinh 2 participants 3 messages Sep 29, 2025 – Oct 14, 2025 PCI

lore
Share & tools
lore

Tony Dinh

author
#0 lore raw

PATCH 1/1 pci: mvebu: Unable to assign mbus windows for 2nd pcie controller

Correct the memory and IO mbus windows size increments in mvebu_pcie_bind.

Currently, pcie1 controller resource_size(&mem) and resource_size(&io) checks result in a failure. This is because mem.end and io.end must be incremented at the end of pcie0 windows assignment.

---

 drivers/pci/pci_mvebu.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/pci/pci_mvebu.c +2 -0
index 77815513b76..3985bd59607 100644
@@ -763,6 +763,7 @@ static int mvebu_pcie_bind(struct udevice *parent)
 			pcie->mem.start = mem.start;
 			pcie->mem.end = mem.start + SZ_128M - 1;
 			mem.start += SZ_128M;
+			mem.end = mem.start + SZ_128M - 1;
 		} else {
 			printf("%s: unable to assign mbus window for mem\n", pcie->name);
 			pcie->mem.start = 0;
@@ -773,6 +774,7 @@ static int mvebu_pcie_bind(struct udevice *parent)
 			pcie->io.start = io.start;
 			pcie->io.end = io.start + SZ_64K - 1;
 			io.start += SZ_64K;
+			io.end = io.start + SZ_64K - 1;
 		} else {
 			printf("%s: unable to assign mbus window for io\n", pcie->name);
 			pcie->io.start = 0;
Signature · 4 lines
2.47.3

base-commit: ce4cfd7c08136433a9ee9307e90c636102151f01
branch: master
Reviewed-by on v1 1/1
#1 lore raw
Quoted 17 lines · Tony Dinh

Correct the memory and IO mbus windows size increments in mvebu_pcie_bind.

Currently, pcie1 controller resource_size(&mem) and resource_size(&io) checks result in a failure. This is because mem.end and io.end must be incremented at the end of pcie0 windows assignment.

---

  drivers/pci/pci_mvebu.c | 2 ++
  1 file changed, 2 insertions(+)
drivers/pci/pci_mvebu.c +0 -0
index 77815513b76..3985bd59607 100644

drivers/pci/pci_mvebu.c static int mvebu_pcie_bind(struct udevice *parent) · line 766

Quoted 4 lines
drivers/pci/pci_mvebu.c +1 -0
@@ -763,6 +763,7 @@ static int mvebu_pcie_bind(struct udevice *parent)
  			pcie->mem.start = mem.start;
  			pcie->mem.end = mem.start + SZ_128M - 1;
  			mem.start += SZ_128M;
+			mem.end = mem.start + SZ_128M - 1;

Thanks,
Stefan

Quoted 11 lines
drivers/pci/pci_mvebu.c +1 -0
  		} else {
  			printf("%s: unable to assign mbus window for mem\n", pcie->name);
  			pcie->mem.start = 0;
@@ -773,6 +774,7 @@ static int mvebu_pcie_bind(struct udevice *parent)
  			pcie->io.start = io.start;
  			pcie->io.end = io.start + SZ_64K - 1;
  			io.start += SZ_64K;
+			io.end = io.start + SZ_64K - 1;
  		} else {
  			printf("%s: unable to assign mbus window for io\n", pcie->name);
  			pcie->io.start = 0;
#2 lore raw
Quoted 13 lines · Stefan Roese
Quoted 12 lines · Tony Dinh

Correct the memory and IO mbus windows size increments in mvebu_pcie_bind.

Currently, pcie1 controller resource_size(&mem) and resource_size(&io) checks result in a failure. This is because mem.end and io.end must be incremented at the end of pcie0 windows assignment.

---

  drivers/pci/pci_mvebu.c | 2 ++

  1 file changed, 2 insertions(+)
Quoted 11 lines

drivers/pci/pci_mvebu.c static int mvebu_pcie_bind(struct udevice *parent) · line 766

Quoted 9 lines
drivers/pci/pci_mvebu.c +1 -0
index 77815513b76..3985bd59607 100644
@@ -763,6 +763,7 @@ static int mvebu_pcie_bind(struct udevice *parent)
               pcie->mem.start = mem.start;
               pcie->mem.end = mem.start + SZ_128M - 1;
               mem.start += SZ_128M;
+            mem.end = mem.start + SZ_128M - 1;

Applied to u-boot-marvell/master

Thanks,
Stefan