Skip to content

Commit 79de360

Browse files
robherringmpe
authored andcommitted
powerpc/isa-bridge: Fix ISA mapping when "ranges" is not present
Commit e4ab08b ("powerpc/isa-bridge: Remove open coded "ranges" parsing") broke PASemi Nemo board booting. The issue is the ISA I/O range was not getting mapped as the logic to handle no "ranges" was inverted. If phb_io_base_phys is non-zero, then the ISA range defaults to the first 64K of the PCI I/O space. phb_io_base_phys should only be 0 when looking for a non-PCI ISA region. Fixes: e4ab08b ("powerpc/isa-bridge: Remove open coded "ranges" parsing") Reported-by: Christian Zigotzky <chzigotzky@xenosoft.de> Link: https://lore.kernel.org/all/301595ad-0edf-2113-b55f-f5b8051ed24c@xenosoft.de/ Signed-off-by: Rob Herring <robh@kernel.org> Tested-by: Christian Zigotzky <chzigotzky@xenosoft.de> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://msgid.link/20230505171816.3175865-1-robh@kernel.org
1 parent ac9a786 commit 79de360

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

arch/powerpc/kernel/isa-bridge.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,11 +93,12 @@ static int process_ISA_OF_ranges(struct device_node *isa_node,
9393
}
9494

9595
inval_range:
96-
if (!phb_io_base_phys) {
96+
if (phb_io_base_phys) {
9797
pr_err("no ISA IO ranges or unexpected isa range, mapping 64k\n");
9898
remap_isa_base(phb_io_base_phys, 0x10000);
99+
return 0;
99100
}
100-
return 0;
101+
return -EINVAL;
101102
}
102103

103104

0 commit comments

Comments
 (0)