Commit 79de3604 authored by Rob Herring's avatar Rob Herring Committed by Michael Ellerman
Browse files

powerpc/isa-bridge: Fix ISA mapping when "ranges" is not present



Commit e4ab08be ("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: e4ab08be ("powerpc/isa-bridge: Remove open coded "ranges" parsing")
Reported-by: default avatarChristian Zigotzky <chzigotzky@xenosoft.de>
Link: https://lore.kernel.org/all/301595ad-0edf-2113-b55f-f5b8051ed24c@xenosoft.de/


Signed-off-by: default avatarRob Herring <robh@kernel.org>
Tested-by: default avatarChristian Zigotzky <chzigotzky@xenosoft.de>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/20230505171816.3175865-1-robh@kernel.org
parent ac9a7868
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -93,12 +93,13 @@ static int process_ISA_OF_ranges(struct device_node *isa_node,
	}

inval_range:
	if (!phb_io_base_phys) {
	if (phb_io_base_phys) {
		pr_err("no ISA IO ranges or unexpected isa range, mapping 64k\n");
		remap_isa_base(phb_io_base_phys, 0x10000);
	}
		return 0;
	}
	return -EINVAL;
}


/**