From 3d8f72acd1a80538ac7c21f71b6a6e4779ff2d7f Mon Sep 17 00:00:00 2001 From: Helge Deller Date: Tue, 2 Apr 2024 14:46:13 +0200 Subject: 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 --- src/fw/pciinit.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 @@ static unsigned long add_lmmio_directed_range(unsigned long size, int rope) 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 */ -- cgit v1.1