staging: sm750fb: change definition of CRT_AUTO_CENTERING_TL fields
authorMike Rapoport <mike.rapoport@gmail.com>
Mon, 15 Feb 2016 17:53:45 +0000 (19:53 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 16 Feb 2016 02:26:17 +0000 (18:26 -0800)
Use stratight-forward definition of CRT_AUTO_CENTERING_TL register fields

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/sm750fb/ddk750_mode.c
drivers/staging/sm750fb/ddk750_reg.h

index 7e57b57598c95b8604e3f66b9aff243483822e3f..9e762183e3f3acc182071fcacb9fe47de73624c9 100644 (file)
@@ -25,9 +25,7 @@ static unsigned long displayControlAdjust_SM750LE(mode_parameter_t *pModeParam,
           Note that normal SM750/SM718 only use those two register for
           auto-centering mode.
         */
-       POKE32(CRT_AUTO_CENTERING_TL,
-       FIELD_VALUE(0, CRT_AUTO_CENTERING_TL, TOP, 0)
-       | FIELD_VALUE(0, CRT_AUTO_CENTERING_TL, LEFT, 0));
+       POKE32(CRT_AUTO_CENTERING_TL, 0);
 
        POKE32(CRT_AUTO_CENTERING_BR,
        FIELD_VALUE(0, CRT_AUTO_CENTERING_BR, BOTTOM, y - 1)
index 47028974d04286d2ea19573a682174944348f7db..1d8d577c6a736923b48c21ba4620e1d0340f8922 100644 (file)
 #ifndef VALIDATION_CHIP
     /* Auto Centering */
     #define CRT_AUTO_CENTERING_TL                     0x080280
-    #define CRT_AUTO_CENTERING_TL_TOP                 26:16
-    #define CRT_AUTO_CENTERING_TL_LEFT                10:0
+    #define CRT_AUTO_CENTERING_TL_TOP_MASK            (0x7ff << 16)
+    #define CRT_AUTO_CENTERING_TL_LEFT_MASK           0x7ff
 
     #define CRT_AUTO_CENTERING_BR                     0x080284
     #define CRT_AUTO_CENTERING_BR_BOTTOM              26:16