Fix the detection of IO/memory space changing across busses when the bus

is not pci (and thus where, ironically, the whole situation is meaningless).

This was not an error in the original code, it was introduced during my
refactoring to commonize the routine.  A small change a few lines above
drove the need to make this change, and the error didn't show up on the
platforms I initially tested with.
This commit is contained in:
Ian Lepore 2015-12-22 00:53:19 +00:00
parent 8eb42fb2a8
commit 67bcc941d0
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=292579

View File

@ -137,9 +137,8 @@ ofw_reg_to_paddr(phandle_t dev, int regno, bus_addr_t *paddr,
res /= sizeof(cell[0]);
regno = 0;
while (regno < res) {
rspc = (pci)
? cell[regno] & OFW_PCI_PHYS_HI_SPACEMASK
: OFW_PADDR_NOT_PCI;
rspc = (pci ? cell[regno] : OFW_PADDR_NOT_PCI) &
OFW_PCI_PHYS_HI_SPACEMASK;
if (rspc != spc) {
regno += naddr + nbridge + nsize;
continue;