aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/savage
diff options
context:
space:
mode:
authorTormod Volden <debian.tormod@gmail.com>2011-04-10 16:57:34 -0400
committerPaul Mundt <lethal@linux-sh.org>2011-05-24 03:04:54 -0400
commitcc406341d26381bf27329704360dfecd547b4fc0 (patch)
treedf34f9ca43d420b37c2d65b7d326739a9811b5fd /drivers/video/savage
parent1db41e032d563eb47deab40dc5595be306b143ba (diff)
savagefb: New S3_TWISTER and S3_PROSAVAGEDDR chip families
Realign the chip families with the Xorg DDX Signed-off-by: Tormod Volden <debian.tormod@gmail.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'drivers/video/savage')
-rw-r--r--drivers/video/savage/savagefb-i2c.c2
-rw-r--r--drivers/video/savage/savagefb.h8
-rw-r--r--drivers/video/savage/savagefb_driver.c12
3 files changed, 15 insertions, 7 deletions
diff --git a/drivers/video/savage/savagefb-i2c.c b/drivers/video/savage/savagefb-i2c.c
index bb71fea07284..80fa87e2ae2f 100644
--- a/drivers/video/savage/savagefb-i2c.c
+++ b/drivers/video/savage/savagefb-i2c.c
@@ -171,6 +171,8 @@ void savagefb_create_i2c_busses(struct fb_info *info)
171 171
172 switch (par->chip) { 172 switch (par->chip) {
173 case S3_PROSAVAGE: 173 case S3_PROSAVAGE:
174 case S3_PROSAVAGEDDR:
175 case S3_TWISTER:
174 par->chan.reg = CR_SERIAL2; 176 par->chan.reg = CR_SERIAL2;
175 par->chan.ioaddr = par->mmio.vbase; 177 par->chan.ioaddr = par->mmio.vbase;
176 par->chan.algo.setsda = prosavage_gpio_setsda; 178 par->chan.algo.setsda = prosavage_gpio_setsda;
diff --git a/drivers/video/savage/savagefb.h b/drivers/video/savage/savagefb.h
index 4e9490c19d7d..32549d177b19 100644
--- a/drivers/video/savage/savagefb.h
+++ b/drivers/video/savage/savagefb.h
@@ -36,7 +36,6 @@
36#define PCI_CHIP_SAVAGE_IX 0x8c13 36#define PCI_CHIP_SAVAGE_IX 0x8c13
37#define PCI_CHIP_PROSAVAGE_PM 0x8a25 37#define PCI_CHIP_PROSAVAGE_PM 0x8a25
38#define PCI_CHIP_PROSAVAGE_KM 0x8a26 38#define PCI_CHIP_PROSAVAGE_KM 0x8a26
39 /* Twister is a code name; hope I get the real name soon. */
40#define PCI_CHIP_S3TWISTER_P 0x8d01 39#define PCI_CHIP_S3TWISTER_P 0x8d01
41#define PCI_CHIP_S3TWISTER_K 0x8d02 40#define PCI_CHIP_S3TWISTER_K 0x8d02
42#define PCI_CHIP_PROSAVAGE_DDR 0x8d03 41#define PCI_CHIP_PROSAVAGE_DDR 0x8d03
@@ -52,14 +51,15 @@
52#define PCI_CHIP_SUPSAV_IXCDDR 0x8c2f 51#define PCI_CHIP_SUPSAV_IXCDDR 0x8c2f
53 52
54 53
54#define S3_SAVAGE_SERIES(chip) ((chip>=S3_SAVAGE3D) && (chip<=S3_SAVAGE2000))
55 55
56#define S3_SAVAGE3D_SERIES(chip) ((chip>=S3_SAVAGE3D) && (chip<=S3_SAVAGE_MX)) 56#define S3_SAVAGE3D_SERIES(chip) ((chip>=S3_SAVAGE3D) && (chip<=S3_SAVAGE_MX))
57 57
58#define S3_SAVAGE4_SERIES(chip) ((chip==S3_SAVAGE4) || (chip==S3_PROSAVAGE)) 58#define S3_SAVAGE4_SERIES(chip) ((chip>=S3_SAVAGE4) || (chip<=S3_PROSAVAGEDDR))
59 59
60#define S3_SAVAGE_MOBILE_SERIES(chip) ((chip==S3_SAVAGE_MX) || (chip==S3_SUPERSAVAGE)) 60#define S3_SAVAGE_MOBILE_SERIES(chip) ((chip==S3_SAVAGE_MX) || (chip==S3_SUPERSAVAGE))
61 61
62#define S3_SAVAGE_SERIES(chip) ((chip>=S3_SAVAGE3D) && (chip<=S3_SAVAGE2000)) 62#define S3_MOBILE_TWISTER_SERIES(chip) ((chip==S3_TWISTER) || (chip==S3_PROSAVAGEDDR))
63 63
64/* Chip tags. These are used to group the adapters into 64/* Chip tags. These are used to group the adapters into
65 * related families. 65 * related families.
@@ -71,6 +71,8 @@ typedef enum {
71 S3_SAVAGE_MX, 71 S3_SAVAGE_MX,
72 S3_SAVAGE4, 72 S3_SAVAGE4,
73 S3_PROSAVAGE, 73 S3_PROSAVAGE,
74 S3_TWISTER,
75 S3_PROSAVAGEDDR,
74 S3_SUPERSAVAGE, 76 S3_SUPERSAVAGE,
75 S3_SAVAGE2000, 77 S3_SAVAGE2000,
76 S3_LAST 78 S3_LAST
diff --git a/drivers/video/savage/savagefb_driver.c b/drivers/video/savage/savagefb_driver.c
index a2dc1a7ec758..7a35ceb2f8a0 100644
--- a/drivers/video/savage/savagefb_driver.c
+++ b/drivers/video/savage/savagefb_driver.c
@@ -328,7 +328,9 @@ SavageSetup2DEngine(struct savagefb_par *par)
328 savage_out32(0x48C18, savage_in32(0x48C18, par) | 0x0C, par); 328 savage_out32(0x48C18, savage_in32(0x48C18, par) | 0x0C, par);
329 break; 329 break;
330 case S3_SAVAGE4: 330 case S3_SAVAGE4:
331 case S3_TWISTER:
331 case S3_PROSAVAGE: 332 case S3_PROSAVAGE:
333 case S3_PROSAVAGEDDR:
332 case S3_SUPERSAVAGE: 334 case S3_SUPERSAVAGE:
333 /* Disable BCI */ 335 /* Disable BCI */
334 savage_out32(0x48C18, savage_in32(0x48C18, par) & 0x3FF0, par); 336 savage_out32(0x48C18, savage_in32(0x48C18, par) & 0x3FF0, par);
@@ -1886,6 +1888,8 @@ static int savage_init_hw(struct savagefb_par *par)
1886 break; 1888 break;
1887 1889
1888 case S3_PROSAVAGE: 1890 case S3_PROSAVAGE:
1891 case S3_PROSAVAGEDDR:
1892 case S3_TWISTER:
1889 videoRam = RamSavageNB[(config1 & 0xE0) >> 5] * 1024; 1893 videoRam = RamSavageNB[(config1 & 0xE0) >> 5] * 1024;
1890 break; 1894 break;
1891 1895
@@ -2111,19 +2115,19 @@ static int __devinit savage_init_fb_info(struct fb_info *info,
2111 snprintf(info->fix.id, 16, "ProSavageKM"); 2115 snprintf(info->fix.id, 16, "ProSavageKM");
2112 break; 2116 break;
2113 case FB_ACCEL_S3TWISTER_P: 2117 case FB_ACCEL_S3TWISTER_P:
2114 par->chip = S3_PROSAVAGE; 2118 par->chip = S3_TWISTER;
2115 snprintf(info->fix.id, 16, "TwisterP"); 2119 snprintf(info->fix.id, 16, "TwisterP");
2116 break; 2120 break;
2117 case FB_ACCEL_S3TWISTER_K: 2121 case FB_ACCEL_S3TWISTER_K:
2118 par->chip = S3_PROSAVAGE; 2122 par->chip = S3_TWISTER;
2119 snprintf(info->fix.id, 16, "TwisterK"); 2123 snprintf(info->fix.id, 16, "TwisterK");
2120 break; 2124 break;
2121 case FB_ACCEL_PROSAVAGE_DDR: 2125 case FB_ACCEL_PROSAVAGE_DDR:
2122 par->chip = S3_PROSAVAGE; 2126 par->chip = S3_PROSAVAGEDDR;
2123 snprintf(info->fix.id, 16, "ProSavageDDR"); 2127 snprintf(info->fix.id, 16, "ProSavageDDR");
2124 break; 2128 break;
2125 case FB_ACCEL_PROSAVAGE_DDRK: 2129 case FB_ACCEL_PROSAVAGE_DDRK:
2126 par->chip = S3_PROSAVAGE; 2130 par->chip = S3_PROSAVAGEDDR;
2127 snprintf(info->fix.id, 16, "ProSavage8"); 2131 snprintf(info->fix.id, 16, "ProSavage8");
2128 break; 2132 break;
2129 } 2133 }