Merge branch 'master' of git://git.denx.de/u-boot-video
authorTom Rini <trini@ti.com>
Fri, 7 Jun 2013 12:35:36 +0000 (08:35 -0400)
committerTom Rini <trini@ti.com>
Fri, 7 Jun 2013 12:35:36 +0000 (08:35 -0400)
1  2 
drivers/video/cfb_console.c

  #endif
  #endif
  
 +#ifdef CONFIG_VIDEO_MXS
 +#define VIDEO_FB_16BPP_WORD_SWAP
 +#endif
 +
  /*
   * Defines for the MB862xx driver
   */
@@@ -572,8 -568,6 +572,6 @@@ static void video_drawchars(int xx, in
                                        SWAP32((video_font_draw_table32
                                                [bits & 15][3] & eorx) ^ bgx);
                        }
-                       if (cfb_do_flush_cache)
-                               flush_cache((ulong)dest0, 32);
                        dest0 += VIDEO_FONT_WIDTH * VIDEO_PIXEL_SIZE;
                        s++;
                }
@@@ -642,8 -636,6 +640,6 @@@ static void video_invertchar(int xx, in
                for (x = firstx; x < lastx; x++) {
                        u8 *dest = (u8 *)(video_fb_address) + x + y;
                        *dest = ~*dest;
-                       if (cfb_do_flush_cache)
-                               flush_cache((ulong)dest, 4);
                }
        }
  }
@@@ -687,6 -679,8 +683,8 @@@ void console_cursor(int state
                }
                cursor_state = state;
        }
+       if (cfb_do_flush_cache)
+               flush_cache(VIDEO_FB_ADRS, VIDEO_SIZE);
  }
  #endif
  
@@@ -739,8 -733,6 +737,6 @@@ static void console_clear_line(int line
                        memsetl(offset + i * VIDEO_LINE_LEN, size, bgx);
        }
  #endif
-       if (cfb_do_flush_cache)
-               flush_cache((ulong)CONSOLE_ROW_FIRST, CONSOLE_SIZE);
  }
  
  static void console_scrollup(void)
@@@ -1146,6 -1138,8 +1142,8 @@@ void video_putc(const char c
  #else
        parse_putc(c);
  #endif
+       if (cfb_do_flush_cache)
+               flush_cache(VIDEO_FB_ADRS, VIDEO_SIZE);
  }
  
  void video_puts(const char *s)
@@@ -1799,6 -1793,8 +1797,8 @@@ int video_display_bitmap(ulong bmp_imag
        }
  #endif
  
+       if (cfb_do_flush_cache)
+               flush_cache(VIDEO_FB_ADRS, VIDEO_SIZE);
        return (0);
  }
  #endif
@@@ -2209,6 -2205,9 +2209,9 @@@ static int video_init(void
        console_col = 0;
        console_row = 0;
  
+       if (cfb_do_flush_cache)
+               flush_cache(VIDEO_FB_ADRS, VIDEO_SIZE);
        return 0;
  }