summaryrefslogtreecommitdiffstats
path: root/drivers/staging/sm750fb/ddk750_mode.c
diff options
context:
space:
mode:
authorMike Rapoport <mike.rapoport@gmail.com>2016-02-15 19:53:52 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-02-15 18:26:17 -0800
commit6014a31dd607a6e6224b17c6d74df45ffeb45328 (patch)
tree0f9fac37e578bded55a98190eaf5f2e237abe611 /drivers/staging/sm750fb/ddk750_mode.c
parenta6f17bc44d27974f6349169af96a34e8dad09f06 (diff)
staging: sm750fb: change definition of PANEL_VERTICAL_TOTAL fields
Use stratight-forward definition of PANEL_VERTICAL_TOTAL register fields and use open-coded implementation for register manipulation Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/sm750fb/ddk750_mode.c')
-rw-r--r--drivers/staging/sm750fb/ddk750_mode.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/staging/sm750fb/ddk750_mode.c b/drivers/staging/sm750fb/ddk750_mode.c
index 4394ad1ff154..7c4f3fba0e80 100644
--- a/drivers/staging/sm750fb/ddk750_mode.c
+++ b/drivers/staging/sm750fb/ddk750_mode.c
@@ -148,8 +148,11 @@ static int programModeRegisters(mode_parameter_t *pModeParam, pll_value_t *pll)
PANEL_HORIZONTAL_SYNC_START_MASK));
POKE32(PANEL_VERTICAL_TOTAL,
- FIELD_VALUE(0, PANEL_VERTICAL_TOTAL, TOTAL, pModeParam->vertical_total - 1)
- | FIELD_VALUE(0, PANEL_VERTICAL_TOTAL, DISPLAY_END, pModeParam->vertical_display_end - 1));
+ (((pModeParam->vertical_total - 1) <<
+ PANEL_VERTICAL_TOTAL_TOTAL_SHIFT) &
+ PANEL_VERTICAL_TOTAL_TOTAL_MASK) |
+ ((pModeParam->vertical_display_end - 1) &
+ PANEL_VERTICAL_TOTAL_DISPLAY_END_MASK));
POKE32(PANEL_VERTICAL_SYNC,
FIELD_VALUE(0, PANEL_VERTICAL_SYNC, HEIGHT, pModeParam->vertical_sync_height)