提交 06a4f429 编写于 作者: M Moshe Green 提交者: Greg Kroah-Hartman

staging: sm750fb: rename getChipType to sm750_get_chip_type

Rename CamelCased function getChipType to sm750_get_chip_type
(prefex with sm750 in order to make the context of
the function clear).

This issue was found by checkpatch.pl
Signed-off-by: NMoshe Green <mgmoshes@gmail.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 3d44a78f
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
#define roundedDiv(num, denom) ((2 * (num) + (denom)) / (2 * (denom))) #define roundedDiv(num, denom) ((2 * (num) + (denom)) / (2 * (denom)))
#define MHz(x) ((x) * 1000000) #define MHz(x) ((x) * 1000000)
logical_chip_type_t getChipType(void) logical_chip_type_t sm750_get_chip_type(void)
{ {
unsigned short physicalID; unsigned short physicalID;
char physicalRev; char physicalRev;
...@@ -37,7 +37,7 @@ static unsigned int get_mxclk_freq(void) ...@@ -37,7 +37,7 @@ static unsigned int get_mxclk_freq(void)
unsigned int pll_reg; unsigned int pll_reg;
unsigned int M, N, OD, POD; unsigned int M, N, OD, POD;
if (getChipType() == SM750LE) if (sm750_get_chip_type() == SM750LE)
return MHz(130); return MHz(130);
pll_reg = PEEK32(MXCLK_PLL_CTRL); pll_reg = PEEK32(MXCLK_PLL_CTRL);
...@@ -60,7 +60,7 @@ static void setChipClock(unsigned int frequency) ...@@ -60,7 +60,7 @@ static void setChipClock(unsigned int frequency)
unsigned int ulActualMxClk; unsigned int ulActualMxClk;
/* Cheok_0509: For SM750LE, the chip clock is fixed. Nothing to set. */ /* Cheok_0509: For SM750LE, the chip clock is fixed. Nothing to set. */
if (getChipType() == SM750LE) if (sm750_get_chip_type() == SM750LE)
return; return;
if (frequency) { if (frequency) {
...@@ -90,7 +90,7 @@ static void setMemoryClock(unsigned int frequency) ...@@ -90,7 +90,7 @@ static void setMemoryClock(unsigned int frequency)
/* Cheok_0509: For SM750LE, the memory clock is fixed. /* Cheok_0509: For SM750LE, the memory clock is fixed.
* Nothing to set. * Nothing to set.
*/ */
if (getChipType() == SM750LE) if (sm750_get_chip_type() == SM750LE)
return; return;
if (frequency) { if (frequency) {
...@@ -141,7 +141,7 @@ static void setMasterClock(unsigned int frequency) ...@@ -141,7 +141,7 @@ static void setMasterClock(unsigned int frequency)
/* Cheok_0509: For SM750LE, the memory clock is fixed. /* Cheok_0509: For SM750LE, the memory clock is fixed.
* Nothing to set. * Nothing to set.
*/ */
if (getChipType() == SM750LE) if (sm750_get_chip_type() == SM750LE)
return; return;
if (frequency) { if (frequency) {
...@@ -182,7 +182,7 @@ unsigned int ddk750_getVMSize(void) ...@@ -182,7 +182,7 @@ unsigned int ddk750_getVMSize(void)
unsigned int data; unsigned int data;
/* sm750le only use 64 mb memory*/ /* sm750le only use 64 mb memory*/
if (getChipType() == SM750LE) if (sm750_get_chip_type() == SM750LE)
return SZ_64M; return SZ_64M;
/* for 750,always use power mode0*/ /* for 750,always use power mode0*/
...@@ -221,7 +221,7 @@ int ddk750_initHw(initchip_param_t *pInitParam) ...@@ -221,7 +221,7 @@ int ddk750_initHw(initchip_param_t *pInitParam)
reg |= (CURRENT_GATE_DISPLAY | CURRENT_GATE_LOCALMEM); reg |= (CURRENT_GATE_DISPLAY | CURRENT_GATE_LOCALMEM);
setCurrentGate(reg); setCurrentGate(reg);
if (getChipType() != SM750LE) { if (sm750_get_chip_type() != SM750LE) {
/* set panel pll and graphic mode via mmio_88 */ /* set panel pll and graphic mode via mmio_88 */
reg = PEEK32(VGA_CONFIGURATION); reg = PEEK32(VGA_CONFIGURATION);
reg |= (VGA_CONFIGURATION_PLL | VGA_CONFIGURATION_MODE); reg |= (VGA_CONFIGURATION_PLL | VGA_CONFIGURATION_MODE);
...@@ -320,7 +320,7 @@ unsigned int calcPllValue(unsigned int request_orig, pll_value_t *pll) ...@@ -320,7 +320,7 @@ unsigned int calcPllValue(unsigned int request_orig, pll_value_t *pll)
const int max_OD = 3; const int max_OD = 3;
int max_d = 6; int max_d = 6;
if (getChipType() == SM750LE) { if (sm750_get_chip_type() == SM750LE) {
/* SM750LE don't have /* SM750LE don't have
* programmable PLL and M/N values to work on. * programmable PLL and M/N values to work on.
* Just return the requested clock. * Just return the requested clock.
......
...@@ -69,7 +69,7 @@ typedef struct _initchip_param_t { ...@@ -69,7 +69,7 @@ typedef struct _initchip_param_t {
} }
initchip_param_t; initchip_param_t;
logical_chip_type_t getChipType(void); logical_chip_type_t sm750_get_chip_type(void);
unsigned int calcPllValue(unsigned int request, pll_value_t *pll); unsigned int calcPllValue(unsigned int request, pll_value_t *pll);
unsigned int formatPllReg(pll_value_t *pPLL); unsigned int formatPllReg(pll_value_t *pPLL);
void ddk750_set_mmio(void __iomem *, unsigned short, char); void ddk750_set_mmio(void __iomem *, unsigned short, char);
......
...@@ -117,7 +117,7 @@ static int programModeRegisters(mode_parameter_t *pModeParam, pll_value_t *pll) ...@@ -117,7 +117,7 @@ static int programModeRegisters(mode_parameter_t *pModeParam, pll_value_t *pll)
if (pModeParam->horizontal_sync_polarity) if (pModeParam->horizontal_sync_polarity)
tmp |= DISPLAY_CTRL_HSYNC_PHASE; tmp |= DISPLAY_CTRL_HSYNC_PHASE;
if (getChipType() == SM750LE) { if (sm750_get_chip_type() == SM750LE) {
displayControlAdjust_SM750LE(pModeParam, tmp); displayControlAdjust_SM750LE(pModeParam, tmp);
} else { } else {
reg = PEEK32(CRT_DISPLAY_CTRL) & reg = PEEK32(CRT_DISPLAY_CTRL) &
...@@ -209,7 +209,7 @@ int ddk750_setModeTiming(mode_parameter_t *parm, clock_type_t clock) ...@@ -209,7 +209,7 @@ int ddk750_setModeTiming(mode_parameter_t *parm, clock_type_t clock)
pll.clockType = clock; pll.clockType = clock;
uiActualPixelClk = calcPllValue(parm->pixel_clock, &pll); uiActualPixelClk = calcPllValue(parm->pixel_clock, &pll);
if (getChipType() == SM750LE) { if (sm750_get_chip_type() == SM750LE) {
/* set graphic mode via IO method */ /* set graphic mode via IO method */
outb_p(0x88, 0x3d4); outb_p(0x88, 0x3d4);
outb_p(0x06, 0x3d5); outb_p(0x06, 0x3d5);
......
...@@ -6,7 +6,7 @@ void ddk750_setDPMS(DPMS_t state) ...@@ -6,7 +6,7 @@ void ddk750_setDPMS(DPMS_t state)
{ {
unsigned int value; unsigned int value;
if (getChipType() == SM750LE) { if (sm750_get_chip_type() == SM750LE) {
value = PEEK32(CRT_DISPLAY_CTRL) & ~CRT_DISPLAY_CTRL_DPMS_MASK; value = PEEK32(CRT_DISPLAY_CTRL) & ~CRT_DISPLAY_CTRL_DPMS_MASK;
value |= (state << CRT_DISPLAY_CTRL_DPMS_SHIFT); value |= (state << CRT_DISPLAY_CTRL_DPMS_SHIFT);
POKE32(CRT_DISPLAY_CTRL, value); POKE32(CRT_DISPLAY_CTRL, value);
...@@ -19,7 +19,7 @@ void ddk750_setDPMS(DPMS_t state) ...@@ -19,7 +19,7 @@ void ddk750_setDPMS(DPMS_t state)
static unsigned int getPowerMode(void) static unsigned int getPowerMode(void)
{ {
if (getChipType() == SM750LE) if (sm750_get_chip_type() == SM750LE)
return 0; return 0;
return PEEK32(POWER_MODE_CTRL) & POWER_MODE_CTRL_MODE_MASK; return PEEK32(POWER_MODE_CTRL) & POWER_MODE_CTRL_MODE_MASK;
} }
...@@ -35,7 +35,7 @@ void setPowerMode(unsigned int powerMode) ...@@ -35,7 +35,7 @@ void setPowerMode(unsigned int powerMode)
control_value = PEEK32(POWER_MODE_CTRL) & ~POWER_MODE_CTRL_MODE_MASK; control_value = PEEK32(POWER_MODE_CTRL) & ~POWER_MODE_CTRL_MODE_MASK;
if (getChipType() == SM750LE) if (sm750_get_chip_type() == SM750LE)
return; return;
switch (powerMode) { switch (powerMode) {
......
...@@ -403,7 +403,7 @@ long sm750_sw_i2c_init( ...@@ -403,7 +403,7 @@ long sm750_sw_i2c_init(
if ((clk_gpio > 31) || (data_gpio > 31)) if ((clk_gpio > 31) || (data_gpio > 31))
return -1; return -1;
if (getChipType() == SM750LE) if (sm750_get_chip_type() == SM750LE)
return sm750le_i2c_init(clk_gpio, data_gpio); return sm750le_i2c_init(clk_gpio, data_gpio);
/* Initialize the GPIO pin for the i2c Clock Register */ /* Initialize the GPIO pin for the i2c Clock Register */
......
...@@ -91,7 +91,7 @@ int hw_sm750_inithw(struct sm750_dev *sm750_dev, struct pci_dev *pdev) ...@@ -91,7 +91,7 @@ int hw_sm750_inithw(struct sm750_dev *sm750_dev, struct pci_dev *pdev)
parm = &sm750_dev->initParm; parm = &sm750_dev->initParm;
if (parm->chip_clk == 0) if (parm->chip_clk == 0)
parm->chip_clk = (getChipType() == SM750LE) ? parm->chip_clk = (sm750_get_chip_type() == SM750LE) ?
DEFAULT_SM750LE_CHIP_CLOCK : DEFAULT_SM750LE_CHIP_CLOCK :
DEFAULT_SM750_CHIP_CLOCK; DEFAULT_SM750_CHIP_CLOCK;
...@@ -107,7 +107,7 @@ int hw_sm750_inithw(struct sm750_dev *sm750_dev, struct pci_dev *pdev) ...@@ -107,7 +107,7 @@ int hw_sm750_inithw(struct sm750_dev *sm750_dev, struct pci_dev *pdev)
PEEK32(SYSTEM_CTRL) | SYSTEM_CTRL_PCI_BURST); PEEK32(SYSTEM_CTRL) | SYSTEM_CTRL_PCI_BURST);
} }
if (getChipType() != SM750LE) { if (sm750_get_chip_type() != SM750LE) {
unsigned int val; unsigned int val;
/* does user need CRT? */ /* does user need CRT? */
if (sm750_dev->nocrt) { if (sm750_dev->nocrt) {
...@@ -183,7 +183,7 @@ int hw_sm750_output_setMode(struct lynxfb_output *output, ...@@ -183,7 +183,7 @@ int hw_sm750_output_setMode(struct lynxfb_output *output,
dispSet = 0; dispSet = 0;
channel = *output->channel; channel = *output->channel;
if (getChipType() != SM750LE) { if (sm750_get_chip_type() != SM750LE) {
if (channel == sm750_primary) { if (channel == sm750_primary) {
pr_info("primary channel\n"); pr_info("primary channel\n");
if (output->paths & sm750_panel) if (output->paths & sm750_panel)
...@@ -471,7 +471,7 @@ void hw_sm750_initAccel(struct sm750_dev *sm750_dev) ...@@ -471,7 +471,7 @@ void hw_sm750_initAccel(struct sm750_dev *sm750_dev)
enable2DEngine(1); enable2DEngine(1);
if (getChipType() == SM750LE) { if (sm750_get_chip_type() == SM750LE) {
reg = PEEK32(DE_STATE1); reg = PEEK32(DE_STATE1);
reg |= DE_STATE1_DE_ABORT; reg |= DE_STATE1_DE_ABORT;
POKE32(DE_STATE1, reg); POKE32(DE_STATE1, reg);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册