powerpc: isa-bridge: Fix ISA mmapping when "ranges" is not present
PATCH 1/1 powerpc: isa-bridge: Fix ISA mmapping when "ranges" is not present
Commit e4ab08be5b49 ("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.
---
Untested, but I think this should fix the issue.
arch/powerpc/kernel/isa-bridge.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
arch/powerpc/kernel/isa-bridge.c +3 -2
@@ -93,11 +93,12 @@ 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 0 ; +return -EINVAL ; }
Signature · 1 line
2.39.2
Quoted 26 lines · Rob Herring
Commit
e4ab08be5b49("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. Ifphb_io_base_physis non-zero, then the ISA range defaults to the first 64K of the PCI I/O space.phb_io_base_physshould only be 0 when looking for a non-PCI ISA region.Fixes e4ab08be5b49 ("powerpc/isa-bridge: Remove open coded "ranges" parsing")Reported-by Christian Zigotzky <[email protected]>Signed-off-by Rob Herring <[email protected]>---
Untested, but I think this should fix the issue.arch/powerpc/kernel/isa-bridge.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)arch/powerpc/kernel/isa-bridge.c +0
-1@@ -93,11 +93,12 @@ static int process_ISA_OF_ranges(struct device_node *isa_node, } inval_range: -if (!phb_io_base_phys) {
arch/powerpc/kernel/isa-bridge.c static int process_ISA_OF_ranges(struct device_node *isa_node, · line 104
Quoted 10 lines
arch/powerpc/kernel/isa-bridge.c +3
-1+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 0 ; +return -EINVAL ; }
The Nemo board boots with this patch. Thanks a lot for your help!
Michael Ellerman
AppliedQuoted 8 lines · Rob Herring
Commit
e4ab08be5b49("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. Ifphb_io_base_physis non-zero, then the ISA range defaults to the first 64K of the PCI I/O space.phb_io_base_physshould only be 0 when looking for a non-PCI ISA region.[...]
Applied to powerpc/fixes.
[1/1] powerpc: isa-bridge: Fix ISA mmapping when "ranges" is not present
https://git.kernel.org/powerpc/c/79de36042eecb684e0f748d17ba52f365fde0d65
cheers
Quoted 8 lines · Michael Ellerman
Quoted 7 lines · Rob Herring
Commit
e4ab08be5b49("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. Ifphb_io_base_physis non-zero, then the ISA range defaults to the first 64K of the PCI I/O space.phb_io_base_physshould only be 0 when looking for a non-PCI ISA region.
Quoted 7 lines
Quoted 1 line
[...]
Applied to powerpc/fixes.
[1/1] powerpc: isa-bridge: Fix ISA mmapping when "ranges" is not present
https://git.kernel.org/powerpc/c/79de36042eecb684e0f748d17ba52f365fde0d65cheers
Hello Michael,
This patch has already been applied. Link: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=4927cb98f0eeaa5dbeac882e8372f4b16dc62624
Thanks,
Christian
Michael Ellerman
reviewerQuoted 12 lines · Christian Zigotzky
Quoted 11 lines · Michael Ellerman
Quoted 8 lines · Rob Herring
Commit
e4ab08be5b49("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. Ifphb_io_base_physis non-zero, then the ISA range defaults to the first 64K of the PCI I/O space.phb_io_base_physshould only be 0 when looking for a non-PCI ISA region.[...]
Applied to powerpc/fixes.
Quoted 8 lines
Quoted 4 lines
[1/1] powerpc: isa-bridge: Fix ISA mmapping when "ranges" is not present
https://git.kernel.org/powerpc/c/79de36042eecb684e0f748d17ba52f365fde0d65cheers
Hello Michael,
This patch has already been applied. Link:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=4927cb98f0eeaa5dbeac882e8372f4b16dc62624
Yes, it's actually the same commit. I'm just catching up on sending the thanks emails. Sorry for the confusion.
cheers