]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
fbdev/cirrusfb: Add support for "64 MiB" version of Picasso IV
authorGeert Uytterhoeven <geert@linux-m68k.org>
Thu, 20 Oct 2011 11:42:25 +0000 (13:42 +0200)
committerFlorian Tobias Schandinat <FlorianSchandinat@gmx.de>
Fri, 11 Nov 2011 16:55:55 +0000 (16:55 +0000)
Some Village Tronic Picasso IV graphics cards identify as a 64 MiB Zorro
device in Zorro III mode.

While the total graphics memory size is the same on such cards, the offset
of the graphics memory differs. Add a quirk to handle this.

Based on src/sys/arch/amiga/dev/grf_cl.c from NetBSD.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Jeff Garzik <jgarzik@redhat.com>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
drivers/video/cirrusfb.c

index 816433ffec9dcedcf71e8c6831121b8eb11b35f9..6ea505c6f0c89c3986f4184002f91b054c691d20 100644 (file)
@@ -314,7 +314,7 @@ static const struct zorrocl zcl_picasso4_z3 __devinitconst = {
        .type           = BT_PICASSO4,
        .regoffset      = 0x00600000,
        .ramsize        = 4 * MB_,
-       .ramoffset      = 0x01000000,
+       .ramoffset      = 0x01000000,   /* 0x02000000 for 64 MiB boards */
 };
 
 static const struct zorrocl zcl_picasso4_z2 __devinitconst = {
@@ -2259,6 +2259,10 @@ static int __devinit cirrusfb_zorro_register(struct zorro_dev *z,
        ramsize = zcl->ramsize;
        if (ramsize) {
                rambase = zorro_resource_start(z) + zcl->ramoffset;
+               if (zorro_resource_len(z) == 64 * MB_) {
+                       /* Quirk for 64 MiB Picasso IV */
+                       rambase += zcl->ramoffset;
+               }
        } else {
                struct zorro_dev *ram = zorro_find_device(zcl->ramid, NULL);
                if (!ram || !zorro_resource_len(ram)) {