parisc/pci: Disable LMMIO_DIRECT0 range during modification
When modifying the LMMIO directed ranges, disable the range
to prevent that hardware (or qemu) reacts to every small
modification before all values have been set.
Signed-off-by: Helge Deller <deller@gmx.de>
diff --git a/src/fw/pciinit.c b/src/fw/pciinit.c
index 56c1f44..1151133 100644
--- a/src/fw/pciinit.c
+++ b/src/fw/pciinit.c
@@ -593,11 +593,14 @@
addr = 0xfa000000; /* graphics card area for parisc, f8 is used by artist */
addr += i * 0x02000000;
- writel(reg + LMMIO_DIRECT0_BASE, addr | 1);
+ /* clear bit 0 of address to disable LMMIO while we modify things */
+ writel(reg + LMMIO_DIRECT0_BASE, addr & ~1ULL);
writel(reg + LMMIO_DIRECT0_ROUTE, rope & (ROPES_PER_IOC - 1));
size = 0xfff8000000 | ~(size-1); /* is -1 correct? */
// dprintf(1, "use addr %lx size %lx\n", addr|1, size);
writel(reg + LMMIO_DIRECT0_MASK, size);
+ /* finally turn on the modified LMMIO region */
+ writel(reg + LMMIO_DIRECT0_BASE, addr | 1);
return addr;
}
#endif /* CONFIG_PARISC */