diff options
author | Mike Rapoport <mike.rapoport@gmail.com> | 2016-02-15 17:53:50 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-02-16 02:26:17 (GMT) |
commit | 620c391258928904596acb6635ef9dc28815a6b9 (patch) | |
tree | 9e9fc386c36246117937bbf9d7168dbbde128054 /drivers | |
parent | 3d5158d3e3d307f0d3cd76305bce5ddc9f4b5628 (diff) | |
download | linux-620c391258928904596acb6635ef9dc28815a6b9.tar.xz |
staging: sm750fb: change definition of CRT_VERTICAL_SYNC fields
Use stratight-forward definition of CRT_VERTICAL_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')
-rw-r--r-- | drivers/staging/sm750fb/ddk750_mode.c | 7 | ||||
-rw-r--r-- | drivers/staging/sm750fb/ddk750_reg.h | 5 |
2 files changed, 8 insertions, 4 deletions
diff --git a/drivers/staging/sm750fb/ddk750_mode.c b/drivers/staging/sm750fb/ddk750_mode.c index c8862e8..97d803d 100644 --- a/drivers/staging/sm750fb/ddk750_mode.c +++ b/drivers/staging/sm750fb/ddk750_mode.c @@ -104,8 +104,11 @@ static int programModeRegisters(mode_parameter_t *pModeParam, pll_value_t *pll) CRT_VERTICAL_TOTAL_DISPLAY_END_MASK)); POKE32(CRT_VERTICAL_SYNC, - FIELD_VALUE(0, CRT_VERTICAL_SYNC, HEIGHT, pModeParam->vertical_sync_height) - | FIELD_VALUE(0, CRT_VERTICAL_SYNC, START, pModeParam->vertical_sync_start - 1)); + ((pModeParam->vertical_sync_height << + CRT_VERTICAL_SYNC_HEIGHT_SHIFT) & + CRT_VERTICAL_SYNC_HEIGHT_MASK) | + ((pModeParam->vertical_sync_start - 1) & + CRT_VERTICAL_SYNC_START_MASK)); tmp = DISPLAY_CTRL_TIMING | DISPLAY_CTRL_PLANE; diff --git a/drivers/staging/sm750fb/ddk750_reg.h b/drivers/staging/sm750fb/ddk750_reg.h index 7b076a5..e0b3938 100644 --- a/drivers/staging/sm750fb/ddk750_reg.h +++ b/drivers/staging/sm750fb/ddk750_reg.h @@ -1392,8 +1392,9 @@ #define CRT_VERTICAL_TOTAL_DISPLAY_END_MASK (0x7ff) #define CRT_VERTICAL_SYNC 0x080218 -#define CRT_VERTICAL_SYNC_HEIGHT 21:16 -#define CRT_VERTICAL_SYNC_START 10:0 +#define CRT_VERTICAL_SYNC_HEIGHT_SHIFT 16 +#define CRT_VERTICAL_SYNC_HEIGHT_MASK (0x3f << 16) +#define CRT_VERTICAL_SYNC_START_MASK 0x7ff #define CRT_SIGNATURE_ANALYZER 0x08021C #define CRT_SIGNATURE_ANALYZER_STATUS 31:16 |