diff options
author | Finn Thain <fthain@telegraphics.com.au> | 2009-11-04 00:43:52 +1100 |
---|---|---|
committer | Geert Uytterhoeven <geert@linux-m68k.org> | 2010-02-27 18:31:13 +0100 |
commit | 11e8faca2e501c25d2f98c1b9534776a9a9704c5 (patch) | |
tree | 0f98adbc0b0880e5fc88d47a02c0c39f6f5085bd /drivers/video/macfb.c | |
parent | d876c11a0fd40993136f5cc1e81371ccc6c21a63 (diff) | |
download | op-kernel-dev-11e8faca2e501c25d2f98c1b9534776a9a9704c5.zip op-kernel-dev-11e8faca2e501c25d2f98c1b9534776a9a9704c5.tar.gz |
valkyriefb: various fixes
Valkyriefb and macfb will adopt the same card if they get the chance, so
remove valkyrie support from macfb. Also fix the "valkyriefb: can't do
832x624x8" problem reported by Raylynn Knight some time ago, by adding
vmode 13 support for CONFIG_MAC. Also add vmode 11 since that works too.
Make use of the monitor sense lines on 68k Macs too. Also some cleanups.
Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Diffstat (limited to 'drivers/video/macfb.c')
-rw-r--r-- | drivers/video/macfb.c | 53 |
1 files changed, 4 insertions, 49 deletions
diff --git a/drivers/video/macfb.c b/drivers/video/macfb.c index d66887e..a923225 100644 --- a/drivers/video/macfb.c +++ b/drivers/video/macfb.c @@ -55,9 +55,6 @@ static int (*macfb_setpalette) (unsigned int regno, unsigned int red, unsigned int green, unsigned int blue, struct fb_info *info) = NULL; -static int valkyrie_setpalette (unsigned int regno, unsigned int red, - unsigned int green, unsigned int blue, - struct fb_info *info); static int dafb_setpalette (unsigned int regno, unsigned int red, unsigned int green, unsigned int blue, struct fb_info *fb_info); @@ -79,13 +76,6 @@ static int csc_setpalette (unsigned int regno, unsigned int red, static struct { unsigned char addr; - /* Note: word-aligned */ - char pad[3]; - unsigned char lut; -} __iomem *valkyrie_cmap_regs; - -static struct { - unsigned char addr; unsigned char lut; } __iomem *v8_brazil_cmap_regs; @@ -172,33 +162,6 @@ static u32 pseudo_palette[16]; static int inverse = 0; static int vidtest = 0; -static int valkyrie_setpalette (unsigned int regno, unsigned int red, - unsigned int green, unsigned int blue, - struct fb_info *info) -{ - unsigned long flags; - - red >>= 8; - green >>= 8; - blue >>= 8; - - local_irq_save(flags); - - /* tell clut which address to fill */ - nubus_writeb(regno, &valkyrie_cmap_regs->addr); - nop(); - - /* send one color channel at a time */ - nubus_writeb(red, &valkyrie_cmap_regs->lut); - nop(); - nubus_writeb(green, &valkyrie_cmap_regs->lut); - nop(); - nubus_writeb(blue, &valkyrie_cmap_regs->lut); - - local_irq_restore(flags); - return 0; -} - /* Unlike the Valkyrie, the DAFB cannot set individual colormap registers. Therefore, we do what the MacOS driver does (no kidding!) and simply set them one by one until we hit the one we @@ -614,8 +577,6 @@ static void __init macfb_setup(char *options) static void __init iounmap_macfb(void) { - if (valkyrie_cmap_regs) - iounmap(valkyrie_cmap_regs); if (dafb_cmap_regs) iounmap(dafb_cmap_regs); if (v8_brazil_cmap_regs) @@ -642,6 +603,10 @@ static int __init macfb_init(void) if (!MACH_IS_MAC) return -ENODEV; + if (mac_bi_data.id == MAC_MODEL_Q630 || + mac_bi_data.id == MAC_MODEL_P588) + return -ENODEV; /* See valkyriefb.c */ + /* There can only be one internal video controller anyway so we're not too worried about this */ macfb_defined.xres = mac_bi_data.dimensions & 0xFFFF; @@ -784,16 +749,6 @@ static int __init macfb_init(void) if (!video_is_nubus) switch( mac_bi_data.id ) { - /* Valkyrie Quadras */ - case MAC_MODEL_Q630: - /* I'm not sure about this one */ - case MAC_MODEL_P588: - strcpy(macfb_fix.id, "Valkyrie"); - macfb_setpalette = valkyrie_setpalette; - macfb_defined.activate = FB_ACTIVATE_NOW; - valkyrie_cmap_regs = ioremap(DAC_BASE, 0x1000); - break; - /* DAFB Quadras */ /* Note: these first four have the v7 DAFB, which is known to be rather unlike the ones used in the |