diff options
author | Aaro Koskinen <aaro.koskinen@iki.fi> | 2011-03-13 06:26:09 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-03-14 14:52:25 -0400 |
commit | fd0ad4701a3d096e6caf609e15eecae1459cc4b4 (patch) | |
tree | f6af981defdb7ce787920a5dec0a15bacaec6bbf /drivers | |
parent | ebe7846def655647608993c9c295158766f2e301 (diff) |
staging: xgifb: delete dead code for chip types < XG40
XG40 is the first supported chip, so the code for earlier chips can
be dropped.
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/staging/xgifb/vb_init.c | 9 | ||||
-rw-r--r-- | drivers/staging/xgifb/vb_setmode.c | 216 |
2 files changed, 3 insertions, 222 deletions
diff --git a/drivers/staging/xgifb/vb_init.c b/drivers/staging/xgifb/vb_init.c index 7b8e00defd5..10c0a3bcbba 100644 --- a/drivers/staging/xgifb/vb_init.c +++ b/drivers/staging/xgifb/vb_init.c | |||
@@ -1409,9 +1409,7 @@ unsigned char XGIInitNew(struct xgi_hw_device_info *HwDeviceExtension) | |||
1409 | 1409 | ||
1410 | if (HwDeviceExtension->jChipType >= XG40) | 1410 | if (HwDeviceExtension->jChipType >= XG40) |
1411 | XGINew_RAMType = (int)XGINew_GetXG20DRAMType(HwDeviceExtension, pVBInfo); | 1411 | XGINew_RAMType = (int)XGINew_GetXG20DRAMType(HwDeviceExtension, pVBInfo); |
1412 | 1412 | */ | |
1413 | if (HwDeviceExtension->jChipType < XG40) | ||
1414 | XGINew_SetMemoryClock(HwDeviceExtension, pVBInfo); */ | ||
1415 | 1413 | ||
1416 | printk("11"); | 1414 | printk("11"); |
1417 | 1415 | ||
@@ -1494,9 +1492,6 @@ unsigned char XGIInitNew(struct xgi_hw_device_info *HwDeviceExtension) | |||
1494 | XGINew_SetReg1(pVBInfo->P3d4, 0x48, 0x20); /* CR48 */ | 1492 | XGINew_SetReg1(pVBInfo->P3d4, 0x48, 0x20); /* CR48 */ |
1495 | } | 1493 | } |
1496 | printk("14"); | 1494 | printk("14"); |
1497 | |||
1498 | if (HwDeviceExtension->jChipType < XG40) | ||
1499 | XGINew_SetReg1(pVBInfo->P3d4, 0x49, pVBInfo->CR49[0]); | ||
1500 | } /* != XG20 */ | 1495 | } /* != XG20 */ |
1501 | 1496 | ||
1502 | /* Set PCI */ | 1497 | /* Set PCI */ |
@@ -1552,8 +1547,6 @@ unsigned char XGIInitNew(struct xgi_hw_device_info *HwDeviceExtension) | |||
1552 | } /* != XG20 */ | 1547 | } /* != XG20 */ |
1553 | printk("18"); | 1548 | printk("18"); |
1554 | 1549 | ||
1555 | if (HwDeviceExtension->jChipType < XG40) | ||
1556 | XGINew_SetReg1(pVBInfo->P3d4, 0x83, 0x00); | ||
1557 | printk("181"); | 1550 | printk("181"); |
1558 | 1551 | ||
1559 | printk("182"); | 1552 | printk("182"); |
diff --git a/drivers/staging/xgifb/vb_setmode.c b/drivers/staging/xgifb/vb_setmode.c index 693be078595..4d5696349bc 100644 --- a/drivers/staging/xgifb/vb_setmode.c +++ b/drivers/staging/xgifb/vb_setmode.c | |||
@@ -6280,47 +6280,6 @@ static void XGI_SetGroup5(unsigned short ModeNo, unsigned short ModeIdIndex, | |||
6280 | return; | 6280 | return; |
6281 | } | 6281 | } |
6282 | 6282 | ||
6283 | /* --------------------------------------------------------------------- */ | ||
6284 | /* Function : XGI_BacklightByDrv */ | ||
6285 | /* Input : */ | ||
6286 | /* Output : 1 -> Skip backlight control */ | ||
6287 | /* Description : */ | ||
6288 | /* --------------------------------------------------------------------- */ | ||
6289 | static unsigned char XGI_BacklightByDrv(struct vb_device_info *pVBInfo) | ||
6290 | { | ||
6291 | unsigned char tempah; | ||
6292 | |||
6293 | tempah = (unsigned char) XGINew_GetReg1(pVBInfo->P3d4, 0x3A); | ||
6294 | if (tempah & BacklightControlBit) | ||
6295 | return 1; | ||
6296 | else | ||
6297 | return 0; | ||
6298 | } | ||
6299 | |||
6300 | /* --------------------------------------------------------------------- */ | ||
6301 | /* Function : XGI_FirePWDDisable */ | ||
6302 | /* Input : */ | ||
6303 | /* Output : */ | ||
6304 | /* Description : Turn off VDD & Backlight : Fire disable procedure */ | ||
6305 | /* --------------------------------------------------------------------- */ | ||
6306 | /* | ||
6307 | void XGI_FirePWDDisable(struct vb_device_info *pVBInfo) | ||
6308 | { | ||
6309 | XGINew_SetRegANDOR(pVBInfo->Part1Port, 0x26, 0x00, 0xFC); | ||
6310 | } | ||
6311 | */ | ||
6312 | |||
6313 | /* --------------------------------------------------------------------- */ | ||
6314 | /* Function : XGI_FirePWDEnable */ | ||
6315 | /* Input : */ | ||
6316 | /* Output : */ | ||
6317 | /* Description : Turn on VDD & Backlight : Fire enable procedure */ | ||
6318 | /* --------------------------------------------------------------------- */ | ||
6319 | static void XGI_FirePWDEnable(struct vb_device_info *pVBInfo) | ||
6320 | { | ||
6321 | XGINew_SetRegANDOR(pVBInfo->Part1Port, 0x26, 0x03, 0xFC); | ||
6322 | } | ||
6323 | |||
6324 | static void XGI_EnableGatingCRT(struct xgi_hw_device_info *HwDeviceExtension, | 6283 | static void XGI_EnableGatingCRT(struct xgi_hw_device_info *HwDeviceExtension, |
6325 | struct vb_device_info *pVBInfo) | 6284 | struct vb_device_info *pVBInfo) |
6326 | { | 6285 | { |
@@ -6334,54 +6293,6 @@ static void XGI_DisableGatingCRT(struct xgi_hw_device_info *HwDeviceExtension, | |||
6334 | XGINew_SetRegANDOR(pVBInfo->P3d4, 0x63, 0xBF, 0x00); | 6293 | XGINew_SetRegANDOR(pVBInfo->P3d4, 0x63, 0xBF, 0x00); |
6335 | } | 6294 | } |
6336 | 6295 | ||
6337 | /* --------------------------------------------------------------------- */ | ||
6338 | /* Function : XGI_SetPanelDelay */ | ||
6339 | /* Input : */ | ||
6340 | /* Output : */ | ||
6341 | /* Description : */ | ||
6342 | /* I/P : bl : 1 ; T1 : the duration between CPL on and signal on */ | ||
6343 | /* : bl : 2 ; T2 : the duration signal on and Vdd on */ | ||
6344 | /* : bl : 3 ; T3 : the duration between CPL off and signal off */ | ||
6345 | /* : bl : 4 ; T4 : the duration signal off and Vdd off */ | ||
6346 | /* --------------------------------------------------------------------- */ | ||
6347 | static void XGI_SetPanelDelay(unsigned short tempbl, struct vb_device_info *pVBInfo) | ||
6348 | { | ||
6349 | unsigned short index; | ||
6350 | |||
6351 | index = XGI_GetLCDCapPtr(pVBInfo); | ||
6352 | |||
6353 | if (tempbl == 1) | ||
6354 | mdelay(pVBInfo->LCDCapList[index].PSC_S1); | ||
6355 | |||
6356 | if (tempbl == 2) | ||
6357 | mdelay(pVBInfo->LCDCapList[index].PSC_S2); | ||
6358 | |||
6359 | if (tempbl == 3) | ||
6360 | mdelay(pVBInfo->LCDCapList[index].PSC_S3); | ||
6361 | |||
6362 | if (tempbl == 4) | ||
6363 | mdelay(pVBInfo->LCDCapList[index].PSC_S4); | ||
6364 | } | ||
6365 | |||
6366 | /* --------------------------------------------------------------------- */ | ||
6367 | /* Function : XGI_SetPanelPower */ | ||
6368 | /* Input : */ | ||
6369 | /* Output : */ | ||
6370 | /* Description : */ | ||
6371 | /* I/O : ah = 0011b = 03h ; Backlight on, Power on */ | ||
6372 | /* = 0111b = 07h ; Backlight on, Power off */ | ||
6373 | /* = 1011b = 0Bh ; Backlight off, Power on */ | ||
6374 | /* = 1111b = 0Fh ; Backlight off, Power off */ | ||
6375 | /* --------------------------------------------------------------------- */ | ||
6376 | static void XGI_SetPanelPower(unsigned short tempah, unsigned short tempbl, | ||
6377 | struct vb_device_info *pVBInfo) | ||
6378 | { | ||
6379 | if (pVBInfo->VBType & (VB_XGI301LV | VB_XGI302LV | VB_XGI301C)) | ||
6380 | XGINew_SetRegANDOR(pVBInfo->Part4Port, 0x26, tempbl, tempah); | ||
6381 | else | ||
6382 | XGINew_SetRegANDOR(pVBInfo->P3c4, 0x11, tempbl, tempah); | ||
6383 | } | ||
6384 | |||
6385 | /*----------------------------------------------------------------------------*/ | 6296 | /*----------------------------------------------------------------------------*/ |
6386 | /* input */ | 6297 | /* input */ |
6387 | /* bl[5] : 1;LVDS signal on */ | 6298 | /* bl[5] : 1;LVDS signal on */ |
@@ -6951,29 +6862,6 @@ static unsigned char XGI_IsLCDON(struct vb_device_info *pVBInfo) | |||
6951 | return 0; | 6862 | return 0; |
6952 | } | 6863 | } |
6953 | 6864 | ||
6954 | static void XGI_EnablePWD(struct vb_device_info *pVBInfo) | ||
6955 | { | ||
6956 | unsigned short index, temp; | ||
6957 | |||
6958 | index = XGI_GetLCDCapPtr(pVBInfo); | ||
6959 | temp = pVBInfo->LCDCapList[index].PWD_2B; | ||
6960 | XGINew_SetReg1(pVBInfo->Part4Port, 0x2B, temp); | ||
6961 | XGINew_SetReg1(pVBInfo->Part4Port, 0x2C, | ||
6962 | pVBInfo->LCDCapList[index].PWD_2C); | ||
6963 | XGINew_SetReg1(pVBInfo->Part4Port, 0x2D, | ||
6964 | pVBInfo->LCDCapList[index].PWD_2D); | ||
6965 | XGINew_SetReg1(pVBInfo->Part4Port, 0x2E, | ||
6966 | pVBInfo->LCDCapList[index].PWD_2E); | ||
6967 | XGINew_SetReg1(pVBInfo->Part4Port, 0x2F, | ||
6968 | pVBInfo->LCDCapList[index].PWD_2F); | ||
6969 | XGINew_SetRegOR(pVBInfo->Part4Port, 0x27, 0x80); /* enable PWD */ | ||
6970 | } | ||
6971 | |||
6972 | static void XGI_DisablePWD(struct vb_device_info *pVBInfo) | ||
6973 | { | ||
6974 | XGINew_SetRegAND(pVBInfo->Part4Port, 0x27, 0x7F); /* disable PWD */ | ||
6975 | } | ||
6976 | |||
6977 | /* --------------------------------------------------------------------- */ | 6865 | /* --------------------------------------------------------------------- */ |
6978 | /* Function : XGI_DisableChISLCD */ | 6866 | /* Function : XGI_DisableChISLCD */ |
6979 | /* Input : */ | 6867 | /* Input : */ |
@@ -7031,37 +6919,11 @@ static unsigned char XGI_EnableChISLCD(struct vb_device_info *pVBInfo) | |||
7031 | void XGI_DisableBridge(struct xgi_hw_device_info *HwDeviceExtension, | 6919 | void XGI_DisableBridge(struct xgi_hw_device_info *HwDeviceExtension, |
7032 | struct vb_device_info *pVBInfo) | 6920 | struct vb_device_info *pVBInfo) |
7033 | { | 6921 | { |
7034 | unsigned short tempax, tempbx, tempah = 0, tempbl = 0; | 6922 | unsigned short tempah = 0; |
7035 | 6923 | ||
7036 | if (pVBInfo->SetFlag == Win9xDOSMode) | 6924 | if (pVBInfo->SetFlag == Win9xDOSMode) |
7037 | return; | 6925 | return; |
7038 | 6926 | ||
7039 | if (HwDeviceExtension->jChipType < XG40) { | ||
7040 | if ((!(pVBInfo->VBInfo & (SetCRT2ToLCD | SetCRT2ToLCDA))) | ||
7041 | || (XGI_DisableChISLCD(pVBInfo))) { | ||
7042 | if (!XGI_IsLCDON(pVBInfo)) { | ||
7043 | if (pVBInfo->LCDInfo & SetPWDEnable) | ||
7044 | XGI_EnablePWD(pVBInfo); | ||
7045 | else { | ||
7046 | pVBInfo->LCDInfo &= ~SetPWDEnable; | ||
7047 | XGI_DisablePWD(pVBInfo); | ||
7048 | if (pVBInfo->VBType & (VB_XGI301LV | ||
7049 | | VB_XGI302LV | ||
7050 | | VB_XGI301C)) { | ||
7051 | tempbx = 0xFE; /* not 01h */ | ||
7052 | tempax = 0; | ||
7053 | } else { | ||
7054 | tempbx = 0xF7; /* not 08h */ | ||
7055 | tempax = 0x08; | ||
7056 | } | ||
7057 | XGI_SetPanelPower(tempax, tempbx, | ||
7058 | pVBInfo); | ||
7059 | XGI_SetPanelDelay(3, pVBInfo); | ||
7060 | } | ||
7061 | } /* end if (!XGI_IsLCDON(pVBInfo)) */ | ||
7062 | } | ||
7063 | } | ||
7064 | |||
7065 | /* | 6927 | /* |
7066 | if (CH7017) { | 6928 | if (CH7017) { |
7067 | if (!(pVBInfo->VBInfo & (SetCRT2ToLCD | SetCRT2toLCDA)) || (XGI_DisableChISLCD(pVBInfo))) { | 6929 | if (!(pVBInfo->VBInfo & (SetCRT2ToLCD | SetCRT2toLCDA)) || (XGI_DisableChISLCD(pVBInfo))) { |
@@ -7155,28 +7017,6 @@ void XGI_DisableBridge(struct xgi_hw_device_info *HwDeviceExtension, | |||
7155 | | SetSimuScanMode)) | 7017 | | SetSimuScanMode)) |
7156 | XGI_DisplayOff(HwDeviceExtension, pVBInfo); | 7018 | XGI_DisplayOff(HwDeviceExtension, pVBInfo); |
7157 | } | 7019 | } |
7158 | |||
7159 | if (HwDeviceExtension->jChipType < XG40) { | ||
7160 | if (!(pVBInfo->VBInfo & (SetCRT2ToLCD | SetCRT2ToLCDA)) | ||
7161 | || (XGI_DisableChISLCD(pVBInfo)) | ||
7162 | || (XGI_IsLCDON(pVBInfo))) { | ||
7163 | if (pVBInfo->LCDInfo & SetPWDEnable) { | ||
7164 | if (pVBInfo->LCDInfo & SetPWDEnable) | ||
7165 | XGI_BacklightByDrv(pVBInfo); | ||
7166 | else { | ||
7167 | XGI_SetPanelDelay(4, pVBInfo); | ||
7168 | if (pVBInfo->VBType & VB_XGI301LV) { | ||
7169 | tempbl = 0xFD; | ||
7170 | tempah = 0x00; | ||
7171 | } else { | ||
7172 | tempbl = 0xFB; | ||
7173 | tempah = 0x04; | ||
7174 | } | ||
7175 | } | ||
7176 | } | ||
7177 | XGI_SetPanelPower(tempah, tempbl, pVBInfo); | ||
7178 | } | ||
7179 | } | ||
7180 | } | 7020 | } |
7181 | 7021 | ||
7182 | /* --------------------------------------------------------------------- */ | 7022 | /* --------------------------------------------------------------------- */ |
@@ -8220,7 +8060,7 @@ void XGI_SenseCRT1(struct vb_device_info *pVBInfo) | |||
8220 | void XGI_EnableBridge(struct xgi_hw_device_info *HwDeviceExtension, | 8060 | void XGI_EnableBridge(struct xgi_hw_device_info *HwDeviceExtension, |
8221 | struct vb_device_info *pVBInfo) | 8061 | struct vb_device_info *pVBInfo) |
8222 | { | 8062 | { |
8223 | unsigned short tempbl, tempah; | 8063 | unsigned short tempah; |
8224 | 8064 | ||
8225 | if (pVBInfo->SetFlag == Win9xDOSMode) { | 8065 | if (pVBInfo->SetFlag == Win9xDOSMode) { |
8226 | if (pVBInfo->VBType & (VB_XGI301B | VB_XGI302B | VB_XGI301LV | 8066 | if (pVBInfo->VBType & (VB_XGI301B | VB_XGI302B | VB_XGI301LV |
@@ -8232,32 +8072,6 @@ void XGI_EnableBridge(struct xgi_hw_device_info *HwDeviceExtension, | |||
8232 | return; | 8072 | return; |
8233 | } | 8073 | } |
8234 | 8074 | ||
8235 | if (HwDeviceExtension->jChipType < XG40) { | ||
8236 | if (!XGI_DisableChISLCD(pVBInfo)) { | ||
8237 | if ((XGI_EnableChISLCD(pVBInfo)) || (pVBInfo->VBInfo | ||
8238 | & (SetCRT2ToLCD | SetCRT2ToLCDA))) { | ||
8239 | if (pVBInfo->LCDInfo & SetPWDEnable) { | ||
8240 | XGI_EnablePWD(pVBInfo); | ||
8241 | } else { | ||
8242 | pVBInfo->LCDInfo &= (~SetPWDEnable); | ||
8243 | if (pVBInfo->VBType & (VB_XGI301LV | ||
8244 | | VB_XGI302LV | ||
8245 | | VB_XGI301C)) { | ||
8246 | tempbl = 0xFD; | ||
8247 | tempah = 0x02; | ||
8248 | } else { | ||
8249 | tempbl = 0xFB; | ||
8250 | tempah = 0x00; | ||
8251 | } | ||
8252 | |||
8253 | XGI_SetPanelPower(tempah, tempbl, | ||
8254 | pVBInfo); | ||
8255 | XGI_SetPanelDelay(1, pVBInfo); | ||
8256 | } | ||
8257 | } | ||
8258 | } | ||
8259 | } /* Not 340 */ | ||
8260 | |||
8261 | if (pVBInfo->VBType & (VB_XGI301B | VB_XGI302B | VB_XGI301LV | 8075 | if (pVBInfo->VBType & (VB_XGI301B | VB_XGI302B | VB_XGI301LV |
8262 | | VB_XGI302LV | VB_XGI301C)) { | 8076 | | VB_XGI302LV | VB_XGI301C)) { |
8263 | if (!(pVBInfo->SetFlag & DisableChA)) { | 8077 | if (!(pVBInfo->SetFlag & DisableChA)) { |
@@ -8376,32 +8190,6 @@ void XGI_EnableBridge(struct xgi_hw_device_info *HwDeviceExtension, | |||
8376 | XGINew_SetRegAND(pVBInfo->Part1Port, 0x00, 0x7F); | 8190 | XGINew_SetRegAND(pVBInfo->Part1Port, 0x00, 0x7F); |
8377 | XGI_DisplayOn(HwDeviceExtension, pVBInfo); | 8191 | XGI_DisplayOn(HwDeviceExtension, pVBInfo); |
8378 | } /* End of VB */ | 8192 | } /* End of VB */ |
8379 | |||
8380 | if (HwDeviceExtension->jChipType < XG40) { | ||
8381 | if (!XGI_EnableChISLCD(pVBInfo)) { | ||
8382 | if (pVBInfo->VBInfo & (SetCRT2ToLCD | SetCRT2ToLCDA)) { | ||
8383 | if (XGI_BacklightByDrv(pVBInfo)) | ||
8384 | return; | ||
8385 | } else | ||
8386 | return; | ||
8387 | } | ||
8388 | |||
8389 | if (pVBInfo->LCDInfo & SetPWDEnable) { | ||
8390 | XGI_FirePWDEnable(pVBInfo); | ||
8391 | return; | ||
8392 | } | ||
8393 | |||
8394 | XGI_SetPanelDelay(2, pVBInfo); | ||
8395 | |||
8396 | if (pVBInfo->VBType & (VB_XGI301LV | VB_XGI302LV | VB_XGI301C)) { | ||
8397 | tempah = 0x01; | ||
8398 | tempbl = 0xFE; /* turn on backlght */ | ||
8399 | } else { | ||
8400 | tempbl = 0xF7; | ||
8401 | tempah = 0x00; | ||
8402 | } | ||
8403 | XGI_SetPanelPower(tempah, tempbl, pVBInfo); | ||
8404 | } | ||
8405 | } | 8193 | } |
8406 | 8194 | ||
8407 | static void XGI_SetCRT1Group(struct xgi_hw_device_info *HwDeviceExtension, | 8195 | static void XGI_SetCRT1Group(struct xgi_hw_device_info *HwDeviceExtension, |