Merge branch 'stable/fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad...
[sfrench/cifs-2.6.git] / arch / arm / plat-samsung / include / plat / regs-fb-v4.h
index 0f43599248ada43b89d8f0d93469197544e9f480..4c3647f8005719ef4a92f049e17f98fb86acc98c 100644 (file)
 
 /* OSD1 and OSD4 do not have register D */
 
-#define VIDOSD_A(_win)                         (0x40 + ((_win) * 16))
-#define VIDOSD_B(_win)                         (0x44 + ((_win) * 16))
-#define VIDOSD_C(_win)                         (0x48 + ((_win) * 16))
-#define VIDOSD_D(_win)                         (0x4C + ((_win) * 16))
-
+#define VIDOSD_BASE                            (0x40)
 
 #define VIDINTCON0                             (0x130)
 
-#define WxKEYCONy(_win, _con)                  ((0x140 + ((_win) * 8)) + ((_con) * 4))
-
 /* WINCONx */
 
 #define WINCONx_CSCWIDTH_MASK                  (0x3 << 26)
 #define WPALCON_W2PAL_16BPP_A555               (1 << 6)
 
 
-/* system specific implementation code for palette sizes, and other
- * information that changes depending on which architecture is being
- * compiled.
-*/
-
-/* return true if window _win has OSD register D */
-#define s3c_fb_has_osd_d(_win) ((_win) != 4 && (_win) != 0)
-
-static inline unsigned int s3c_fb_win_pal_size(unsigned int win)
-{
-       if (win < 2)
-               return 256;
-       if (win < 4)
-               return 16;
-       if (win == 4)
-               return 4;
-
-       BUG();  /* shouldn't get here */
-}
-
-static inline int s3c_fb_validate_win_bpp(unsigned int win, unsigned int bpp)
-{
-       /* all windows can do 1/2 bpp */
-
-       if ((bpp == 25 || bpp == 19) && win == 0)
-               return 0;       /* win 0 does not have 19 or 25bpp modes */
-
-       if (bpp == 4 && win == 4)
-               return 0;
-
-       if (bpp == 8 && (win >= 3))
-               return 0;       /* win 3/4 cannot do 8bpp in any mode */
-
-       return 1;
-}
-
-static inline int s3c_fb_pal_is16(unsigned int window)
-{
-       return window > 1;
-}
-
-struct s3c_fb_palette {
-       struct fb_bitfield      r;
-       struct fb_bitfield      g;
-       struct fb_bitfield      b;
-       struct fb_bitfield      a;
-};
-
-static inline void s3c_fb_init_palette(unsigned int window,
-                                      struct s3c_fb_palette *palette)
-{
-       if (window < 2) {
-               /* Windows 0/1 are 8/8/8 or A/8/8/8 */
-               palette->r.offset = 16;
-               palette->r.length = 8;
-               palette->g.offset = 8;
-               palette->g.length = 8;
-               palette->b.offset = 0;
-               palette->b.length = 8;
-       } else {
-               /* currently we assume RGB 5/6/5 */
-               palette->r.offset = 11;
-               palette->r.length = 5;
-               palette->g.offset = 5;
-               palette->g.length = 6;
-               palette->b.offset = 0;
-               palette->b.length = 5;
-       }
-}
-
 /* Notes on per-window bpp settings
  *
  * Value       Win0     Win1     Win2     Win3     Win 4