diff options
author | Mike Rapoport <mike.rapoport@gmail.com> | 2016-02-15 20:53:49 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-02-16 05:26:17 +0300 |
commit | 3d5158d3e3d307f0d3cd76305bce5ddc9f4b5628 (patch) | |
tree | 84dcb15af50285e2475a9d6683c576b2782fe8ea /drivers/staging/sm750fb/ddk750_mode.c | |
parent | 1adb3c23383e3d2b2b2ae9badba1df9926609308 (diff) | |
download | linux-3d5158d3e3d307f0d3cd76305bce5ddc9f4b5628.tar.xz |
staging: sm750fb: change definition of CRT_VERTICAL_TOTAL fields
Use stratight-forward definition of CRT_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.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/staging/sm750fb/ddk750_mode.c b/drivers/staging/sm750fb/ddk750_mode.c index d425ea1bbe76..c8862e844a54 100644 --- a/drivers/staging/sm750fb/ddk750_mode.c +++ b/drivers/staging/sm750fb/ddk750_mode.c @@ -97,8 +97,11 @@ static int programModeRegisters(mode_parameter_t *pModeParam, pll_value_t *pll) CRT_HORIZONTAL_SYNC_START_MASK)); POKE32(CRT_VERTICAL_TOTAL, - FIELD_VALUE(0, CRT_VERTICAL_TOTAL, TOTAL, pModeParam->vertical_total - 1) - | FIELD_VALUE(0, CRT_VERTICAL_TOTAL, DISPLAY_END, pModeParam->vertical_display_end - 1)); + (((pModeParam->vertical_total - 1) << + CRT_VERTICAL_TOTAL_TOTAL_SHIFT) & + CRT_VERTICAL_TOTAL_TOTAL_MASK) | + ((pModeParam->vertical_display_end - 1) & + CRT_VERTICAL_TOTAL_DISPLAY_END_MASK)); POKE32(CRT_VERTICAL_SYNC, FIELD_VALUE(0, CRT_VERTICAL_SYNC, HEIGHT, pModeParam->vertical_sync_height) |