aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/fw/pciinit.c7
-rw-r--r--src/parisc/hppa.h2
-rw-r--r--src/parisc/stirom.c3
3 files changed, 10 insertions, 2 deletions
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 @@ static void parisc_mem_addr_setup(struct pci_device *dev, void *arg)
}
#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 @@ static unsigned long add_lmmio_directed_range(unsigned long size, int rope)
/* 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 @@ void cpuid(u32 index, u32 *eax, u32 *ebx, u32 *ecx, u32 *edx);
// 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 @@ void sti_rom_init(void)
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.