From: Marek Vasut Date: Tue, 30 Jul 2013 23:37:57 +0200 Subject: [U-Boot] [PATCH 07/11] video: Encapsulate font in video_font_data.h In-Reply-To: <1375220281-11132-1-git-send-email-marex@denx.de> References: <1375220281-11132-1-git-send-email-marex@denx.de> Message-ID: <1375220281-11132-8-git-send-email-marex@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de This patch moves all the font configuration values into video_font_data.h so they are all in the right place with the font. The video_font.h now only includes video_font_data.h and will allow us to select and include different font once more fonts are added. Signed-off-by: Marek Vasut Cc: Anatolij Gustschin --- arch/powerpc/cpu/mpc8xx/video.c | 1 - common/lcd.c | 1 - drivers/video/cfb_console.c | 1 - drivers/video/sed156x.c | 1 - include/video_font.h | 5 +---- include/video_font_data.h | 5 +++++ 6 files changed, 6 insertions(+), 8 deletions(-) diff --git a/arch/powerpc/cpu/mpc8xx/video.c b/arch/powerpc/cpu/mpc8xx/video.c index 1bbf4cc..7725c67 100644 --- a/arch/powerpc/cpu/mpc8xx/video.c +++ b/arch/powerpc/cpu/mpc8xx/video.c @@ -125,7 +125,6 @@ DECLARE_GLOBAL_DATA_PTR; /************************************************************************/ #include /* Get font data, width and height */ -#include #ifdef CONFIG_VIDEO_LOGO #include /* Get logo data, width and height */ diff --git a/common/lcd.c b/common/lcd.c index 50ea4d6..c886641 100644 --- a/common/lcd.c +++ b/common/lcd.c @@ -67,7 +67,6 @@ /* ** FONT DATA */ /************************************************************************/ #include /* Get font data, width and height */ -#include /************************************************************************/ /* ** LOGO DATA */ diff --git a/drivers/video/cfb_console.c b/drivers/video/cfb_console.c index e384b71..edac91c 100644 --- a/drivers/video/cfb_console.c +++ b/drivers/video/cfb_console.c @@ -213,7 +213,6 @@ #include #include #include -#include #if defined(CONFIG_CMD_DATE) #include diff --git a/drivers/video/sed156x.c b/drivers/video/sed156x.c index a610b74..707250d 100644 --- a/drivers/video/sed156x.c +++ b/drivers/video/sed156x.c @@ -41,7 +41,6 @@ /* include the font data */ #include -#include #if VIDEO_FONT_WIDTH != 8 || VIDEO_FONT_HEIGHT != 16 #error Expecting VIDEO_FONT_WIDTH == 8 && VIDEO_FONT_HEIGHT == 16 diff --git a/include/video_font.h b/include/video_font.h index 47957c4..bbe62a3 100644 --- a/include/video_font.h +++ b/include/video_font.h @@ -24,9 +24,6 @@ #ifndef _VIDEO_FONT_ #define _VIDEO_FONT_ -#define VIDEO_FONT_CHARS 256 -#define VIDEO_FONT_WIDTH 8 -#define VIDEO_FONT_HEIGHT 16 -#define VIDEO_FONT_SIZE (VIDEO_FONT_CHARS * VIDEO_FONT_HEIGHT) +#include #endif /* _VIDEO_FONT_ */ diff --git a/include/video_font_data.h b/include/video_font_data.h index c7a8b9b..f9e30aa 100644 --- a/include/video_font_data.h +++ b/include/video_font_data.h @@ -24,6 +24,11 @@ #ifndef _VIDEO_FONT_DATA_ #define _VIDEO_FONT_DATA_ +#define VIDEO_FONT_CHARS 256 +#define VIDEO_FONT_WIDTH 8 +#define VIDEO_FONT_HEIGHT 16 +#define VIDEO_FONT_SIZE (VIDEO_FONT_CHARS * VIDEO_FONT_HEIGHT) + static unsigned char video_fontdata[VIDEO_FONT_SIZE] = { /* 0 0x00 '^@' */ -- 1.7.10.4