Commit 86c6f7d0 authored by Maciej W. Rozycki's avatar Maciej W. Rozycki Committed by Linus Torvalds

tgafb: TURBOchannel support

This is support for the TC variations of the TGA boards (properly known as
SFB+ or Smart Frame Buffer Plus boards).  The 8-plane SFB+ board uses the
Bt459 RAMDAC (unlike its PCI TGA counterpart, which uses the Bt485), so
bits have been added to support this chip as well.
Signed-off-by: default avatarMaciej W. Rozycki <macro@linux-mips.org>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Cc: James Simmons <jsimmons@infradead.org>
Acked-by: default avatarRalf Baechle <ralf@linux-mips.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 9a268a62
...@@ -525,15 +525,25 @@ config FB_HP300 ...@@ -525,15 +525,25 @@ config FB_HP300
default y default y
config FB_TGA config FB_TGA
tristate "TGA framebuffer support" tristate "TGA/SFB+ framebuffer support"
depends on FB && ALPHA depends on FB && (ALPHA || TC)
select FB_CFB_FILLRECT select FB_CFB_FILLRECT
select FB_CFB_COPYAREA select FB_CFB_COPYAREA
select FB_CFB_IMAGEBLIT select FB_CFB_IMAGEBLIT
select BITREVERSE select BITREVERSE
help ---help---
This is the frame buffer device driver for generic TGA graphic This is the frame buffer device driver for generic TGA and SFB+
cards. Say Y if you have one of those. graphic cards. These include DEC ZLXp-E1, -E2 and -E3 PCI cards,
also known as PBXGA-A, -B and -C, and DEC ZLX-E1, -E2 and -E3
TURBOchannel cards, also known as PMAGD-A, -B and -C.
Due to hardware limitations ZLX-E2 and E3 cards are not supported
for DECstation 5000/200 systems. Additionally due to firmware
limitations these cards may cause troubles with booting DECstation
5000/240 and /260 systems, but are fully supported under Linux if
you manage to get it going. ;-)
Say Y if you have one of those.
config FB_VESA config FB_VESA
bool "VESA VGA graphics support" bool "VESA VGA graphics support"
......
This diff is collapsed.
...@@ -39,6 +39,7 @@ ...@@ -39,6 +39,7 @@
#define TGA_RASTEROP_REG 0x0034 #define TGA_RASTEROP_REG 0x0034
#define TGA_PIXELSHIFT_REG 0x0038 #define TGA_PIXELSHIFT_REG 0x0038
#define TGA_DEEP_REG 0x0050 #define TGA_DEEP_REG 0x0050
#define TGA_START_REG 0x0054
#define TGA_PIXELMASK_REG 0x005c #define TGA_PIXELMASK_REG 0x005c
#define TGA_CURSOR_BASE_REG 0x0060 #define TGA_CURSOR_BASE_REG 0x0060
#define TGA_HORIZ_REG 0x0064 #define TGA_HORIZ_REG 0x0064
...@@ -140,7 +141,7 @@ ...@@ -140,7 +141,7 @@
/* /*
* Useful defines for managing the BT463 on the 24-plane TGAs * Useful defines for managing the BT463 on the 24-plane TGAs/SFB+s
*/ */
#define BT463_ADDR_LO 0x0 #define BT463_ADDR_LO 0x0
...@@ -167,13 +168,36 @@ ...@@ -167,13 +168,36 @@
#define BT463_WINDOW_TYPE_BASE 0x0300 #define BT463_WINDOW_TYPE_BASE 0x0300
/*
* Useful defines for managing the BT459 on the 8-plane SFB+s
*/
#define BT459_ADDR_LO 0x0
#define BT459_ADDR_HI 0x1
#define BT459_REG_ACC 0x2
#define BT459_PALETTE 0x3
#define BT459_CUR_CLR_1 0x0181
#define BT459_CUR_CLR_2 0x0182
#define BT459_CUR_CLR_3 0x0183
#define BT459_CMD_REG_0 0x0201
#define BT459_CMD_REG_1 0x0202
#define BT459_CMD_REG_2 0x0203
#define BT459_READ_MASK 0x0204
#define BT459_BLINK_MASK 0x0206
#define BT459_CUR_CMD_REG 0x0300
/* /*
* The framebuffer driver private data. * The framebuffer driver private data.
*/ */
struct tga_par { struct tga_par {
/* PCI device. */ /* PCI/TC device. */
struct pci_dev *pdev; struct device *dev;
/* Device dependent information. */ /* Device dependent information. */
void __iomem *tga_mem_base; void __iomem *tga_mem_base;
...@@ -235,4 +259,21 @@ BT463_WRITE(struct tga_par *par, u32 m, u16 a, u8 v) ...@@ -235,4 +259,21 @@ BT463_WRITE(struct tga_par *par, u32 m, u16 a, u8 v)
TGA_WRITE_REG(par, m << 10 | v, TGA_RAMDAC_REG); TGA_WRITE_REG(par, m << 10 | v, TGA_RAMDAC_REG);
} }
static inline void
BT459_LOAD_ADDR(struct tga_par *par, u16 a)
{
TGA_WRITE_REG(par, BT459_ADDR_LO << 2, TGA_RAMDAC_SETUP_REG);
TGA_WRITE_REG(par, a & 0xff, TGA_RAMDAC_REG);
TGA_WRITE_REG(par, BT459_ADDR_HI << 2, TGA_RAMDAC_SETUP_REG);
TGA_WRITE_REG(par, a >> 8, TGA_RAMDAC_REG);
}
static inline void
BT459_WRITE(struct tga_par *par, u32 m, u16 a, u8 v)
{
BT459_LOAD_ADDR(par, a);
TGA_WRITE_REG(par, m << 2, TGA_RAMDAC_SETUP_REG);
TGA_WRITE_REG(par, v, TGA_RAMDAC_REG);
}
#endif /* TGAFB_H */ #endif /* TGAFB_H */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment