parisc: Add LMMIO range for internal artist graphic card
Register a LMMIO range for the internal graphic card.
That allow to boot with STI graphic card (artist) when booting
on a 64-bit machine.
Signed-off-by: Helge Deller <deller@gmx.de>
diff --git a/src/fw/pciinit.c b/src/fw/pciinit.c
index ce64fdb..7b5aaaf 100644
--- a/src/fw/pciinit.c
+++ b/src/fw/pciinit.c
@@ -574,11 +574,14 @@
}
#endif /* CONFIG_PARISC */
-static unsigned long add_lmmio_directed_range(unsigned long size, int rope)
+unsigned long add_lmmio_directed_range(unsigned long size, int rope)
{
#ifdef CONFIG_PARISC
int i;
+ if (!has_astro)
+ return -1;
+
/* Astro has 4 directed ranges. */
for (i = 0; i < 4; i++) {
unsigned long addr;
@@ -590,7 +593,7 @@
/* fixme for multiple addresses */
/* Linux driver currently only allows one distr. range per IOC */
- addr = 0xfa000000; /* graphics card area for parisc, f8 is used by artist */
+ addr = 0xf8000000; /* graphics card area for parisc, LASI_GFX_HPA is usually artist */
addr += i * 0x02000000;
/* clear bit 0 of address to disable LMMIO while we modify things */
diff --git a/src/parisc/hppa.h b/src/parisc/hppa.h
index e14f67e..ab68f63 100644
--- a/src/parisc/hppa.h
+++ b/src/parisc/hppa.h
@@ -440,6 +440,8 @@
// pci.c
unsigned long elroy_offset(u16 bdf);
void *elroy_port(unsigned long port, unsigned long offs);
+// pciinit.c
+unsigned long add_lmmio_directed_range(unsigned long size, int rope);
#endif // !__ASSEMBLY__
#endif
diff --git a/src/parisc/stirom.c b/src/parisc/stirom.c
index 99c50b9..99461d2 100644
--- a/src/parisc/stirom.c
+++ b/src/parisc/stirom.c
@@ -3590,6 +3590,9 @@
if (sti_proc_rom.font_start)
return;
+ /* allocate first LMMIO range for STI when running on Astro */
+ add_lmmio_directed_range(0x2000000, 0);
+
sti_rom_size = (_sti_rom_end - _sti_rom_start) / 4096;
if (sti_region_list[0].region_desc.length != sti_rom_size) {
/* The STI ROM size is wrong. Try to fix it.