Commit c4f9c31e authored by Aaro Koskinen's avatar Aaro Koskinen Committed by Greg Kroah-Hartman

staging: xgifb: SetFlag: delete DisableChB

This flag is never set, so checks can be removed and code behind it
deleted.
Signed-off-by: default avatarAaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent ae424a3d
...@@ -30,7 +30,6 @@ ...@@ -30,7 +30,6 @@
#define SetCRT2ToDualEdge 0x8000 #define SetCRT2ToDualEdge 0x8000
#define ReserveTVOption 0x0008 #define ReserveTVOption 0x0008
#define DisableChB 0x1000
#define EnableChB 0x2000 #define EnableChB 0x2000
#define DisableChA 0x4000 #define DisableChA 0x4000
#define EnableChA 0x8000 #define EnableChA 0x8000
......
...@@ -4555,7 +4555,7 @@ static unsigned char XGI_EnableChISLCD(struct vb_device_info *pVBInfo, ...@@ -4555,7 +4555,7 @@ static unsigned char XGI_EnableChISLCD(struct vb_device_info *pVBInfo,
if (enable) if (enable)
tempbx = pVBInfo->SetFlag & (EnableChA | EnableChB); tempbx = pVBInfo->SetFlag & (EnableChA | EnableChB);
else else
tempbx = pVBInfo->SetFlag & (DisableChA | DisableChB); tempbx = pVBInfo->SetFlag & DisableChA;
tempah = ~((unsigned short) xgifb_reg_get(pVBInfo->Part1Port, 0x2E)); tempah = ~((unsigned short) xgifb_reg_get(pVBInfo->Part1Port, 0x2E));
...@@ -4564,7 +4564,7 @@ static unsigned char XGI_EnableChISLCD(struct vb_device_info *pVBInfo, ...@@ -4564,7 +4564,7 @@ static unsigned char XGI_EnableChISLCD(struct vb_device_info *pVBInfo,
return 0; return 0;
} }
if (!(tempbx & (EnableChB | DisableChB))) if (!(tempbx & EnableChB))
return 0; return 0;
if (tempah & 0x01) /* Chk LCDB Mode */ if (tempah & 0x01) /* Chk LCDB Mode */
...@@ -4592,10 +4592,6 @@ static void XGI_DisableBridge(struct xgifb_video_info *xgifb_info, ...@@ -4592,10 +4592,6 @@ static void XGI_DisableBridge(struct xgifb_video_info *xgifb_info,
/* Disable Channel B */ /* Disable Channel B */
tempah = 0xBF; tempah = 0xBF;
if (pVBInfo->SetFlag & DisableChB)
/* force to disable Cahnnel */
tempah &= 0xBF;
if (pVBInfo->SetFlag & DisableChA) if (pVBInfo->SetFlag & DisableChA)
/* Force to disable Channel B */ /* Force to disable Channel B */
tempah &= 0x7F; tempah &= 0x7F;
...@@ -4633,16 +4629,14 @@ static void XGI_DisableBridge(struct xgifb_video_info *xgifb_info, ...@@ -4633,16 +4629,14 @@ static void XGI_DisableBridge(struct xgifb_video_info *xgifb_info,
if ((pVBInfo->VBInfo & (SetSimuScanMode | SetCRT2ToDualEdge))) if ((pVBInfo->VBInfo & (SetSimuScanMode | SetCRT2ToDualEdge)))
xgifb_reg_and(pVBInfo->Part2Port, 0x00, 0xdf); xgifb_reg_and(pVBInfo->Part2Port, 0x00, 0xdf);
if ((pVBInfo->SetFlag & DisableChB) || if ((pVBInfo->VBInfo &
(pVBInfo->VBInfo &
(DisableCRT2Display | SetSimuScanMode)) || (DisableCRT2Display | SetSimuScanMode)) ||
((!(pVBInfo->VBInfo & XGI_SetCRT2ToLCDA)) && ((!(pVBInfo->VBInfo & XGI_SetCRT2ToLCDA)) &&
(pVBInfo->VBInfo & (pVBInfo->VBInfo &
(SetCRT2ToRAMDAC | SetCRT2ToLCD | SetCRT2ToTV)))) (SetCRT2ToRAMDAC | SetCRT2ToLCD | SetCRT2ToTV))))
xgifb_reg_or(pVBInfo->Part1Port, 0x00, 0x80); xgifb_reg_or(pVBInfo->Part1Port, 0x00, 0x80);
if ((pVBInfo->SetFlag & DisableChB) || if ((pVBInfo->VBInfo &
(pVBInfo->VBInfo &
(DisableCRT2Display | SetSimuScanMode)) || (DisableCRT2Display | SetSimuScanMode)) ||
(!(pVBInfo->VBInfo & XGI_SetCRT2ToLCDA)) || (!(pVBInfo->VBInfo & XGI_SetCRT2ToLCDA)) ||
(pVBInfo->VBInfo & (pVBInfo->VBInfo &
...@@ -5489,28 +5483,23 @@ static void XGI_EnableBridge(struct xgifb_video_info *xgifb_info, ...@@ -5489,28 +5483,23 @@ static void XGI_EnableBridge(struct xgifb_video_info *xgifb_info,
} }
} }
if (!(pVBInfo->SetFlag & DisableChB)) { if ((pVBInfo->SetFlag & EnableChB) ||
if ((pVBInfo->SetFlag & EnableChB) || (pVBInfo->VBInfo (pVBInfo->VBInfo & (SetCRT2ToLCD | SetCRT2ToTV |
& (SetCRT2ToLCD | SetCRT2ToTV SetCRT2ToRAMDAC))) {
| SetCRT2ToRAMDAC))) { tempah = xgifb_reg_get(pVBInfo->P3c4, 0x32);
tempah = xgifb_reg_get(pVBInfo->P3c4, 0x32); tempah &= 0xDF;
tempah &= 0xDF; if (pVBInfo->VBInfo & SetInSlaveMode) {
if (pVBInfo->VBInfo & SetInSlaveMode) { if (!(pVBInfo->VBInfo & SetCRT2ToRAMDAC))
if (!(pVBInfo->VBInfo & tempah |= 0x20;
SetCRT2ToRAMDAC)) }
tempah |= 0x20; xgifb_reg_set(pVBInfo->P3c4, 0x32, tempah);
} xgifb_reg_or(pVBInfo->P3c4, 0x1E, 0x20);
xgifb_reg_set(pVBInfo->P3c4, 0x32, tempah);
xgifb_reg_or(pVBInfo->P3c4, 0x1E, 0x20);
tempah = xgifb_reg_get(pVBInfo->Part1Port, tempah = xgifb_reg_get(pVBInfo->Part1Port, 0x2E);
0x2E);
if (!(tempah & 0x80)) if (!(tempah & 0x80))
xgifb_reg_or(pVBInfo->Part1Port, xgifb_reg_or(pVBInfo->Part1Port, 0x2E, 0x80);
0x2E, 0x80); xgifb_reg_and(pVBInfo->Part1Port, 0x00, 0x7F);
xgifb_reg_and(pVBInfo->Part1Port, 0x00, 0x7F);
}
} }
if ((pVBInfo->SetFlag & (EnableChA | EnableChB)) if ((pVBInfo->SetFlag & (EnableChA | EnableChB))
...@@ -5545,9 +5534,6 @@ static void XGI_EnableBridge(struct xgifb_video_info *xgifb_info, ...@@ -5545,9 +5534,6 @@ static void XGI_EnableBridge(struct xgifb_video_info *xgifb_info,
if (pVBInfo->VBInfo & XGI_SetCRT2ToLCDA) if (pVBInfo->VBInfo & XGI_SetCRT2ToLCDA)
tempah = tempah ^ 0xC0; tempah = tempah ^ 0xC0;
if (pVBInfo->SetFlag & DisableChB)
tempah &= 0xBF;
if (pVBInfo->SetFlag & DisableChA) if (pVBInfo->SetFlag & DisableChA)
tempah &= 0x7F; tempah &= 0x7F;
......
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