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:51 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-02-15 18:26:17 -0800
commita6f17bc44d27974f6349169af96a34e8dad09f06 (patch)
tree0edcd7baba531011dbe1f403d5a3069efd5a54af /drivers/staging/sm750fb/ddk750_mode.c
parent620c391258928904596acb6635ef9dc28815a6b9 (diff)
downloadlinux-a6f17bc44d27974f6349169af96a34e8dad09f06.tar.bz2
staging: sm750fb: change definition of PANEL_HORIZONTAL_SYNC fields
Use stratight-forward definition of PANEL_HORIZONTAL_SYNC 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 97d803df04a1..4394ad1ff154 100644
--- a/drivers/staging/sm750fb/ddk750_mode.c
+++ b/drivers/staging/sm750fb/ddk750_mode.c
@@ -141,8 +141,11 @@ static int programModeRegisters(mode_parameter_t *pModeParam, pll_value_t *pll)
POKE32(PANEL_HORIZONTAL_TOTAL, reg);
POKE32(PANEL_HORIZONTAL_SYNC,
- FIELD_VALUE(0, PANEL_HORIZONTAL_SYNC, WIDTH, pModeParam->horizontal_sync_width)
- | FIELD_VALUE(0, PANEL_HORIZONTAL_SYNC, START, pModeParam->horizontal_sync_start - 1));
+ ((pModeParam->horizontal_sync_width <<
+ PANEL_HORIZONTAL_SYNC_WIDTH_SHIFT) &
+ PANEL_HORIZONTAL_SYNC_WIDTH_MASK) |
+ ((pModeParam->horizontal_sync_start - 1) &
+ PANEL_HORIZONTAL_SYNC_START_MASK));
POKE32(PANEL_VERTICAL_TOTAL,
FIELD_VALUE(0, PANEL_VERTICAL_TOTAL, TOTAL, pModeParam->vertical_total - 1)