diff options
author | Aaro Koskinen <aaro.koskinen@iki.fi> | 2011-11-27 21:03:10 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-11-27 21:20:12 (GMT) |
commit | 776115a0eb7d7e6ad3325c2ff1f09f8a5b09a807 (patch) | |
tree | dae8ffd3d93e2e81d8f2d8295d7767119574a709 | |
parent | 0ebf538b8ad274c621869b5008779b36c684609a (diff) | |
download | linux-fsl-qoriq-776115a0eb7d7e6ad3325c2ff1f09f8a5b09a807.tar.xz |
staging: xgifb: vb_setmode: make XGI_XG27BLSignalVDD() static
XGI_XG27BLSignalVDD() can be made static. Move the function, so that
forward declaration is not needed.
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | drivers/staging/xgifb/vb_setmode.c | 62 | ||||
-rw-r--r-- | drivers/staging/xgifb/vb_setmode.h | 3 |
2 files changed, 31 insertions, 34 deletions
diff --git a/drivers/staging/xgifb/vb_setmode.c b/drivers/staging/xgifb/vb_setmode.c index abf89763..259474f 100644 --- a/drivers/staging/xgifb/vb_setmode.c +++ b/drivers/staging/xgifb/vb_setmode.c @@ -3788,6 +3788,37 @@ static void XGI_XG21BLSignalVDD(unsigned short tempbh, unsigned short tempbl, xgifb_reg_set(pVBInfo->P3d4, 0x48, temp); } +static void XGI_XG27BLSignalVDD(unsigned short tempbh, unsigned short tempbl, + struct vb_device_info *pVBInfo) +{ + unsigned char CR4A, temp; + unsigned short tempbh0, tempbl0; + + tempbh0 = tempbh; + tempbl0 = tempbl; + tempbh0 &= 0x20; + tempbl0 &= 0x20; + tempbh0 >>= 3; + tempbl0 >>= 3; + + if (tempbh & 0x20) { + temp = (tempbl >> 4) & 0x02; + + /* CR B4[1] */ + xgifb_reg_and_or(pVBInfo->P3d4, 0xB4, ~0x02, temp); + + } + xgifb_reg_and_or(pVBInfo->P3d4, 0xB4, ~tempbh0, tempbl0); + + CR4A = xgifb_reg_get(pVBInfo->P3d4, 0x4A); + tempbh &= 0x03; + tempbl &= 0x03; + tempbh <<= 2; + tempbl <<= 2; /* GPIOC,GPIOD */ + xgifb_reg_and(pVBInfo->P3d4, 0x4A, ~tempbh); /* enable GPIO write */ + xgifb_reg_and_or(pVBInfo->P3d4, 0x48, ~tempbh, tempbl); +} + void XGI_DisplayOn(struct xgi_hw_device_info *pXGIHWDE, struct vb_device_info *pVBInfo) { @@ -5983,37 +6014,6 @@ static void XGI_DisableGatingCRT(struct xgi_hw_device_info *HwDeviceExtension, xgifb_reg_and_or(pVBInfo->P3d4, 0x63, 0xBF, 0x00); } -void XGI_XG27BLSignalVDD(unsigned short tempbh, unsigned short tempbl, - struct vb_device_info *pVBInfo) -{ - unsigned char CR4A, temp; - unsigned short tempbh0, tempbl0; - - tempbh0 = tempbh; - tempbl0 = tempbl; - tempbh0 &= 0x20; - tempbl0 &= 0x20; - tempbh0 >>= 3; - tempbl0 >>= 3; - - if (tempbh & 0x20) { - temp = (tempbl >> 4) & 0x02; - - /* CR B4[1] */ - xgifb_reg_and_or(pVBInfo->P3d4, 0xB4, ~0x02, temp); - - } - xgifb_reg_and_or(pVBInfo->P3d4, 0xB4, ~tempbh0, tempbl0); - - CR4A = xgifb_reg_get(pVBInfo->P3d4, 0x4A); - tempbh &= 0x03; - tempbl &= 0x03; - tempbh <<= 2; - tempbl <<= 2; /* GPIOC,GPIOD */ - xgifb_reg_and(pVBInfo->P3d4, 0x4A, ~tempbh); /* enable GPIO write */ - xgifb_reg_and_or(pVBInfo->P3d4, 0x48, ~tempbh, tempbl); -} - /* --------------------------------------------------------------------- */ unsigned short XGI_GetLVDSOEMTableIndex(struct vb_device_info *pVBInfo) { diff --git a/drivers/staging/xgifb/vb_setmode.h b/drivers/staging/xgifb/vb_setmode.h index 0966463..119884a 100644 --- a/drivers/staging/xgifb/vb_setmode.h +++ b/drivers/staging/xgifb/vb_setmode.h @@ -47,9 +47,6 @@ extern unsigned short XGI_GetRatePtrCRT2(struct xgi_hw_device_info *pXGIHWDE, unsigned short ModeNo, unsigned short ModeIdIndex, struct vb_device_info *); -extern void XGI_XG27BLSignalVDD(unsigned short tempbh, - unsigned short tempbl, - struct vb_device_info *pVBInfo); extern void XGI_XG21SetPanelDelay(unsigned short tempbl, struct vb_device_info *pVBInfo); extern unsigned char XGI_XG21CheckLVDSMode(unsigned short ModeNo, |