diff options
author | Helge Deller <deller@gmx.de> | 2024-04-02 14:46:13 +0200 |
---|---|---|
committer | Helge Deller <deller@gmx.de> | 2024-04-02 14:46:13 +0200 |
commit | 3d8f72acd1a80538ac7c21f71b6a6e4779ff2d7f (patch) | |
tree | 233d77438977f84f05e9658508431e52054ac995 | |
parent | 225ec7013c2992c37981f39dbaa63680859f7e02 (diff) | |
download | seabios-hppa-3d8f72acd1a80538ac7c21f71b6a6e4779ff2d7f.zip seabios-hppa-3d8f72acd1a80538ac7c21f71b6a6e4779ff2d7f.tar.gz seabios-hppa-3d8f72acd1a80538ac7c21f71b6a6e4779ff2d7f.tar.bz2 |
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>
-rw-r--r-- | src/fw/pciinit.c | 5 |
1 files changed, 4 insertions, 1 deletions
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 */ |