diff mbox

[U-Boot,10/10] common/lcd.c: move the macro's to the c file

Message ID 1358028480-4979-11-git-send-email-jeroen@myspectrum.nl
State Accepted
Delegated to: Anatolij Gustschin
Headers show

Commit Message

Jeroen Hofstee Jan. 12, 2013, 10:07 p.m. UTC
Hide the console macros since some reference global data which is
no longer present.

cc: Anatolij Gustschin <agust@denx.de>
Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
---
 common/lcd.c  |   28 ++++++++++++++++++++++++++++
 include/lcd.h |   28 ----------------------------
 2 files changed, 28 insertions(+), 28 deletions(-)

Comments

Anatolij Gustschin March 29, 2013, 11:05 a.m. UTC | #1
On Sat, 12 Jan 2013 23:07:59 +0100
Jeroen Hofstee <jeroen@myspectrum.nl> wrote:

> Hide the console macros since some reference global data which is
> no longer present.
> 
> cc: Anatolij Gustschin <agust@denx.de>
> Signed-off-by: Jeroen Hofstee <jeroen@myspectrum.nl>
> ---
>  common/lcd.c  |   28 ++++++++++++++++++++++++++++
>  include/lcd.h |   28 ----------------------------
>  2 files changed, 28 insertions(+), 28 deletions(-)

merged rebased patch, thanks!

Anatolij
diff mbox

Patch

diff --git a/common/lcd.c b/common/lcd.c
index b21ce7f..1fc5e3b 100644
--- a/common/lcd.c
+++ b/common/lcd.c
@@ -81,6 +81,34 @@ 
 #define CONFIG_CONSOLE_SCROLL_LINES 1
 #endif
 
+/************************************************************************/
+/* ** CONSOLE DEFINITIONS & FUNCTIONS					*/
+/************************************************************************/
+#if defined(CONFIG_LCD_LOGO) && !defined(CONFIG_LCD_INFO_BELOW_LOGO)
+# define CONSOLE_ROWS		((panel_info.vl_row-BMP_LOGO_HEIGHT) \
+					/ VIDEO_FONT_HEIGHT)
+#else
+# define CONSOLE_ROWS		(panel_info.vl_row / VIDEO_FONT_HEIGHT)
+#endif
+
+#define CONSOLE_COLS		(panel_info.vl_col / VIDEO_FONT_WIDTH)
+#define CONSOLE_ROW_SIZE	(VIDEO_FONT_HEIGHT * lcd_line_length)
+#define CONSOLE_ROW_FIRST	lcd_console_address
+#define CONSOLE_ROW_SECOND	(lcd_console_address + CONSOLE_ROW_SIZE)
+#define CONSOLE_ROW_LAST	(lcd_console_address + CONSOLE_SIZE \
+					- CONSOLE_ROW_SIZE)
+#define CONSOLE_SIZE		(CONSOLE_ROW_SIZE * CONSOLE_ROWS)
+#define CONSOLE_SCROLL_SIZE	(CONSOLE_SIZE - CONSOLE_ROW_SIZE)
+
+#if LCD_BPP == LCD_MONOCHROME
+# define COLOR_MASK(c)		((c)	  | (c) << 1 | (c) << 2 | (c) << 3 | \
+				 (c) << 4 | (c) << 5 | (c) << 6 | (c) << 7)
+#elif (LCD_BPP == LCD_COLOR8) || (LCD_BPP == LCD_COLOR16)
+# define COLOR_MASK(c)		(c)
+#else
+# error Unsupported LCD BPP.
+#endif
+
 DECLARE_GLOBAL_DATA_PTR;
 
 static void lcd_drawchars(ushort x, ushort y, uchar *str, int count);
diff --git a/include/lcd.h b/include/lcd.h
index c90a5c5..8ff60b7 100644
--- a/include/lcd.h
+++ b/include/lcd.h
@@ -419,33 +419,5 @@  int lcd_get_size(int *line_length);
 #endif
 
 /************************************************************************/
-/* ** CONSOLE DEFINITIONS & FUNCTIONS					*/
-/************************************************************************/
-#if defined(CONFIG_LCD_LOGO) && !defined(CONFIG_LCD_INFO_BELOW_LOGO)
-# define CONSOLE_ROWS		((panel_info.vl_row-BMP_LOGO_HEIGHT) \
-					/ VIDEO_FONT_HEIGHT)
-#else
-# define CONSOLE_ROWS		(panel_info.vl_row / VIDEO_FONT_HEIGHT)
-#endif
-
-#define CONSOLE_COLS		(panel_info.vl_col / VIDEO_FONT_WIDTH)
-#define CONSOLE_ROW_SIZE	(VIDEO_FONT_HEIGHT * lcd_line_length)
-#define CONSOLE_ROW_FIRST	lcd_console_address
-#define CONSOLE_ROW_SECOND	(lcd_console_address + CONSOLE_ROW_SIZE)
-#define CONSOLE_ROW_LAST	(lcd_console_address + CONSOLE_SIZE \
-					- CONSOLE_ROW_SIZE)
-#define CONSOLE_SIZE		(CONSOLE_ROW_SIZE * CONSOLE_ROWS)
-#define CONSOLE_SCROLL_SIZE	(CONSOLE_SIZE - CONSOLE_ROW_SIZE)
-
-#if LCD_BPP == LCD_MONOCHROME
-# define COLOR_MASK(c)		((c)	  | (c) << 1 | (c) << 2 | (c) << 3 | \
-				 (c) << 4 | (c) << 5 | (c) << 6 | (c) << 7)
-#elif (LCD_BPP == LCD_COLOR8) || (LCD_BPP == LCD_COLOR16)
-# define COLOR_MASK(c)		(c)
-#else
-# error Unsupported LCD BPP.
-#endif
-
-/************************************************************************/
 
 #endif	/* _LCD_H_ */