Commit 60112069 authored by Mike Rapoport's avatar Mike Rapoport Committed by Greg Kroah-Hartman

staging: sm750fb: change definition of PANEL_HORIZONTAL_TOTAL fields

Use stratight-forward defintion of PANEL_HORIZONTAL_TOTAL register fields
and use open-coded implementation for register manipulations
Signed-off-by: default avatarMike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 3e155b81
...@@ -122,9 +122,12 @@ static int programModeRegisters(mode_parameter_t *pModeParam, pll_value_t *pll) ...@@ -122,9 +122,12 @@ static int programModeRegisters(mode_parameter_t *pModeParam, pll_value_t *pll)
POKE32(PANEL_PLL_CTRL, formatPllReg(pll)); POKE32(PANEL_PLL_CTRL, formatPllReg(pll));
POKE32(PANEL_HORIZONTAL_TOTAL, reg = ((pModeParam->horizontal_total - 1) <<
FIELD_VALUE(0, PANEL_HORIZONTAL_TOTAL, TOTAL, pModeParam->horizontal_total - 1) PANEL_HORIZONTAL_TOTAL_TOTAL_SHIFT) &
| FIELD_VALUE(0, PANEL_HORIZONTAL_TOTAL, DISPLAY_END, pModeParam->horizontal_display_end - 1)); PANEL_HORIZONTAL_TOTAL_TOTAL_MASK;
reg |= ((pModeParam->horizontal_display_end - 1) &
PANEL_HORIZONTAL_TOTAL_DISPLAY_END_MASK);
POKE32(PANEL_HORIZONTAL_TOTAL, reg);
POKE32(PANEL_HORIZONTAL_SYNC, POKE32(PANEL_HORIZONTAL_SYNC,
FIELD_VALUE(0, PANEL_HORIZONTAL_SYNC, WIDTH, pModeParam->horizontal_sync_width) FIELD_VALUE(0, PANEL_HORIZONTAL_SYNC, WIDTH, pModeParam->horizontal_sync_width)
......
...@@ -858,8 +858,9 @@ ...@@ -858,8 +858,9 @@
#define PANEL_PLANE_BR_RIGHT_MASK 0xeff #define PANEL_PLANE_BR_RIGHT_MASK 0xeff
#define PANEL_HORIZONTAL_TOTAL 0x080024 #define PANEL_HORIZONTAL_TOTAL 0x080024
#define PANEL_HORIZONTAL_TOTAL_TOTAL 27:16 #define PANEL_HORIZONTAL_TOTAL_TOTAL_SHIFT 16
#define PANEL_HORIZONTAL_TOTAL_DISPLAY_END 11:0 #define PANEL_HORIZONTAL_TOTAL_TOTAL_MASK (0xfff << 16)
#define PANEL_HORIZONTAL_TOTAL_DISPLAY_END_MASK 0xfff
#define PANEL_HORIZONTAL_SYNC 0x080028 #define PANEL_HORIZONTAL_SYNC 0x080028
#define PANEL_HORIZONTAL_SYNC_WIDTH 23:16 #define PANEL_HORIZONTAL_SYNC_WIDTH 23:16
......
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