Matroxfb, PReP, and ioremap

Troy Benjegerdes hozer at
Sun Mar 21 16:28:25 EST 1999

It seems as though ioremap has been partially or completely broken on PReP
for awhile, and I'm thinking now would be a good time to fix it nicely,
with the rework of the machine dependent code. Any suggestions how to do
this without breaking other drivers?

With the following patches to Matroxfb, I now get the dual penguins on my
MTX board on bootup ;)

This only works since the PCI code reports the PCI memory space at
0xC0000000, and this space is mapped to 0xD0000000 on PReP. (thus the
phys+ 0x10000000)

[hozer at kalmia video]$ cvs diff -u matroxfb.c
Index: matroxfb.c
RCS file: /cvsroot/linux/drivers/video/matroxfb.c,v
retrieving revision
diff -u -r1.1.1.6 matroxfb.c
--- matroxfb.c  1999/03/10 19:38:29
+++ matroxfb.c  1999/03/20 22:50:50
@@ -187,7 +187,7 @@
 #if defined(CONFIG_PPC) && defined(CONFIG_PREP) && defined(_ISA_MEM_BASE)
 /* do not tell me that PPC is not broken... if ioremap() oops with
    invalid value written to msr... */
+#define MAP_BOGUS
 #define MAP_IOREMAP
@@ -351,11 +351,9 @@
        virt->vaddr = bus_to_virt(phys);
-       virt->vaddr = (void*)(phys + _ISA_MEM_BASE);
-#error "Your architecture does not have neither ioremap nor
bus_to_virt... Givi
ng up"
+       virt->vaddr = phys+0x10000000; /* cheap hack */
+#warning "Cheap hack for my MTX and Millenium I"
+/*#error "Your architecture does not have neither ioremap nor
bus_to_virt... Gi
ving up"*/
        return (virt->vaddr == 0); /* 0, !0... 0, error_code in future */

| Troy Benjegerdes    |       troy at     |    hozer at   |
|    Unix is user friendly... You just have to be friendly to it first.  |
| This message composed with 100% free software.   |

[[ This message was sent via the linuxppc-dev mailing list.  Replies are ]]
[[ not  forced  back  to the list, so be sure to Cc linuxppc-dev if your ]]
[[ reply is of general interest. Please check ]]
[[ and for useful information before posting.   ]]

More information about the Linuxppc-dev mailing list