sisfb: use CONFIG_FB_SIS_301/315 instead of SIS301/315H

There is no need to alias CONFIG #defines.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Cc: Thomas Winischhofer <thomas@winischhofer.net>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>

authored by Aaro Koskinen and committed by Paul Mundt f7854e5d b6c30ca6

+193 -201
+37 -37
drivers/video/sis/init.c
··· 62 62 63 63 #include "init.h" 64 64 65 - #ifdef SIS300 65 + #ifdef CONFIG_FB_SIS_300 66 66 #include "300vtbl.h" 67 67 #endif 68 68 69 - #ifdef SIS315H 69 + #ifdef CONFIG_FB_SIS_315 70 70 #include "310vtbl.h" 71 71 #endif 72 72 ··· 78 78 /* POINTER INITIALIZATION */ 79 79 /*********************************************/ 80 80 81 - #if defined(SIS300) || defined(SIS315H) 81 + #if defined(CONFIG_FB_SIS_300) || defined(CONFIG_FB_SIS_315) 82 82 static void 83 83 InitCommonPointer(struct SiS_Private *SiS_Pr) 84 84 { ··· 160 160 } 161 161 #endif 162 162 163 - #ifdef SIS300 163 + #ifdef CONFIG_FB_SIS_300 164 164 static void 165 165 InitTo300Pointer(struct SiS_Private *SiS_Pr) 166 166 { ··· 237 237 } 238 238 #endif 239 239 240 - #ifdef SIS315H 240 + #ifdef CONFIG_FB_SIS_315 241 241 static void 242 242 InitTo310Pointer(struct SiS_Private *SiS_Pr) 243 243 { ··· 321 321 SiSInitPtr(struct SiS_Private *SiS_Pr) 322 322 { 323 323 if(SiS_Pr->ChipType < SIS_315H) { 324 - #ifdef SIS300 324 + #ifdef CONFIG_FB_SIS_300 325 325 InitTo300Pointer(SiS_Pr); 326 326 #else 327 327 return false; 328 328 #endif 329 329 } else { 330 - #ifdef SIS315H 330 + #ifdef CONFIG_FB_SIS_315 331 331 InitTo310Pointer(SiS_Pr); 332 332 #else 333 333 return false; ··· 1087 1087 SiSInitPCIetc(struct SiS_Private *SiS_Pr) 1088 1088 { 1089 1089 switch(SiS_Pr->ChipType) { 1090 - #ifdef SIS300 1090 + #ifdef CONFIG_FB_SIS_300 1091 1091 case SIS_300: 1092 1092 case SIS_540: 1093 1093 case SIS_630: ··· 1106 1106 SiS_SetRegOR(SiS_Pr->SiS_P3c4,0x1E,0x5A); 1107 1107 break; 1108 1108 #endif 1109 - #ifdef SIS315H 1109 + #ifdef CONFIG_FB_SIS_315 1110 1110 case SIS_315H: 1111 1111 case SIS_315: 1112 1112 case SIS_315PRO: ··· 1170 1170 if((temp == 1) || (temp == 2)) return; 1171 1171 1172 1172 switch(SiS_Pr->ChipType) { 1173 - #ifdef SIS300 1173 + #ifdef CONFIG_FB_SIS_300 1174 1174 case SIS_540: 1175 1175 case SIS_630: 1176 1176 case SIS_730: ··· 1184 1184 } 1185 1185 break; 1186 1186 #endif 1187 - #ifdef SIS315H 1187 + #ifdef CONFIG_FB_SIS_315 1188 1188 case SIS_550: 1189 1189 case SIS_650: 1190 1190 case SIS_740: ··· 1499 1499 /* HELPER: Get DRAM type */ 1500 1500 /*********************************************/ 1501 1501 1502 - #ifdef SIS315H 1502 + #ifdef CONFIG_FB_SIS_315 1503 1503 static unsigned char 1504 1504 SiS_Get310DRAMType(struct SiS_Private *SiS_Pr) 1505 1505 { ··· 2122 2122 SiS_SetReg(SiS_Pr->SiS_P3d4,0x14,0x4F); 2123 2123 } 2124 2124 2125 - #ifdef SIS315H 2125 + #ifdef CONFIG_FB_SIS_315 2126 2126 if(SiS_Pr->ChipType == XGI_20) { 2127 2127 SiS_SetReg(SiS_Pr->SiS_P3d4,0x04,crt1data[4] - 1); 2128 2128 if(!(temp = crt1data[5] & 0x1f)) { ··· 2205 2205 SiS_SetReg(SiS_Pr->SiS_P3c4,0x2c,clkb); 2206 2206 2207 2207 if(SiS_Pr->ChipType >= SIS_315H) { 2208 - #ifdef SIS315H 2208 + #ifdef CONFIG_FB_SIS_315 2209 2209 SiS_SetReg(SiS_Pr->SiS_P3c4,0x2D,0x01); 2210 2210 if(SiS_Pr->ChipType == XGI_20) { 2211 2211 unsigned short mf = SiS_GetModeFlag(SiS_Pr, ModeNo, ModeIdIndex); ··· 2226 2226 /* FIFO */ 2227 2227 /*********************************************/ 2228 2228 2229 - #ifdef SIS300 2229 + #ifdef CONFIG_FB_SIS_300 2230 2230 void 2231 2231 SiS_GetFIFOThresholdIndex300(struct SiS_Private *SiS_Pr, unsigned short *idx1, 2232 2232 unsigned short *idx2) ··· 2535 2535 2536 2536 sisfb_write_nbridge_pci_dword(SiS_Pr, 0xA0, templ); 2537 2537 } 2538 - #endif /* SIS300 */ 2538 + #endif /* CONFIG_FB_SIS_300 */ 2539 2539 2540 - #ifdef SIS315H 2540 + #ifdef CONFIG_FB_SIS_315 2541 2541 static void 2542 2542 SiS_SetCRT1FIFO_310(struct SiS_Private *SiS_Pr, unsigned short ModeNo, unsigned short ModeIdIndex) 2543 2543 { ··· 2589 2589 } 2590 2590 2591 2591 if(SiS_Pr->ChipType < SIS_315H) { 2592 - #ifdef SIS300 2592 + #ifdef CONFIG_FB_SIS_300 2593 2593 if(VCLK > 150) data |= 0x80; 2594 2594 SiS_SetRegANDOR(SiS_Pr->SiS_P3c4,0x07,0x7B,data); 2595 2595 ··· 2598 2598 SiS_SetRegANDOR(SiS_Pr->SiS_P3c4,0x32,0xF7,data); 2599 2599 #endif 2600 2600 } else if(SiS_Pr->ChipType < XGI_20) { 2601 - #ifdef SIS315H 2601 + #ifdef CONFIG_FB_SIS_315 2602 2602 if(VCLK >= 166) data |= 0x0c; 2603 2603 SiS_SetRegANDOR(SiS_Pr->SiS_P3c4,0x32,0xf3,data); 2604 2604 ··· 2607 2607 } 2608 2608 #endif 2609 2609 } else { 2610 - #ifdef SIS315H 2610 + #ifdef CONFIG_FB_SIS_315 2611 2611 if(VCLK >= 200) data |= 0x0c; 2612 2612 if(SiS_Pr->ChipType == XGI_20) data &= ~0x04; 2613 2613 SiS_SetRegANDOR(SiS_Pr->SiS_P3c4,0x32,0xf3,data); ··· 2652 2652 unsigned short ModeIdIndex, unsigned short RRTI) 2653 2653 { 2654 2654 unsigned short data, infoflag = 0, modeflag, resindex; 2655 - #ifdef SIS315H 2655 + #ifdef CONFIG_FB_SIS_315 2656 2656 unsigned char *ROMAddr = SiS_Pr->VirtualRomBase; 2657 2657 unsigned short data2, data3; 2658 2658 #endif ··· 2713 2713 SiS_SetRegANDOR(SiS_Pr->SiS_P3c4,0x0F,0xB7,data); 2714 2714 } 2715 2715 2716 - #ifdef SIS315H 2716 + #ifdef CONFIG_FB_SIS_315 2717 2717 if(SiS_Pr->ChipType >= SIS_315H) { 2718 2718 SiS_SetRegAND(SiS_Pr->SiS_P3c4,0x31,0xfb); 2719 2719 } ··· 2803 2803 2804 2804 SiS_SetVCLKState(SiS_Pr, ModeNo, RRTI, ModeIdIndex); 2805 2805 2806 - #ifdef SIS315H 2806 + #ifdef CONFIG_FB_SIS_315 2807 2807 if(((SiS_Pr->ChipType >= SIS_315H) && (SiS_Pr->ChipType < SIS_661)) || 2808 2808 (SiS_Pr->ChipType == XGI_40)) { 2809 2809 if(SiS_GetReg(SiS_Pr->SiS_P3d4,0x31) & 0x40) { ··· 2822 2822 #endif 2823 2823 } 2824 2824 2825 - #ifdef SIS315H 2825 + #ifdef CONFIG_FB_SIS_315 2826 2826 static void 2827 2827 SiS_SetupDualChip(struct SiS_Private *SiS_Pr) 2828 2828 { ··· 3000 3000 } 3001 3001 3002 3002 switch(SiS_Pr->ChipType) { 3003 - #ifdef SIS300 3003 + #ifdef CONFIG_FB_SIS_300 3004 3004 case SIS_300: 3005 3005 SiS_SetCRT1FIFO_300(SiS_Pr, ModeNo, RefreshRateTableIndex); 3006 3006 break; ··· 3011 3011 break; 3012 3012 #endif 3013 3013 default: 3014 - #ifdef SIS315H 3014 + #ifdef CONFIG_FB_SIS_315 3015 3015 if(SiS_Pr->ChipType == XGI_20) { 3016 3016 unsigned char sr2b = 0, sr2c = 0; 3017 3017 switch(ModeNo) { ··· 3034 3034 3035 3035 SiS_SetCRT1ModeRegs(SiS_Pr, ModeNo, ModeIdIndex, RefreshRateTableIndex); 3036 3036 3037 - #ifdef SIS315H 3037 + #ifdef CONFIG_FB_SIS_315 3038 3038 if(SiS_Pr->ChipType == XGI_40) { 3039 3039 SiS_SetupDualChip(SiS_Pr); 3040 3040 } ··· 3074 3074 static void 3075 3075 SiS_ResetVB(struct SiS_Private *SiS_Pr) 3076 3076 { 3077 - #ifdef SIS315H 3077 + #ifdef CONFIG_FB_SIS_315 3078 3078 unsigned char *ROMAddr = SiS_Pr->VirtualRomBase; 3079 3079 unsigned short temp; 3080 3080 ··· 3109 3109 * which locks CRT2 in some way to CRT1 timing. Disable 3110 3110 * this here. 3111 3111 */ 3112 - #ifdef SIS315H 3112 + #ifdef CONFIG_FB_SIS_315 3113 3113 if((IS_SIS651) || (IS_SISM650) || 3114 3114 SiS_Pr->ChipType == SIS_340 || 3115 3115 SiS_Pr->ChipType == XGI_40) { ··· 3130 3130 static void 3131 3131 SiS_Handle760(struct SiS_Private *SiS_Pr) 3132 3132 { 3133 - #ifdef SIS315H 3133 + #ifdef CONFIG_FB_SIS_315 3134 3134 unsigned int somebase; 3135 3135 unsigned char temp1, temp2, temp3; 3136 3136 ··· 3272 3272 SiS_DisplayOn(SiS_Pr); 3273 3273 SiS_SetRegByte(SiS_Pr->SiS_P3c6,0xFF); 3274 3274 3275 - #ifdef SIS315H 3275 + #ifdef CONFIG_FB_SIS_315 3276 3276 if(SiS_Pr->ChipType >= SIS_315H) { 3277 3277 if(SiS_Pr->SiS_IF_DEF_LVDS == 1) { 3278 3278 if(!(SiS_IsDualEdge(SiS_Pr))) { ··· 3284 3284 3285 3285 if(SiS_Pr->SiS_VBType & VB_SIS30xBLV) { 3286 3286 if(SiS_Pr->ChipType >= SIS_315H) { 3287 - #ifdef SIS315H 3287 + #ifdef CONFIG_FB_SIS_315 3288 3288 if(!SiS_Pr->SiS_ROMNew) { 3289 3289 if(SiS_IsVAMode(SiS_Pr)) { 3290 3290 SiS_SetRegOR(SiS_Pr->SiS_P3d4,0x35,0x01); ··· 3407 3407 SiS_Pr->CVBlankStart = SiS_Pr->SiS_VGAVDE; 3408 3408 3409 3409 if(SiS_Pr->ChipType < SIS_315H) { 3410 - #ifdef SIS300 3410 + #ifdef CONFIG_FB_SIS_300 3411 3411 tempbx = SiS_Pr->SiS_VGAHT; 3412 3412 if(SiS_Pr->SiS_LCDInfo & DontExpandLCD) { 3413 3413 tempbx = SiS_Pr->PanelHT; ··· 3416 3416 remaining = tempbx % 8; 3417 3417 #endif 3418 3418 } else { 3419 - #ifdef SIS315H 3419 + #ifdef CONFIG_FB_SIS_315 3420 3420 /* OK for LCDA, LVDS */ 3421 3421 tempbx = SiS_Pr->PanelHT - SiS_Pr->PanelXRes; 3422 3422 tempax = SiS_Pr->SiS_VGAHDE; /* not /2 ! */ ··· 3430 3430 SiS_Pr->CHTotal = SiS_Pr->CHBlankEnd = tempbx; 3431 3431 3432 3432 if(SiS_Pr->ChipType < SIS_315H) { 3433 - #ifdef SIS300 3433 + #ifdef CONFIG_FB_SIS_300 3434 3434 if(SiS_Pr->SiS_VGAHDE == SiS_Pr->PanelXRes) { 3435 3435 SiS_Pr->CHSyncStart = SiS_Pr->SiS_VGAHDE + ((SiS_Pr->PanelHRS + 1) & ~1); 3436 3436 SiS_Pr->CHSyncEnd = SiS_Pr->CHSyncStart + SiS_Pr->PanelHRE; ··· 3462 3462 } 3463 3463 #endif 3464 3464 } else { 3465 - #ifdef SIS315H 3465 + #ifdef CONFIG_FB_SIS_315 3466 3466 tempax = VGAHDE; 3467 3467 if(SiS_Pr->SiS_LCDInfo & DontExpandLCD) { 3468 3468 tempbx = SiS_Pr->PanelXRes; ··· 3481 3481 if(SiS_Pr->SiS_LCDInfo & DontExpandLCD) { 3482 3482 tempax = SiS_Pr->PanelYRes; 3483 3483 } else if(SiS_Pr->ChipType < SIS_315H) { 3484 - #ifdef SIS300 3484 + #ifdef CONFIG_FB_SIS_300 3485 3485 /* Stupid hack for 640x400/320x200 */ 3486 3486 if(SiS_Pr->SiS_LCDResInfo == Panel_1024x768) { 3487 3487 if((tempax + tempbx) == 438) tempbx += 16;
+4 -4
drivers/video/sis/init.h
··· 273 273 { 1280, 854, 8,16} /* 0x22 */ 274 274 }; 275 275 276 - #if defined(SIS300) || defined(SIS315H) 276 + #if defined(CONFIG_FB_SIS_300) || defined(CONFIG_FB_SIS_315) 277 277 static const struct SiS_StandTable_S SiS_StandTable[]= 278 278 { 279 279 /* 0x00: MD_0_200 */ ··· 1549 1549 unsigned short ModeIdIndex); 1550 1550 unsigned short SiS_GetOffset(struct SiS_Private *SiS_Pr,unsigned short ModeNo, 1551 1551 unsigned short ModeIdIndex, unsigned short RRTI); 1552 - #ifdef SIS300 1552 + #ifdef CONFIG_FB_SIS_300 1553 1553 void SiS_GetFIFOThresholdIndex300(struct SiS_Private *SiS_Pr, unsigned short *idx1, 1554 1554 unsigned short *idx2); 1555 1555 unsigned short SiS_GetFIFOThresholdB300(unsigned short idx1, unsigned short idx2); ··· 1585 1585 extern bool SiS_IsVAMode(struct SiS_Private *); 1586 1586 extern bool SiS_IsDualEdge(struct SiS_Private *); 1587 1587 1588 - #ifdef SIS300 1588 + #ifdef CONFIG_FB_SIS_300 1589 1589 extern unsigned int sisfb_read_nbridge_pci_dword(struct SiS_Private *SiS_Pr, int reg); 1590 1590 extern void sisfb_write_nbridge_pci_dword(struct SiS_Private *SiS_Pr, int reg, 1591 1591 unsigned int val); 1592 1592 #endif 1593 - #ifdef SIS315H 1593 + #ifdef CONFIG_FB_SIS_315 1594 1594 extern void sisfb_write_nbridge_pci_byte(struct SiS_Private *SiS_Pr, int reg, 1595 1595 unsigned char val); 1596 1596 extern unsigned int sisfb_read_mio_pci_word(struct SiS_Private *SiS_Pr, int reg);
+141 -141
drivers/video/sis/init301.c
··· 75 75 76 76 #include "init301.h" 77 77 78 - #ifdef SIS300 78 + #ifdef CONFIG_FB_SIS_300 79 79 #include "oem300.h" 80 80 #endif 81 81 82 - #ifdef SIS315H 82 + #ifdef CONFIG_FB_SIS_315 83 83 #include "oem310.h" 84 84 #endif 85 85 ··· 134 134 /* HELPER: Get Pointer to LCD structure */ 135 135 /*********************************************/ 136 136 137 - #ifdef SIS315H 137 + #ifdef CONFIG_FB_SIS_315 138 138 static unsigned char * 139 139 GetLCDStructPtr661(struct SiS_Private *SiS_Pr) 140 140 { ··· 400 400 /* HELPER: GET SOME DATA FROM BIOS ROM */ 401 401 /*********************************************/ 402 402 403 - #ifdef SIS300 403 + #ifdef CONFIG_FB_SIS_300 404 404 static bool 405 405 SiS_CR36BIOSWord23b(struct SiS_Private *SiS_Pr) 406 406 { ··· 445 445 SiS_GetReg(SiS_Pr->SiS_P3c4, 0x05); 446 446 } 447 447 448 - #if defined(SIS300) || defined(SIS315H) 448 + #if defined(CONFIG_FB_SIS_300) || defined(CONFIG_FB_SIS_315) 449 449 static void 450 450 SiS_GenericDelay(struct SiS_Private *SiS_Pr, unsigned short delay) 451 451 { ··· 453 453 } 454 454 #endif 455 455 456 - #ifdef SIS315H 456 + #ifdef CONFIG_FB_SIS_315 457 457 static void 458 458 SiS_LongDelay(struct SiS_Private *SiS_Pr, unsigned short delay) 459 459 { ··· 463 463 } 464 464 #endif 465 465 466 - #if defined(SIS300) || defined(SIS315H) 466 + #if defined(CONFIG_FB_SIS_300) || defined(CONFIG_FB_SIS_315) 467 467 static void 468 468 SiS_ShortDelay(struct SiS_Private *SiS_Pr, unsigned short delay) 469 469 { ··· 476 476 static void 477 477 SiS_PanelDelay(struct SiS_Private *SiS_Pr, unsigned short DelayTime) 478 478 { 479 - #if defined(SIS300) || defined(SIS315H) 479 + #if defined(CONFIG_FB_SIS_300) || defined(CONFIG_FB_SIS_315) 480 480 unsigned char *ROMAddr = SiS_Pr->VirtualRomBase; 481 481 unsigned short PanelID, DelayIndex, Delay=0; 482 482 #endif 483 483 484 484 if(SiS_Pr->ChipType < SIS_315H) { 485 485 486 - #ifdef SIS300 486 + #ifdef CONFIG_FB_SIS_300 487 487 488 488 PanelID = SiS_GetReg(SiS_Pr->SiS_P3d4,0x36); 489 489 if(SiS_Pr->SiS_VBType & VB_SISVB) { ··· 509 509 } 510 510 SiS_ShortDelay(SiS_Pr, Delay); 511 511 512 - #endif /* SIS300 */ 512 + #endif /* CONFIG_FB_SIS_300 */ 513 513 514 514 } else { 515 515 516 - #ifdef SIS315H 516 + #ifdef CONFIG_FB_SIS_315 517 517 518 518 if((SiS_Pr->ChipType >= SIS_661) || 519 519 (SiS_Pr->ChipType <= SIS_315PRO) || ··· 575 575 576 576 } 577 577 578 - #endif /* SIS315H */ 578 + #endif /* CONFIG_FB_SIS_315 */ 579 579 580 580 } 581 581 } 582 582 583 - #ifdef SIS315H 583 + #ifdef CONFIG_FB_SIS_315 584 584 static void 585 585 SiS_PanelDelayLoop(struct SiS_Private *SiS_Pr, unsigned short DelayTime, unsigned short DelayLoop) 586 586 { ··· 609 609 while((!(SiS_GetRegByte(SiS_Pr->SiS_P3da) & 0x08)) && --watchdog); 610 610 } 611 611 612 - #if defined(SIS300) || defined(SIS315H) 612 + #if defined(CONFIG_FB_SIS_300) || defined(CONFIG_FB_SIS_315) 613 613 static void 614 614 SiS_WaitRetrace2(struct SiS_Private *SiS_Pr, unsigned short reg) 615 615 { ··· 626 626 SiS_WaitVBRetrace(struct SiS_Private *SiS_Pr) 627 627 { 628 628 if(SiS_Pr->ChipType < SIS_315H) { 629 - #ifdef SIS300 629 + #ifdef CONFIG_FB_SIS_300 630 630 if(SiS_Pr->SiS_VBType & VB_SIS30xBLV) { 631 631 if(!(SiS_GetReg(SiS_Pr->SiS_Part1Port,0x00) & 0x20)) return; 632 632 } ··· 637 637 } 638 638 #endif 639 639 } else { 640 - #ifdef SIS315H 640 + #ifdef CONFIG_FB_SIS_315 641 641 if(!(SiS_GetReg(SiS_Pr->SiS_Part1Port,0x00) & 0x40)) { 642 642 SiS_WaitRetrace1(SiS_Pr); 643 643 } else { ··· 682 682 /* HELPER: MISC */ 683 683 /*********************************************/ 684 684 685 - #ifdef SIS300 685 + #ifdef CONFIG_FB_SIS_300 686 686 static bool 687 687 SiS_Is301B(struct SiS_Private *SiS_Pr) 688 688 { ··· 704 704 bool 705 705 SiS_IsDualEdge(struct SiS_Private *SiS_Pr) 706 706 { 707 - #ifdef SIS315H 707 + #ifdef CONFIG_FB_SIS_315 708 708 if(SiS_Pr->ChipType >= SIS_315H) { 709 709 if((SiS_Pr->ChipType != SIS_650) || (SiS_GetReg(SiS_Pr->SiS_P3d4,0x5f) & 0xf0)) { 710 710 if(SiS_GetReg(SiS_Pr->SiS_P3d4,0x38) & EnableDualEdge) return true; ··· 717 717 bool 718 718 SiS_IsVAMode(struct SiS_Private *SiS_Pr) 719 719 { 720 - #ifdef SIS315H 720 + #ifdef CONFIG_FB_SIS_315 721 721 unsigned short flag; 722 722 723 723 if(SiS_Pr->ChipType >= SIS_315H) { ··· 728 728 return false; 729 729 } 730 730 731 - #ifdef SIS315H 731 + #ifdef CONFIG_FB_SIS_315 732 732 static bool 733 733 SiS_IsVAorLCD(struct SiS_Private *SiS_Pr) 734 734 { ··· 741 741 static bool 742 742 SiS_IsDualLink(struct SiS_Private *SiS_Pr) 743 743 { 744 - #ifdef SIS315H 744 + #ifdef CONFIG_FB_SIS_315 745 745 if(SiS_Pr->ChipType >= SIS_315H) { 746 746 if((SiS_CRT2IsLCD(SiS_Pr)) || 747 747 (SiS_IsVAMode(SiS_Pr))) { ··· 752 752 return false; 753 753 } 754 754 755 - #ifdef SIS315H 755 + #ifdef CONFIG_FB_SIS_315 756 756 static bool 757 757 SiS_TVEnabled(struct SiS_Private *SiS_Pr) 758 758 { ··· 764 764 } 765 765 #endif 766 766 767 - #ifdef SIS315H 767 + #ifdef CONFIG_FB_SIS_315 768 768 static bool 769 769 SiS_LCDAEnabled(struct SiS_Private *SiS_Pr) 770 770 { ··· 773 773 } 774 774 #endif 775 775 776 - #ifdef SIS315H 776 + #ifdef CONFIG_FB_SIS_315 777 777 static bool 778 778 SiS_WeHaveBacklightCtrl(struct SiS_Private *SiS_Pr) 779 779 { ··· 784 784 } 785 785 #endif 786 786 787 - #ifdef SIS315H 787 + #ifdef CONFIG_FB_SIS_315 788 788 static bool 789 789 SiS_IsNotM650orLater(struct SiS_Private *SiS_Pr) 790 790 { ··· 800 800 } 801 801 #endif 802 802 803 - #ifdef SIS315H 803 + #ifdef CONFIG_FB_SIS_315 804 804 static bool 805 805 SiS_IsYPbPr(struct SiS_Private *SiS_Pr) 806 806 { ··· 812 812 } 813 813 #endif 814 814 815 - #ifdef SIS315H 815 + #ifdef CONFIG_FB_SIS_315 816 816 static bool 817 817 SiS_IsChScart(struct SiS_Private *SiS_Pr) 818 818 { ··· 824 824 } 825 825 #endif 826 826 827 - #ifdef SIS315H 827 + #ifdef CONFIG_FB_SIS_315 828 828 static bool 829 829 SiS_IsTVOrYPbPrOrScart(struct SiS_Private *SiS_Pr) 830 830 { ··· 844 844 } 845 845 #endif 846 846 847 - #ifdef SIS315H 847 + #ifdef CONFIG_FB_SIS_315 848 848 static bool 849 849 SiS_IsLCDOrLCDA(struct SiS_Private *SiS_Pr) 850 850 { ··· 910 910 /*********************************************/ 911 911 912 912 /* Setup general purpose IO for Chrontel communication */ 913 - #ifdef SIS300 913 + #ifdef CONFIG_FB_SIS_300 914 914 void 915 915 SiS_SetChrontelGPIO(struct SiS_Private *SiS_Pr, unsigned short myvbinfo) 916 916 { ··· 961 961 tempax &= (DriverMode | LoadDACFlag | SetNotSimuMode | SetPALTV); 962 962 tempbx |= tempax; 963 963 964 - #ifdef SIS315H 964 + #ifdef CONFIG_FB_SIS_315 965 965 if(SiS_Pr->ChipType >= SIS_315H) { 966 966 if(SiS_Pr->SiS_VBType & VB_SISLCDA) { 967 967 if(ModeNo == 0x03) { ··· 1011 1011 } 1012 1012 } 1013 1013 1014 - #endif /* SIS315H */ 1014 + #endif /* CONFIG_FB_SIS_315 */ 1015 1015 1016 1016 if(!(SiS_Pr->SiS_VBType & VB_SISVGA2)) { 1017 1017 tempbx &= ~(SetCRT2ToRAMDAC); ··· 1146 1146 1147 1147 SiS_Pr->SiS_VBInfo = tempbx; 1148 1148 1149 - #ifdef SIS300 1149 + #ifdef CONFIG_FB_SIS_300 1150 1150 if(SiS_Pr->ChipType == SIS_630) { 1151 1151 SiS_SetChrontelGPIO(SiS_Pr, SiS_Pr->SiS_VBInfo); 1152 1152 } ··· 1421 1421 static void 1422 1422 SiS_GetLCDInfoBIOS(struct SiS_Private *SiS_Pr) 1423 1423 { 1424 - #ifdef SIS315H 1424 + #ifdef CONFIG_FB_SIS_315 1425 1425 unsigned char *ROMAddr; 1426 1426 unsigned short temp; 1427 1427 ··· 1471 1471 { 1472 1472 unsigned short temp,modeflag,resinfo=0,modexres=0,modeyres=0; 1473 1473 bool panelcanscale = false; 1474 - #ifdef SIS300 1474 + #ifdef CONFIG_FB_SIS_300 1475 1475 unsigned char *ROMAddr = SiS_Pr->VirtualRomBase; 1476 1476 static const unsigned char SiS300SeriesLCDRes[] = 1477 1477 { 0, 1, 2, 3, 7, 4, 5, 8, 1478 1478 0, 0, 10, 0, 0, 0, 0, 15 }; 1479 1479 #endif 1480 - #ifdef SIS315H 1480 + #ifdef CONFIG_FB_SIS_315 1481 1481 unsigned char *myptr = NULL; 1482 1482 #endif 1483 1483 ··· 1516 1516 SiS_Pr->SiS_LCDTypeInfo = (temp & 0x0F) - 1; 1517 1517 } 1518 1518 temp &= 0x0f; 1519 - #ifdef SIS300 1519 + #ifdef CONFIG_FB_SIS_300 1520 1520 if(SiS_Pr->ChipType < SIS_315H) { 1521 1521 /* Very old BIOSes only know 7 sizes (NetVista 2179, 1.01g) */ 1522 1522 if(SiS_Pr->SiS_VBType & VB_SIS301) { ··· 1528 1528 #endif 1529 1529 1530 1530 /* Translate to our internal types */ 1531 - #ifdef SIS315H 1531 + #ifdef CONFIG_FB_SIS_315 1532 1532 if(SiS_Pr->ChipType == SIS_550) { 1533 1533 if (temp == Panel310_1152x768) temp = Panel_320x240_2; /* Verified working */ 1534 1534 else if(temp == Panel310_320x240_2) temp = Panel_320x240_2; ··· 1551 1551 1552 1552 SiS_Pr->SiS_LCDResInfo = temp; 1553 1553 1554 - #ifdef SIS300 1554 + #ifdef CONFIG_FB_SIS_300 1555 1555 if(SiS_Pr->SiS_IF_DEF_LVDS == 1) { 1556 1556 if(SiS_Pr->SiS_CustomT == CUT_BARCO1366) { 1557 1557 SiS_Pr->SiS_LCDResInfo = Panel_Barco1366; ··· 1593 1593 else if(SiS_Pr->UsePanelScaler == 1) SiS_Pr->SiS_LCDInfo |= DontExpandLCD; 1594 1594 1595 1595 /* Dual link, Pass 1:1 BIOS default, etc. */ 1596 - #ifdef SIS315H 1596 + #ifdef CONFIG_FB_SIS_315 1597 1597 if(SiS_Pr->ChipType >= SIS_661) { 1598 1598 if(SiS_Pr->SiS_LCDInfo & DontExpandLCD) { 1599 1599 if(temp & 0x08) SiS_Pr->SiS_LCDInfo |= LCDPass11; ··· 2030 2030 } 2031 2031 } 2032 2032 2033 - #ifdef SIS300 2033 + #ifdef CONFIG_FB_SIS_300 2034 2034 if(SiS_Pr->SiS_IF_DEF_LVDS == 1) { 2035 2035 if(SiS_Pr->SiS_CustomT == CUT_PANEL848 || SiS_Pr->SiS_CustomT == CUT_PANEL856) { 2036 2036 SiS_Pr->SiS_LCDInfo = 0x80 | 0x40 | 0x20; /* neg h/v sync, RGB24(D0 = 0) */ ··· 2306 2306 VCLKIndex = SiS_Pr->PanelVCLKIdx315; 2307 2307 } 2308 2308 2309 - #ifdef SIS300 2309 + #ifdef CONFIG_FB_SIS_300 2310 2310 /* Special Timing: Barco iQ Pro R series */ 2311 2311 if(SiS_Pr->SiS_CustomT == CUT_BARCO1366) VCLKIndex = 0x44; 2312 2312 ··· 2369 2369 { 2370 2370 unsigned short i, j, modeflag, tempah=0; 2371 2371 short tempcl; 2372 - #if defined(SIS300) || defined(SIS315H) 2372 + #if defined(CONFIG_FB_SIS_300) || defined(CONFIG_FB_SIS_315) 2373 2373 unsigned short tempbl; 2374 2374 #endif 2375 - #ifdef SIS315H 2375 + #ifdef CONFIG_FB_SIS_315 2376 2376 unsigned char *ROMAddr = SiS_Pr->VirtualRomBase; 2377 2377 unsigned short tempah2, tempbl2; 2378 2378 #endif ··· 2395 2395 2396 2396 if(SiS_Pr->ChipType < SIS_315H) { 2397 2397 2398 - #ifdef SIS300 /* ---- 300 series ---- */ 2398 + #ifdef CONFIG_FB_SIS_300 /* ---- 300 series ---- */ 2399 2399 2400 2400 /* For 301BDH: (with LCD via LVDS) */ 2401 2401 if(SiS_Pr->SiS_VBType & VB_NoLCD) { ··· 2418 2418 2419 2419 if(SiS_Pr->SiS_VBInfo & SetInSlaveMode) tempah ^= 0xA0; 2420 2420 2421 - #endif /* SIS300 */ 2421 + #endif /* CONFIG_FB_SIS_300 */ 2422 2422 2423 2423 } else { 2424 2424 2425 - #ifdef SIS315H /* ------- 315/330 series ------ */ 2425 + #ifdef CONFIG_FB_SIS_315 /* ------- 315/330 series ------ */ 2426 2426 2427 2427 if(ModeNo > 0x13) { 2428 2428 tempcl -= ModeVGA; ··· 2435 2435 2436 2436 if(SiS_Pr->SiS_VBInfo & SetInSlaveMode) tempah ^= 0x50; 2437 2437 2438 - #endif /* SIS315H */ 2438 + #endif /* CONFIG_FB_SIS_315 */ 2439 2439 2440 2440 } 2441 2441 ··· 2444 2444 if(SiS_Pr->ChipType < SIS_315H) { 2445 2445 SiS_SetReg(SiS_Pr->SiS_Part1Port,0x00,tempah); 2446 2446 } else { 2447 - #ifdef SIS315H 2447 + #ifdef CONFIG_FB_SIS_315 2448 2448 if(SiS_Pr->SiS_IF_DEF_LVDS == 1) { 2449 2449 SiS_SetRegANDOR(SiS_Pr->SiS_Part1Port,0x00,0xa0,tempah); 2450 2450 } else if(SiS_Pr->SiS_VBType & VB_SISVB) { ··· 2525 2525 2526 2526 if(SiS_Pr->ChipType >= SIS_315H) { 2527 2527 2528 - #ifdef SIS315H 2528 + #ifdef CONFIG_FB_SIS_315 2529 2529 /* LVDS can only be slave in 8bpp modes */ 2530 2530 tempah = 0x80; 2531 2531 if((modeflag & CRT2Mode) && (SiS_Pr->SiS_ModeType > ModeVGA)) { ··· 2545 2545 2546 2546 } else { 2547 2547 2548 - #ifdef SIS300 2548 + #ifdef CONFIG_FB_SIS_300 2549 2549 tempah = 0; 2550 2550 if( (!(SiS_Pr->SiS_VBInfo & SetInSlaveMode)) && (SiS_Pr->SiS_ModeType > ModeVGA) ) { 2551 2551 tempah |= 0x02; ··· 2567 2567 2568 2568 if(SiS_Pr->ChipType >= SIS_315H) { 2569 2569 2570 - #ifdef SIS315H 2570 + #ifdef CONFIG_FB_SIS_315 2571 2571 /* unsigned char bridgerev = SiS_GetReg(SiS_Pr->SiS_Part4Port,0x01); */ 2572 2572 2573 2573 /* The following is nearly unpreditable and varies from machine ··· 2659 2659 SiS_SetRegANDOR(SiS_Pr->SiS_Part4Port,0x23,tempbl,tempah); 2660 2660 } 2661 2661 2662 - #endif /* SIS315H */ 2662 + #endif /* CONFIG_FB_SIS_315 */ 2663 2663 2664 2664 } else if(SiS_Pr->SiS_VBType & VB_SIS30xBLV) { 2665 2665 2666 - #ifdef SIS300 2666 + #ifdef CONFIG_FB_SIS_300 2667 2667 SiS_SetRegAND(SiS_Pr->SiS_Part4Port,0x21,0x3f); 2668 2668 2669 2669 if((SiS_Pr->SiS_VBInfo & DisableCRT2Display) || ··· 2686 2686 2687 2687 } else { /* LVDS */ 2688 2688 2689 - #ifdef SIS315H 2689 + #ifdef CONFIG_FB_SIS_315 2690 2690 if(SiS_Pr->ChipType >= SIS_315H) { 2691 2691 2692 2692 if(SiS_Pr->SiS_IF_DEF_CH70xx != 0) { ··· 2872 2872 } 2873 2873 } 2874 2874 2875 - #ifdef SIS315H 2875 + #ifdef CONFIG_FB_SIS_315 2876 2876 if(SiS_Pr->SiS_CustomT == CUT_COMPAQ1280) { 2877 2877 if(SiS_Pr->SiS_LCDResInfo == Panel_1280x1024) { 2878 2878 if(!(SiS_Pr->SiS_LCDInfo & DontExpandLCD)) { ··· 2977 2977 case Panel_1280x1024: tempbx = 24; break; 2978 2978 case Panel_1400x1050: tempbx = 26; break; 2979 2979 case Panel_1600x1200: tempbx = 28; break; 2980 - #ifdef SIS300 2980 + #ifdef CONFIG_FB_SIS_300 2981 2981 case Panel_Barco1366: tempbx = 80; break; 2982 2982 #endif 2983 2983 } ··· 2994 2994 2995 2995 if(SiS_Pr->SiS_LCDInfo & LCDPass11) tempbx = 30; 2996 2996 2997 - #ifdef SIS300 2997 + #ifdef CONFIG_FB_SIS_300 2998 2998 if(SiS_Pr->SiS_CustomT == CUT_BARCO1024) { 2999 2999 tempbx = 82; 3000 3000 if(SiS_Pr->SiS_LCDInfo & DontExpandLCD) tempbx++; ··· 3130 3130 3131 3131 if((SiS_Pr->SiS_VBType & VB_SISVB) && (SiS_Pr->SiS_VBInfo & SetCRT2ToLCDA)) { 3132 3132 3133 - #ifdef SIS315H 3133 + #ifdef CONFIG_FB_SIS_315 3134 3134 SiS_CalcPanelLinkTiming(SiS_Pr, ModeNo, ModeIdIndex, RefreshRateTableIndex); 3135 3135 SiS_CalcLCDACRT1Timing(SiS_Pr, ModeNo, ModeIdIndex); 3136 3136 #endif ··· 3155 3155 case 16: LVDSData = SiS_Pr->SiS_LVDS800x600Data_1; break; 3156 3156 case 18: LVDSData = SiS_Pr->SiS_LVDS1024x600Data_1; break; 3157 3157 case 20: LVDSData = SiS_Pr->SiS_LVDS1024x768Data_1; break; 3158 - #ifdef SIS300 3158 + #ifdef CONFIG_FB_SIS_300 3159 3159 case 80: LVDSData = SiS_Pr->SiS_LVDSBARCO1366Data_1; break; 3160 3160 case 81: LVDSData = SiS_Pr->SiS_LVDSBARCO1366Data_2; break; 3161 3161 case 82: LVDSData = SiS_Pr->SiS_LVDSBARCO1024Data_1; break; ··· 3189 3189 (SiS_Pr->SiS_SetFlag & SetDOSMode) ) { 3190 3190 SiS_Pr->SiS_HDE = SiS_Pr->PanelXRes; 3191 3191 SiS_Pr->SiS_VDE = SiS_Pr->PanelYRes; 3192 - #ifdef SIS300 3192 + #ifdef CONFIG_FB_SIS_300 3193 3193 if(SiS_Pr->SiS_CustomT == CUT_BARCO1366) { 3194 3194 if(ResIndex < 0x08) { 3195 3195 SiS_Pr->SiS_HDE = 1280; ··· 3211 3211 unsigned short resinfo, CRT2Index, ResIndex; 3212 3212 const struct SiS_LCDData *LCDPtr = NULL; 3213 3213 const struct SiS_TVData *TVPtr = NULL; 3214 - #ifdef SIS315H 3214 + #ifdef CONFIG_FB_SIS_315 3215 3215 short resinfo661; 3216 3216 #endif 3217 3217 ··· 3224 3224 } else { 3225 3225 modeflag = SiS_Pr->SiS_EModeIDTable[ModeIdIndex].Ext_ModeFlag; 3226 3226 resinfo = SiS_Pr->SiS_EModeIDTable[ModeIdIndex].Ext_RESINFO; 3227 - #ifdef SIS315H 3227 + #ifdef CONFIG_FB_SIS_315 3228 3228 resinfo661 = SiS_Pr->SiS_EModeIDTable[ModeIdIndex].ROMMODEIDX661; 3229 3229 if( (SiS_Pr->SiS_VBInfo & SetCRT2ToLCD) && 3230 3230 (SiS_Pr->SiS_SetFlag & LCDVESATiming) && ··· 3401 3401 3402 3402 } else if( (!(SiS_Pr->SiS_LCDInfo & DontExpandLCD)) && (romptr) && (ROMAddr) ) { 3403 3403 3404 - #ifdef SIS315H 3404 + #ifdef CONFIG_FB_SIS_315 3405 3405 SiS_Pr->SiS_RVBHCMAX = ROMAddr[romptr]; 3406 3406 SiS_Pr->SiS_RVBHCFACT = ROMAddr[romptr+1]; 3407 3407 SiS_Pr->SiS_VGAHT = ROMAddr[romptr+2] | ((ROMAddr[romptr+3] & 0x0f) << 8); ··· 3461 3461 case Panel_1680x1050 : 3462 3462 case Panel_1680x1050 + 32: LCDPtr = SiS_Pr->SiS_LCD1680x1050Data; break; 3463 3463 case 100 : LCDPtr = SiS_Pr->SiS_NoScaleData; break; 3464 - #ifdef SIS315H 3464 + #ifdef CONFIG_FB_SIS_315 3465 3465 case 200 : LCDPtr = SiS310_ExtCompaq1280x1024Data; break; 3466 3466 case 201 : LCDPtr = SiS_Pr->SiS_St2LCD1280x1024Data; break; 3467 3467 #endif ··· 3559 3559 { 3560 3560 const struct SiS_LVDSDes *PanelDesPtr = NULL; 3561 3561 3562 - #ifdef SIS300 3562 + #ifdef CONFIG_FB_SIS_300 3563 3563 if(SiS_Pr->SiS_VBInfo & SetCRT2ToLCD) { 3564 3564 3565 3565 if(SiS_Pr->ChipType < SIS_315H) { ··· 3631 3631 3632 3632 if((SiS_Pr->SiS_VBType & VB_SIS30xBLV) && (SiS_Pr->SiS_VBInfo & SetCRT2ToLCDA)) { 3633 3633 3634 - #ifdef SIS315H 3634 + #ifdef CONFIG_FB_SIS_315 3635 3635 if(SiS_Pr->SiS_LCDInfo & DontExpandLCD) { 3636 3636 /* non-pass 1:1 only, see above */ 3637 3637 if(SiS_Pr->SiS_VGAHDE != SiS_Pr->PanelXRes) { ··· 3706 3706 } else { 3707 3707 3708 3708 if(SiS_Pr->ChipType < SIS_315H) { 3709 - #ifdef SIS300 3709 + #ifdef CONFIG_FB_SIS_300 3710 3710 switch(SiS_Pr->SiS_LCDResInfo) { 3711 3711 case Panel_800x600: 3712 3712 if(SiS_Pr->SiS_VGAVDE == SiS_Pr->PanelYRes) { ··· 3751 3751 } 3752 3752 #endif 3753 3753 } else { 3754 - #ifdef SIS315H 3754 + #ifdef CONFIG_FB_SIS_315 3755 3755 switch(SiS_Pr->SiS_LCDResInfo) { 3756 3756 case Panel_1024x768: 3757 3757 case Panel_1280x1024: ··· 3779 3779 if(SiS_Pr->ChipType < SIS_315H) { 3780 3780 if(!(modeflag & HalfDCLK)) SiS_Pr->SiS_LCDHDES = 320; 3781 3781 } else { 3782 - #ifdef SIS315H 3782 + #ifdef CONFIG_FB_SIS_315 3783 3783 if(SiS_Pr->SiS_LCDResInfo == Panel_1024x768) SiS_Pr->SiS_LCDHDES = 480; 3784 3784 if(SiS_Pr->SiS_LCDResInfo == Panel_1400x1050) SiS_Pr->SiS_LCDHDES = 804; 3785 3785 if(SiS_Pr->SiS_LCDResInfo == Panel_1600x1200) SiS_Pr->SiS_LCDHDES = 704; ··· 3801 3801 /* DISABLE VIDEO BRIDGE */ 3802 3802 /*********************************************/ 3803 3803 3804 - #ifdef SIS315H 3804 + #ifdef CONFIG_FB_SIS_315 3805 3805 static int 3806 3806 SiS_HandlePWD(struct SiS_Private *SiS_Pr) 3807 3807 { ··· 3839 3839 void 3840 3840 SiS_DisableBridge(struct SiS_Private *SiS_Pr) 3841 3841 { 3842 - #ifdef SIS315H 3842 + #ifdef CONFIG_FB_SIS_315 3843 3843 unsigned short tempah, pushax=0, modenum; 3844 3844 #endif 3845 3845 unsigned short temp=0; ··· 3850 3850 3851 3851 if(SiS_Pr->ChipType < SIS_315H) { 3852 3852 3853 - #ifdef SIS300 /* 300 series */ 3853 + #ifdef CONFIG_FB_SIS_300 /* 300 series */ 3854 3854 3855 3855 if(!(SiS_CR36BIOSWord23b(SiS_Pr))) { 3856 3856 if(SiS_Pr->SiS_VBType & VB_SISLVDS) { ··· 3883 3883 } 3884 3884 } 3885 3885 3886 - #endif /* SIS300 */ 3886 + #endif /* CONFIG_FB_SIS_300 */ 3887 3887 3888 3888 } else { 3889 3889 3890 - #ifdef SIS315H /* 315 series */ 3890 + #ifdef CONFIG_FB_SIS_315 /* 315 series */ 3891 3891 3892 3892 int didpwd = 0; 3893 3893 bool custom1 = (SiS_Pr->SiS_CustomT == CUT_COMPAQ1280) || ··· 4011 4011 4012 4012 } 4013 4013 4014 - #endif /* SIS315H */ 4014 + #endif /* CONFIG_FB_SIS_315 */ 4015 4015 4016 4016 } 4017 4017 4018 4018 } else { /* ============ For 301 ================ */ 4019 4019 4020 4020 if(SiS_Pr->ChipType < SIS_315H) { 4021 - #ifdef SIS300 4021 + #ifdef CONFIG_FB_SIS_300 4022 4022 if(!(SiS_CR36BIOSWord23b(SiS_Pr))) { 4023 4023 SiS_SetRegSR11ANDOR(SiS_Pr,0xF7,0x08); 4024 4024 SiS_PanelDelay(SiS_Pr, 3); ··· 4041 4041 SiS_SetRegOR(SiS_Pr->SiS_P3c4,0x1E,0x20); 4042 4042 SiS_SetReg(SiS_Pr->SiS_Part1Port,0x00,temp); 4043 4043 } else { 4044 - #ifdef SIS300 4044 + #ifdef CONFIG_FB_SIS_300 4045 4045 SiS_SetRegAND(SiS_Pr->SiS_P3c4,0x1E,0xDF); /* disable CRT2 */ 4046 4046 if( (!(SiS_CRT2IsLCD(SiS_Pr))) || 4047 4047 (!(SiS_CR36BIOSWord23d(SiS_Pr))) ) { ··· 4057 4057 4058 4058 if(SiS_Pr->ChipType < SIS_315H) { 4059 4059 4060 - #ifdef SIS300 /* 300 series */ 4060 + #ifdef CONFIG_FB_SIS_300 /* 300 series */ 4061 4061 4062 4062 if(SiS_Pr->SiS_IF_DEF_CH70xx == 1) { 4063 4063 SiS_SetCH700x(SiS_Pr,0x0E,0x09); ··· 4101 4101 SiS_SetRegSR11ANDOR(SiS_Pr,0xFB,0x04); 4102 4102 } 4103 4103 4104 - #endif /* SIS300 */ 4104 + #endif /* CONFIG_FB_SIS_300 */ 4105 4105 4106 4106 } else { 4107 4107 4108 - #ifdef SIS315H /* 315 series */ 4108 + #ifdef CONFIG_FB_SIS_315 /* 315 series */ 4109 4109 4110 4110 if(!(SiS_IsNotM650orLater(SiS_Pr))) { 4111 4111 /*if(SiS_Pr->ChipType < SIS_340) { */ /* XGI needs this */ ··· 4218 4218 } 4219 4219 } 4220 4220 4221 - #endif /* SIS315H */ 4221 + #endif /* CONFIG_FB_SIS_315 */ 4222 4222 4223 4223 } /* 315 series */ 4224 4224 ··· 4239 4239 SiS_EnableBridge(struct SiS_Private *SiS_Pr) 4240 4240 { 4241 4241 unsigned short temp=0, tempah; 4242 - #ifdef SIS315H 4242 + #ifdef CONFIG_FB_SIS_315 4243 4243 unsigned short temp1, pushax=0; 4244 4244 bool delaylong = false; 4245 4245 #endif ··· 4250 4250 4251 4251 if(SiS_Pr->ChipType < SIS_315H) { 4252 4252 4253 - #ifdef SIS300 /* 300 series */ 4253 + #ifdef CONFIG_FB_SIS_300 /* 300 series */ 4254 4254 4255 4255 if(SiS_CRT2IsLCD(SiS_Pr)) { 4256 4256 if(SiS_Pr->SiS_VBType & VB_SISLVDS) { ··· 4313 4313 } 4314 4314 4315 4315 4316 - #endif /* SIS300 */ 4316 + #endif /* CONFIG_FB_SIS_300 */ 4317 4317 4318 4318 } else { 4319 4319 4320 - #ifdef SIS315H /* 315 series */ 4320 + #ifdef CONFIG_FB_SIS_315 /* 315 series */ 4321 4321 4322 4322 #ifdef SET_EMI 4323 4323 unsigned char r30=0, r31=0, r32=0, r33=0, cr36=0; ··· 4616 4616 SiS_SetRegAND(SiS_Pr->SiS_Part1Port,0x00,0x7f); 4617 4617 } 4618 4618 4619 - #endif /* SIS315H */ 4619 + #endif /* CONFIG_FB_SIS_315 */ 4620 4620 4621 4621 } 4622 4622 ··· 4667 4667 4668 4668 if(SiS_Pr->ChipType < SIS_315H) { 4669 4669 4670 - #ifdef SIS300 /* 300 series */ 4670 + #ifdef CONFIG_FB_SIS_300 /* 300 series */ 4671 4671 4672 4672 if(SiS_CRT2IsLCD(SiS_Pr)) { 4673 4673 if(SiS_Pr->ChipType == SIS_730) { ··· 4711 4711 } 4712 4712 } 4713 4713 4714 - #endif /* SIS300 */ 4714 + #endif /* CONFIG_FB_SIS_300 */ 4715 4715 4716 4716 } else { 4717 4717 4718 - #ifdef SIS315H /* 315 series */ 4718 + #ifdef CONFIG_FB_SIS_315 /* 315 series */ 4719 4719 4720 4720 if(!(SiS_IsNotM650orLater(SiS_Pr))) { 4721 4721 /*if(SiS_Pr->ChipType < SIS_340) {*/ /* XGI needs this */ ··· 4809 4809 } 4810 4810 } 4811 4811 4812 - #endif /* SIS315H */ 4812 + #endif /* CONFIG_FB_SIS_315 */ 4813 4813 4814 4814 } /* 310 series */ 4815 4815 ··· 4899 4899 4900 4900 if(SiS_Pr->ChipType < SIS_315H) { 4901 4901 4902 - #ifdef SIS300 /* ---- 300 series --- */ 4902 + #ifdef CONFIG_FB_SIS_300 /* ---- 300 series --- */ 4903 4903 4904 4904 if(SiS_Pr->SiS_VBType & VB_SIS30xBLV) { /* 630 - 301B(-DH) */ 4905 4905 ··· 4928 4928 4929 4929 } 4930 4930 4931 - #endif /* SIS300 */ 4931 + #endif /* CONFIG_FB_SIS_300 */ 4932 4932 4933 4933 } else { 4934 4934 4935 - #ifdef SIS315H /* ------- 315 series ------ */ 4935 + #ifdef CONFIG_FB_SIS_315 /* ------- 315 series ------ */ 4936 4936 4937 4937 if(SiS_Pr->SiS_VBType & VB_SISLVDS) { /* 315 - LVDS */ 4938 4938 ··· 5004 5004 } 5005 5005 5006 5006 } 5007 - #endif /* SIS315H */ 5007 + #endif /* CONFIG_FB_SIS_315 */ 5008 5008 } 5009 5009 } 5010 5010 } 5011 5011 5012 5012 /* Set CRT2 FIFO on 300/540/630/730 */ 5013 - #ifdef SIS300 5013 + #ifdef CONFIG_FB_SIS_300 5014 5014 static void 5015 5015 SiS_SetCRT2FIFO_300(struct SiS_Private *SiS_Pr,unsigned short ModeNo) 5016 5016 { ··· 5185 5185 #endif 5186 5186 5187 5187 /* Set CRT2 FIFO on 315/330 series */ 5188 - #ifdef SIS315H 5188 + #ifdef CONFIG_FB_SIS_315 5189 5189 static void 5190 5190 SiS_SetCRT2FIFO_310(struct SiS_Private *SiS_Pr) 5191 5191 { ··· 5357 5357 unsigned short push2, tempax, tempbx, tempcx, temp; 5358 5358 unsigned int tempeax = 0, tempebx, tempecx, tempvcfact = 0; 5359 5359 bool islvds = false, issis = false, chkdclkfirst = false; 5360 - #ifdef SIS300 5360 + #ifdef CONFIG_FB_SIS_300 5361 5361 unsigned short crt2crtc = 0; 5362 5362 #endif 5363 - #ifdef SIS315H 5363 + #ifdef CONFIG_FB_SIS_315 5364 5364 unsigned short pushcx; 5365 5365 #endif 5366 5366 5367 5367 if(ModeNo <= 0x13) { 5368 5368 modeflag = SiS_Pr->SiS_SModeIDTable[ModeIdIndex].St_ModeFlag; 5369 5369 resinfo = SiS_Pr->SiS_SModeIDTable[ModeIdIndex].St_ResInfo; 5370 - #ifdef SIS300 5370 + #ifdef CONFIG_FB_SIS_300 5371 5371 crt2crtc = SiS_Pr->SiS_SModeIDTable[ModeIdIndex].St_CRT2CRTC; 5372 5372 #endif 5373 5373 } else if(SiS_Pr->UseCustomMode) { ··· 5375 5375 } else { 5376 5376 modeflag = SiS_Pr->SiS_EModeIDTable[ModeIdIndex].Ext_ModeFlag; 5377 5377 resinfo = SiS_Pr->SiS_EModeIDTable[ModeIdIndex].Ext_RESINFO; 5378 - #ifdef SIS300 5378 + #ifdef CONFIG_FB_SIS_300 5379 5379 crt2crtc = SiS_Pr->SiS_RefIndex[RefreshRateTableIndex].Ext_CRT2CRTC; 5380 5380 #endif 5381 5381 } ··· 5396 5396 } 5397 5397 } 5398 5398 5399 - #ifdef SIS315H 5399 + #ifdef CONFIG_FB_SIS_315 5400 5400 if((SiS_Pr->ChipType >= SIS_315H) && (SiS_Pr->SiS_VBInfo & SetCRT2ToLCDA)) { 5401 5401 if(IS_SIS330) { 5402 5402 SiS_SetRegOR(SiS_Pr->SiS_Part1Port,0x2D,0x10); ··· 5646 5646 5647 5647 if(SiS_Pr->ChipType < SIS_315H) { 5648 5648 5649 - #ifdef SIS300 /* 300 series */ 5649 + #ifdef CONFIG_FB_SIS_300 /* 300 series */ 5650 5650 tempeax = SiS_Pr->SiS_VGAVDE << 6; 5651 5651 temp = (tempeax % (unsigned int)SiS_Pr->SiS_VDE); 5652 5652 tempeax = tempeax / (unsigned int)SiS_Pr->SiS_VDE; ··· 5657 5657 temp = (unsigned short)(tempeax & 0x00FF); 5658 5658 SiS_SetReg(SiS_Pr->SiS_Part1Port,0x1E,temp); /* BPLVCFACT */ 5659 5659 tempvcfact = temp; 5660 - #endif /* SIS300 */ 5660 + #endif /* CONFIG_FB_SIS_300 */ 5661 5661 5662 5662 } else { 5663 5663 5664 - #ifdef SIS315H /* 315 series */ 5664 + #ifdef CONFIG_FB_SIS_315 /* 315 series */ 5665 5665 tempeax = SiS_Pr->SiS_VGAVDE << 18; 5666 5666 tempebx = SiS_Pr->SiS_VDE; 5667 5667 temp = (tempeax % tempebx); ··· 5747 5747 temp = (unsigned short)(tempecx & 0x00FF); 5748 5748 SiS_SetReg(SiS_Pr->SiS_Part1Port,0x23,temp); 5749 5749 5750 - #ifdef SIS315H 5750 + #ifdef CONFIG_FB_SIS_315 5751 5751 if(SiS_Pr->ChipType >= SIS_315H) { 5752 5752 if(SiS_Pr->SiS_VBInfo & SetCRT2ToLCDA) { 5753 5753 if((islvds) || (SiS_Pr->SiS_VBInfo & VB_SISLVDS)) { ··· 5765 5765 } 5766 5766 #endif 5767 5767 5768 - #ifdef SIS300 5768 + #ifdef CONFIG_FB_SIS_300 5769 5769 if(SiS_Pr->SiS_IF_DEF_TRUMPION) { 5770 5770 unsigned char *ROMAddr = SiS_Pr->VirtualRomBase; 5771 5771 unsigned char *trumpdata; ··· 5801 5801 } 5802 5802 #endif 5803 5803 5804 - #ifdef SIS315H 5804 + #ifdef CONFIG_FB_SIS_315 5805 5805 if(SiS_Pr->SiS_IF_DEF_FSTN || SiS_Pr->SiS_IF_DEF_DSTN) { 5806 5806 SiS_SetReg(SiS_Pr->SiS_Part1Port,0x25,0x00); 5807 5807 SiS_SetReg(SiS_Pr->SiS_Part1Port,0x26,0x00); ··· 5901 5901 SiS_SetReg(SiS_Pr->SiS_Part1Port,0x45,0x0a); 5902 5902 } 5903 5903 } 5904 - #endif /* SIS315H */ 5904 + #endif /* CONFIG_FB_SIS_315 */ 5905 5905 } 5906 5906 5907 5907 /* Set Part 1 */ ··· 5909 5909 SiS_SetGroup1(struct SiS_Private *SiS_Pr, unsigned short ModeNo, unsigned short ModeIdIndex, 5910 5910 unsigned short RefreshRateTableIndex) 5911 5911 { 5912 - #if defined(SIS300) || defined(SIS315H) 5912 + #if defined(CONFIG_FB_SIS_300) || defined(CONFIG_FB_SIS_315) 5913 5913 unsigned char *ROMAddr = SiS_Pr->VirtualRomBase; 5914 5914 #endif 5915 5915 unsigned short temp=0, tempax=0, tempbx=0, tempcx=0, bridgeadd=0; 5916 5916 unsigned short pushbx=0, CRT1Index=0, modeflag, resinfo=0; 5917 - #ifdef SIS315H 5917 + #ifdef CONFIG_FB_SIS_315 5918 5918 unsigned short tempbl=0; 5919 5919 #endif 5920 5920 ··· 5940 5940 (SiS_Pr->SiS_VBInfo & SetInSlaveMode)) ) { 5941 5941 5942 5942 if(SiS_Pr->ChipType < SIS_315H ) { 5943 - #ifdef SIS300 5943 + #ifdef CONFIG_FB_SIS_300 5944 5944 SiS_SetCRT2FIFO_300(SiS_Pr, ModeNo); 5945 5945 #endif 5946 5946 } else { 5947 - #ifdef SIS315H 5947 + #ifdef CONFIG_FB_SIS_315 5948 5948 SiS_SetCRT2FIFO_310(SiS_Pr); 5949 5949 #endif 5950 5950 } ··· 5953 5953 5954 5954 if(SiS_Pr->ChipType < SIS_315H ) { 5955 5955 5956 - #ifdef SIS300 /* ------------- 300 series --------------*/ 5956 + #ifdef CONFIG_FB_SIS_300 /* ------------- 300 series --------------*/ 5957 5957 5958 5958 temp = (SiS_Pr->SiS_VGAHT - 1) & 0x0FF; /* BTVGA2HT 0x08,0x09 */ 5959 5959 SiS_SetReg(SiS_Pr->SiS_Part1Port,0x08,temp); /* CRT2 Horizontal Total */ ··· 5972 5972 5973 5973 bridgeadd = 12; 5974 5974 5975 - #endif /* SIS300 */ 5975 + #endif /* CONFIG_FB_SIS_300 */ 5976 5976 5977 5977 } else { 5978 5978 5979 - #ifdef SIS315H /* ------------------- 315/330 series --------------- */ 5979 + #ifdef CONFIG_FB_SIS_315 /* ------------------- 315/330 series --------------- */ 5980 5980 5981 5981 tempcx = SiS_Pr->SiS_VGAHT; /* BTVGA2HT 0x08,0x09 */ 5982 5982 if(modeflag & HalfDCLK) { ··· 6027 6027 } 6028 6028 } 6029 6029 6030 - #endif /* SIS315H */ 6030 + #endif /* CONFIG_FB_SIS_315 */ 6031 6031 6032 6032 } /* 315/330 series */ 6033 6033 ··· 6158 6158 6159 6159 if(SiS_Pr->ChipType < SIS_315H) { 6160 6160 6161 - #ifdef SIS300 /* ---------- 300 series -------------- */ 6161 + #ifdef CONFIG_FB_SIS_300 /* ---------- 300 series -------------- */ 6162 6162 6163 6163 if(SiS_Pr->SiS_VBType & VB_SISVB) { 6164 6164 temp = 0x20; ··· 6212 6212 6213 6213 SiS_SetRegANDOR(SiS_Pr->SiS_Part1Port,0x13,~0x3C,temp); /* Panel Link Delay Compensation; (Software Command Reset; Power Saving) */ 6214 6214 6215 - #endif /* SIS300 */ 6215 + #endif /* CONFIG_FB_SIS_300 */ 6216 6216 6217 6217 } else { 6218 6218 6219 - #ifdef SIS315H /* --------------- 315/330 series ---------------*/ 6219 + #ifdef CONFIG_FB_SIS_315 /* --------------- 315/330 series ---------------*/ 6220 6220 6221 6221 if(SiS_Pr->ChipType < SIS_661) { 6222 6222 ··· 6251 6251 if(modeflag & HalfDCLK) tempax |= 0x40; 6252 6252 SiS_SetRegANDOR(SiS_Pr->SiS_Part1Port,0x2C,0x3f,tempax); 6253 6253 6254 - #endif /* SIS315H */ 6254 + #endif /* CONFIG_FB_SIS_315 */ 6255 6255 6256 6256 } 6257 6257 ··· 6283 6283 /* SET PART 2 REGISTER GROUP */ 6284 6284 /*********************************************/ 6285 6285 6286 - #ifdef SIS315H 6286 + #ifdef CONFIG_FB_SIS_315 6287 6287 static unsigned char * 6288 6288 SiS_GetGroup2CLVXPtr(struct SiS_Private *SiS_Pr, int tabletype) 6289 6289 { ··· 6380 6380 } 6381 6381 #endif 6382 6382 6383 - #ifdef SIS300 6383 + #ifdef CONFIG_FB_SIS_300 6384 6384 static void 6385 6385 SiS_Group2LCDSpecial(struct SiS_Private *SiS_Pr, unsigned short ModeNo, unsigned short crt2crtc) 6386 6386 { ··· 6592 6592 unsigned int longtemp, PhaseIndex; 6593 6593 bool newtvphase; 6594 6594 const unsigned char *TimingPoint; 6595 - #ifdef SIS315H 6595 + #ifdef CONFIG_FB_SIS_315 6596 6596 unsigned short resindex, CRT2Index; 6597 6597 const struct SiS_Part2PortTbl *CRT2Part2Ptr = NULL; 6598 6598 ··· 6971 6971 SiS_SetRegAND(SiS_Pr->SiS_Part2Port,0x17,0xFB); 6972 6972 SiS_SetRegAND(SiS_Pr->SiS_Part2Port,0x18,0xDF); 6973 6973 6974 - #ifdef SIS315H 6974 + #ifdef CONFIG_FB_SIS_315 6975 6975 if(SiS_GetCRT2Part2Ptr(SiS_Pr, ModeNo, ModeIdIndex, RefreshRateTableIndex, 6976 6976 &CRT2Index, &resindex)) { 6977 6977 switch(CRT2Index) { ··· 7093 7093 7094 7094 SiS_SetReg(SiS_Pr->SiS_Part2Port,0x01,temp); 7095 7095 7096 - #ifdef SIS300 7096 + #ifdef CONFIG_FB_SIS_300 7097 7097 SiS_Group2LCDSpecial(SiS_Pr, ModeNo, crt2crtc); 7098 7098 #endif 7099 7099 ··· 7176 7176 7177 7177 SiS_SetGroup2_Tail(SiS_Pr, ModeNo); 7178 7178 7179 - #ifdef SIS300 7179 + #ifdef CONFIG_FB_SIS_300 7180 7180 SiS_Set300Part2Regs(SiS_Pr, ModeIdIndex, RefreshRateTableIndex, ModeNo); 7181 7181 #endif 7182 - #ifdef SIS315H 7182 + #ifdef CONFIG_FB_SIS_315 7183 7183 } /* CRT2-LCD from table */ 7184 7184 #endif 7185 7185 } ··· 7248 7248 /* SET PART 4 REGISTER GROUP */ 7249 7249 /*********************************************/ 7250 7250 7251 - #ifdef SIS315H 7251 + #ifdef CONFIG_FB_SIS_315 7252 7252 #if 0 7253 7253 static void 7254 7254 SiS_ShiftXPos(struct SiS_Private *SiS_Pr, int shift) ··· 7877 7877 7878 7878 if(SiS_Pr->SiS_IF_DEF_CH70xx == 1) { 7879 7879 7880 - #ifdef SIS300 7880 + #ifdef CONFIG_FB_SIS_300 7881 7881 7882 7882 /* Chrontel 7005 - I assume that it does not come with a 315 series chip */ 7883 7883 ··· 7990 7990 7991 7991 /* Chrontel 7019 - assumed that it does not come with a 300 series chip */ 7992 7992 7993 - #ifdef SIS315H 7993 + #ifdef CONFIG_FB_SIS_315 7994 7994 7995 7995 unsigned short temp; 7996 7996 ··· 8041 8041 8042 8042 } 8043 8043 8044 - #ifdef SIS315H /* ----------- 315 series only ---------- */ 8044 + #ifdef CONFIG_FB_SIS_315 /* ----------- 315 series only ---------- */ 8045 8045 8046 8046 void 8047 8047 SiS_Chrontel701xBLOn(struct SiS_Private *SiS_Pr) ··· 8523 8523 bool 8524 8524 SiS_SetCRT2Group(struct SiS_Private *SiS_Pr, unsigned short ModeNo) 8525 8525 { 8526 - #ifdef SIS300 8526 + #ifdef CONFIG_FB_SIS_300 8527 8527 unsigned char *ROMAddr = SiS_Pr->VirtualRomBase; 8528 8528 #endif 8529 8529 unsigned short ModeIdIndex, RefreshRateTableIndex; ··· 8578 8578 if(SiS_Pr->SiS_SetFlag & LowModeTests) { 8579 8579 8580 8580 SiS_SetGroup2(SiS_Pr, ModeNo, ModeIdIndex, RefreshRateTableIndex); 8581 - #ifdef SIS315H 8581 + #ifdef CONFIG_FB_SIS_315 8582 8582 SiS_SetGroup2_C_ELV(SiS_Pr, ModeNo, ModeIdIndex, RefreshRateTableIndex); 8583 8583 #endif 8584 8584 SiS_SetGroup3(SiS_Pr, ModeNo, ModeIdIndex); 8585 8585 SiS_SetGroup4(SiS_Pr, ModeNo, ModeIdIndex, RefreshRateTableIndex); 8586 - #ifdef SIS315H 8586 + #ifdef CONFIG_FB_SIS_315 8587 8587 SiS_SetGroup4_C_ELV(SiS_Pr, ModeNo, ModeIdIndex); 8588 8588 #endif 8589 8589 SiS_SetGroup5(SiS_Pr, ModeNo, ModeIdIndex); ··· 8614 8614 if(SiS_Pr->SiS_IF_DEF_CH70xx != 0) { 8615 8615 if(SiS_Pr->SiS_VBInfo & (SetCRT2ToLCD | SetCRT2ToLCDA)) { 8616 8616 if(SiS_Pr->SiS_IF_DEF_CH70xx == 2) { 8617 - #ifdef SIS315H 8617 + #ifdef CONFIG_FB_SIS_315 8618 8618 SiS_SetCH701xForLCD(SiS_Pr); 8619 8619 #endif 8620 8620 } ··· 8627 8627 8628 8628 } 8629 8629 8630 - #ifdef SIS300 8630 + #ifdef CONFIG_FB_SIS_300 8631 8631 if(SiS_Pr->ChipType < SIS_315H) { 8632 8632 if(SiS_Pr->SiS_SetFlag & LowModeTests) { 8633 8633 if(SiS_Pr->SiS_UseOEM) { ··· 8650 8650 } 8651 8651 #endif 8652 8652 8653 - #ifdef SIS315H 8653 + #ifdef CONFIG_FB_SIS_315 8654 8654 if(SiS_Pr->ChipType >= SIS_315H) { 8655 8655 if(SiS_Pr->SiS_SetFlag & LowModeTests) { 8656 8656 if(SiS_Pr->ChipType < SIS_661) { ··· 8729 8729 } 8730 8730 } 8731 8731 8732 - #ifdef SIS300 8732 + #ifdef CONFIG_FB_SIS_300 8733 8733 static unsigned char * 8734 8734 SiS_SetTrumpBlockLoop(struct SiS_Private *SiS_Pr, unsigned char *dataptr) 8735 8735 { ··· 9456 9456 9457 9457 /* =============== SiS 315/330 O.E.M. ================= */ 9458 9458 9459 - #ifdef SIS315H 9459 + #ifdef CONFIG_FB_SIS_315 9460 9460 9461 9461 static unsigned short 9462 9462 GetRAMDACromptr(struct SiS_Private *SiS_Pr) ··· 10644 10644 10645 10645 /* ================= SiS 300 O.E.M. ================== */ 10646 10646 10647 - #ifdef SIS300 10647 + #ifdef CONFIG_FB_SIS_300 10648 10648 10649 10649 static void 10650 10650 SetOEMLCDData2(struct SiS_Private *SiS_Pr, unsigned short ModeNo,unsigned short ModeIdIndex,
+7 -7
drivers/video/sis/init301.h
··· 230 230 0xFF,0xFF, 231 231 }; 232 232 233 - #ifdef SIS315H 233 + #ifdef CONFIG_FB_SIS_315 234 234 /* 661 et al LCD data structure (2.03.00) */ 235 235 static const unsigned char SiS_LCDStruct661[] = { 236 236 /* 1024x768 */ ··· 272 272 }; 273 273 #endif 274 274 275 - #ifdef SIS300 275 + #ifdef CONFIG_FB_SIS_300 276 276 static unsigned char SiS300_TrumpionData[14][80] = { 277 277 { 0x02,0x0A,0x0A,0x01,0x04,0x01,0x00,0x03,0x0D,0x00,0x0D,0x10,0x7F,0x00,0x80,0x02, 278 278 0x20,0x03,0x0B,0x00,0x90,0x01,0xC1,0x01,0x60,0x0C,0x30,0x10,0x00,0x00,0x04,0x23, ··· 375 375 unsigned short SiS_GetCH701x(struct SiS_Private *SiS_Pr, unsigned short tempax); 376 376 void SiS_SetCH70xxANDOR(struct SiS_Private *SiS_Pr, unsigned short reg, 377 377 unsigned char orval,unsigned short andval); 378 - #ifdef SIS315H 378 + #ifdef CONFIG_FB_SIS_315 379 379 static void SiS_Chrontel701xOn(struct SiS_Private *SiS_Pr); 380 380 static void SiS_Chrontel701xOff(struct SiS_Private *SiS_Pr); 381 381 static void SiS_ChrontelInitTVVSync(struct SiS_Private *SiS_Pr); ··· 384 384 void SiS_Chrontel701xBLOff(struct SiS_Private *SiS_Pr); 385 385 #endif /* 315 */ 386 386 387 - #ifdef SIS300 387 + #ifdef CONFIG_FB_SIS_300 388 388 static bool SiS_SetTrumpionBlock(struct SiS_Private *SiS_Pr, unsigned char *dataptr); 389 389 void SiS_SetChrontelGPIO(struct SiS_Private *SiS_Pr, unsigned short myvbinfo); 390 390 #endif ··· 415 415 static void SiS_SendACK(struct SiS_Private *SiS_Pr, unsigned short yesno); 416 416 static unsigned short SiS_DoProbeDDC(struct SiS_Private *SiS_Pr); 417 417 418 - #ifdef SIS300 418 + #ifdef CONFIG_FB_SIS_300 419 419 static void SiS_OEM300Setting(struct SiS_Private *SiS_Pr, 420 420 unsigned short ModeNo, unsigned short ModeIdIndex, unsigned short RefTabindex); 421 421 static void SetOEMLCDData2(struct SiS_Private *SiS_Pr, 422 422 unsigned short ModeNo, unsigned short ModeIdIndex,unsigned short RefTableIndex); 423 423 #endif 424 - #ifdef SIS315H 424 + #ifdef CONFIG_FB_SIS_315 425 425 static void SiS_OEM310Setting(struct SiS_Private *SiS_Pr, 426 426 unsigned short ModeNo,unsigned short ModeIdIndex, unsigned short RRTI); 427 427 static void SiS_OEM661Setting(struct SiS_Private *SiS_Pr, ··· 456 456 extern void SiS_CalcCRRegisters(struct SiS_Private *SiS_Pr, int depth); 457 457 extern unsigned short SiS_GetRefCRTVCLK(struct SiS_Private *SiS_Pr, unsigned short Index, int UseWide); 458 458 extern unsigned short SiS_GetRefCRT1CRTC(struct SiS_Private *SiS_Pr, unsigned short Index, int UseWide); 459 - #ifdef SIS300 459 + #ifdef CONFIG_FB_SIS_300 460 460 extern void SiS_GetFIFOThresholdIndex300(struct SiS_Private *SiS_Pr, unsigned short *tempbx, 461 461 unsigned short *tempcl); 462 462 extern unsigned short SiS_GetFIFOThresholdB300(unsigned short tempbx, unsigned short tempcl);
+3 -3
drivers/video/sis/initextlfb.c
··· 59 59 60 60 if(rateindex > 0) rateindex--; 61 61 62 - #ifdef SIS315H 62 + #ifdef CONFIG_FB_SIS_315 63 63 switch(ModeNo) { 64 64 case 0x5a: ModeNo = 0x50; break; 65 65 case 0x5b: ModeNo = 0x56; ··· 103 103 104 104 if(rateindex > 0) rateindex--; 105 105 106 - #ifdef SIS315H 106 + #ifdef CONFIG_FB_SIS_315 107 107 switch(ModeNo) { 108 108 case 0x5a: ModeNo = 0x50; break; 109 109 case 0x5b: ModeNo = 0x56; ··· 187 187 188 188 if(rateindex > 0) rateindex--; 189 189 190 - #ifdef SIS315H 190 + #ifdef CONFIG_FB_SIS_315 191 191 switch(ModeNo) { 192 192 case 0x5a: ModeNo = 0x50; break; 193 193 case 0x5b: ModeNo = 0x56;
+1 -9
drivers/video/sis/osdef.h
··· 82 82 /* LINUX KERNEL */ 83 83 /**********************************************************************/ 84 84 85 - #ifdef CONFIG_FB_SIS_300 86 - #define SIS300 87 - #endif 88 - 89 - #ifdef CONFIG_FB_SIS_315 90 - #define SIS315H 91 - #endif 92 - 93 - #if !defined(SIS300) && !defined(SIS315H) 85 + #if !defined(CONFIG_FB_SIS_300) && !defined(CONFIG_FB_SIS_315) 94 86 #warning Neither CONFIG_FB_SIS_300 nor CONFIG_FB_SIS_315 is set 95 87 #warning sisfb will not work! 96 88 #endif