Commit 40403c1b authored by Juston Li's avatar Juston Li Committed by Greg Kroah-Hartman

staging: sm750fb: add missing blank line after declarations

Fixes checkpatch.pl
WARNING: Missing a blank line after declarations
Signed-off-by: default avatarJuston Li <juston.h.li@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 7b05cbe8
...@@ -474,6 +474,7 @@ unsigned int calcPllValue(unsigned int request_orig, pll_value_t *pll) ...@@ -474,6 +474,7 @@ unsigned int calcPllValue(unsigned int request_orig, pll_value_t *pll)
M += (fl_quo*X % 10000) > 5000?1:0; M += (fl_quo*X % 10000) > 5000?1:0;
if (M < 256 && M > 0) { if (M < 256 && M > 0) {
unsigned int diff; unsigned int diff;
tmpClock = pll->inputFreq * M / N / X; tmpClock = pll->inputFreq * M / N / X;
diff = absDiff(tmpClock, request_orig); diff = absDiff(tmpClock, request_orig);
if (diff < miniDiff) { if (diff < miniDiff) {
......
...@@ -121,6 +121,7 @@ static void setDisplayControl(int ctrl, int dispState) ...@@ -121,6 +121,7 @@ static void setDisplayControl(int ctrl, int dispState)
static void waitNextVerticalSync(int ctrl, int delay) static void waitNextVerticalSync(int ctrl, int delay)
{ {
unsigned int status; unsigned int status;
if (!ctrl) { if (!ctrl) {
/* primary controller */ /* primary controller */
...@@ -210,6 +211,7 @@ static void swPanelPowerSequence(int disp, int delay) ...@@ -210,6 +211,7 @@ static void swPanelPowerSequence(int disp, int delay)
void ddk750_setLogicalDispOut(disp_output_t output) void ddk750_setLogicalDispOut(disp_output_t output)
{ {
unsigned int reg; unsigned int reg;
if (output & PNL_2_USAGE) { if (output & PNL_2_USAGE) {
/* set panel path controller select */ /* set panel path controller select */
reg = PEEK32(PANEL_DISPLAY_CTRL); reg = PEEK32(PANEL_DISPLAY_CTRL);
......
...@@ -43,6 +43,7 @@ int dviInit( ...@@ -43,6 +43,7 @@ int dviInit(
) )
{ {
dvi_ctrl_device_t *pCurrentDviCtrl; dvi_ctrl_device_t *pCurrentDviCtrl;
pCurrentDviCtrl = g_dcftSupportedDviController; pCurrentDviCtrl = g_dcftSupportedDviController;
if (pCurrentDviCtrl->pfnInit != NULL) { if (pCurrentDviCtrl->pfnInit != NULL) {
return pCurrentDviCtrl->pfnInit(edgeSelect, busSelect, dualEdgeClkSelect, hsyncEnable, return pCurrentDviCtrl->pfnInit(edgeSelect, busSelect, dualEdgeClkSelect, hsyncEnable,
......
...@@ -80,6 +80,7 @@ static int programModeRegisters(mode_parameter_t *pModeParam, pll_value_t *pll) ...@@ -80,6 +80,7 @@ static int programModeRegisters(mode_parameter_t *pModeParam, pll_value_t *pll)
int ret = 0; int ret = 0;
int cnt = 0; int cnt = 0;
unsigned int ulTmpValue, ulReg; unsigned int ulTmpValue, ulReg;
if (pll->clockType == SECONDARY_PLL) { if (pll->clockType == SECONDARY_PLL) {
/* programe secondary pixel clock */ /* programe secondary pixel clock */
POKE32(CRT_PLL_CTRL, formatPllReg(pll)); POKE32(CRT_PLL_CTRL, formatPllReg(pll));
...@@ -120,6 +121,7 @@ static int programModeRegisters(mode_parameter_t *pModeParam, pll_value_t *pll) ...@@ -120,6 +121,7 @@ static int programModeRegisters(mode_parameter_t *pModeParam, pll_value_t *pll)
} else if (pll->clockType == PRIMARY_PLL) { } else if (pll->clockType == PRIMARY_PLL) {
unsigned int ulReservedBits; unsigned int ulReservedBits;
POKE32(PANEL_PLL_CTRL, formatPllReg(pll)); POKE32(PANEL_PLL_CTRL, formatPllReg(pll));
POKE32(PANEL_HORIZONTAL_TOTAL, POKE32(PANEL_HORIZONTAL_TOTAL,
...@@ -184,6 +186,7 @@ int ddk750_setModeTiming(mode_parameter_t *parm, clock_type_t clock) ...@@ -184,6 +186,7 @@ int ddk750_setModeTiming(mode_parameter_t *parm, clock_type_t clock)
{ {
pll_value_t pll; pll_value_t pll;
unsigned int uiActualPixelClk; unsigned int uiActualPixelClk;
pll.inputFreq = DEFAULT_INPUT_CLOCK; pll.inputFreq = DEFAULT_INPUT_CLOCK;
pll.clockType = clock; pll.clockType = clock;
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
void ddk750_setDPMS(DPMS_t state) void ddk750_setDPMS(DPMS_t state)
{ {
unsigned int value; unsigned int value;
if (getChipType() == SM750LE) { if (getChipType() == SM750LE) {
value = PEEK32(CRT_DISPLAY_CTRL); value = PEEK32(CRT_DISPLAY_CTRL);
POKE32(CRT_DISPLAY_CTRL, FIELD_VALUE(value, CRT_DISPLAY_CTRL, DPMS, state)); POKE32(CRT_DISPLAY_CTRL, FIELD_VALUE(value, CRT_DISPLAY_CTRL, DPMS, state));
......
...@@ -340,6 +340,7 @@ void sii164EnableHotPlugDetection( ...@@ -340,6 +340,7 @@ void sii164EnableHotPlugDetection(
) )
{ {
unsigned char detectReg; unsigned char detectReg;
detectReg = i2cReadReg(SII164_I2C_ADDRESS, SII164_DETECT); detectReg = i2cReadReg(SII164_I2C_ADDRESS, SII164_DETECT);
/* Depending on each DVI controller, need to enable the hot plug based on each /* Depending on each DVI controller, need to enable the hot plug based on each
......
...@@ -152,6 +152,7 @@ unsigned int rop2) /* ROP value */ ...@@ -152,6 +152,7 @@ unsigned int rop2) /* ROP value */
{ {
unsigned int nDirection, de_ctrl; unsigned int nDirection, de_ctrl;
int opSign; int opSign;
nDirection = LEFT_TO_RIGHT; nDirection = LEFT_TO_RIGHT;
/* Direction of ROP2 operation: 1 = Left to Right, (-1) = Right to Left */ /* Direction of ROP2 operation: 1 = Left to Right, (-1) = Right to Left */
opSign = 1; opSign = 1;
......
...@@ -61,6 +61,7 @@ writel((data), cursor->mmio + (addr)) ...@@ -61,6 +61,7 @@ writel((data), cursor->mmio + (addr))
void hw_cursor_enable(struct lynx_cursor *cursor) void hw_cursor_enable(struct lynx_cursor *cursor)
{ {
u32 reg; u32 reg;
reg = FIELD_VALUE(0, HWC_ADDRESS, ADDRESS, cursor->offset)| reg = FIELD_VALUE(0, HWC_ADDRESS, ADDRESS, cursor->offset)|
FIELD_SET(0, HWC_ADDRESS, EXT, LOCAL)| FIELD_SET(0, HWC_ADDRESS, EXT, LOCAL)|
FIELD_SET(0, HWC_ADDRESS, ENABLE, ENABLE); FIELD_SET(0, HWC_ADDRESS, ENABLE, ENABLE);
...@@ -81,6 +82,7 @@ void hw_cursor_setPos(struct lynx_cursor *cursor, ...@@ -81,6 +82,7 @@ void hw_cursor_setPos(struct lynx_cursor *cursor,
int x, int y) int x, int y)
{ {
u32 reg; u32 reg;
reg = FIELD_VALUE(0, HWC_LOCATION, Y, y)| reg = FIELD_VALUE(0, HWC_LOCATION, Y, y)|
FIELD_VALUE(0, HWC_LOCATION, X, x); FIELD_VALUE(0, HWC_LOCATION, X, x);
POKE32(HWC_LOCATION, reg); POKE32(HWC_LOCATION, reg);
......
...@@ -244,6 +244,7 @@ int hw_sm750_output_setMode(struct lynxfb_output *output, ...@@ -244,6 +244,7 @@ int hw_sm750_output_setMode(struct lynxfb_output *output,
} else { } else {
/* just open DISPLAY_CONTROL_750LE register bit 3:0*/ /* just open DISPLAY_CONTROL_750LE register bit 3:0*/
u32 reg; u32 reg;
reg = PEEK32(DISPLAY_CONTROL_750LE); reg = PEEK32(DISPLAY_CONTROL_750LE);
reg |= 0xf; reg |= 0xf;
POKE32(DISPLAY_CONTROL_750LE, reg); POKE32(DISPLAY_CONTROL_750LE, reg);
...@@ -418,6 +419,7 @@ int hw_sm750_setColReg(struct lynxfb_crtc *crtc, ushort index, ...@@ -418,6 +419,7 @@ int hw_sm750_setColReg(struct lynxfb_crtc *crtc, ushort index,
ushort red, ushort green, ushort blue) ushort red, ushort green, ushort blue)
{ {
static unsigned int add[] = {PANEL_PALETTE_RAM, CRT_PALETTE_RAM}; static unsigned int add[] = {PANEL_PALETTE_RAM, CRT_PALETTE_RAM};
POKE32(add[crtc->channel] + index*4, (red<<16)|(green<<8)|blue); POKE32(add[crtc->channel] + index*4, (red<<16)|(green<<8)|blue);
return 0; return 0;
} }
...@@ -546,6 +548,7 @@ int hw_sm750_setBLANK(struct lynxfb_output *output, int blank) ...@@ -546,6 +548,7 @@ int hw_sm750_setBLANK(struct lynxfb_output *output, int blank)
void hw_sm750_initAccel(struct lynx_share *share) void hw_sm750_initAccel(struct lynx_share *share)
{ {
u32 reg; u32 reg;
enable2DEngine(1); enable2DEngine(1);
if (getChipType() == SM750LE) { if (getChipType() == SM750LE) {
...@@ -575,8 +578,10 @@ void hw_sm750_initAccel(struct lynx_share *share) ...@@ -575,8 +578,10 @@ void hw_sm750_initAccel(struct lynx_share *share)
int hw_sm750le_deWait(void) int hw_sm750le_deWait(void)
{ {
int i = 0x10000000; int i = 0x10000000;
while (i--) { while (i--) {
unsigned int dwVal = PEEK32(DE_STATE2); unsigned int dwVal = PEEK32(DE_STATE2);
if ((FIELD_GET(dwVal, DE_STATE2, DE_STATUS) == DE_STATE2_DE_STATUS_IDLE) && if ((FIELD_GET(dwVal, DE_STATE2, DE_STATUS) == DE_STATE2_DE_STATUS_IDLE) &&
(FIELD_GET(dwVal, DE_STATE2, DE_FIFO) == DE_STATE2_DE_FIFO_EMPTY) && (FIELD_GET(dwVal, DE_STATE2, DE_FIFO) == DE_STATE2_DE_FIFO_EMPTY) &&
(FIELD_GET(dwVal, DE_STATE2, DE_MEM_FIFO) == DE_STATE2_DE_MEM_FIFO_EMPTY)) { (FIELD_GET(dwVal, DE_STATE2, DE_MEM_FIFO) == DE_STATE2_DE_MEM_FIFO_EMPTY)) {
...@@ -591,8 +596,10 @@ int hw_sm750le_deWait(void) ...@@ -591,8 +596,10 @@ int hw_sm750le_deWait(void)
int hw_sm750_deWait(void) int hw_sm750_deWait(void)
{ {
int i = 0x10000000; int i = 0x10000000;
while (i--) { while (i--) {
unsigned int dwVal = PEEK32(SYSTEM_CTRL); unsigned int dwVal = PEEK32(SYSTEM_CTRL);
if ((FIELD_GET(dwVal, SYSTEM_CTRL, DE_STATUS) == SYSTEM_CTRL_DE_STATUS_IDLE) && if ((FIELD_GET(dwVal, SYSTEM_CTRL, DE_STATUS) == SYSTEM_CTRL_DE_STATUS_IDLE) &&
(FIELD_GET(dwVal, SYSTEM_CTRL, DE_FIFO) == SYSTEM_CTRL_DE_FIFO_EMPTY) && (FIELD_GET(dwVal, SYSTEM_CTRL, DE_FIFO) == SYSTEM_CTRL_DE_FIFO_EMPTY) &&
(FIELD_GET(dwVal, SYSTEM_CTRL, DE_MEM_FIFO) == SYSTEM_CTRL_DE_MEM_FIFO_EMPTY)) { (FIELD_GET(dwVal, SYSTEM_CTRL, DE_MEM_FIFO) == SYSTEM_CTRL_DE_MEM_FIFO_EMPTY)) {
......
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