From: Marek Vasut Date: Tue, 30 Jul 2013 21:37:57 +0000 (+0200) Subject: video: Encapsulate font in video_font_data.h X-Git-Tag: v2013.10-rc1~35^2~3 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=ac8ba84c56ebcb61ce17c2a37898b5a432d333f5;p=u-boot video: Encapsulate font in video_font_data.h 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 [agust: fixed build warning for mcc200] Signed-off-by: Anatolij Gustschin --- diff --git a/arch/powerpc/cpu/mpc8xx/video.c b/arch/powerpc/cpu/mpc8xx/video.c index 02cd0debc2..02a0467896 100644 --- a/arch/powerpc/cpu/mpc8xx/video.c +++ b/arch/powerpc/cpu/mpc8xx/video.c @@ -109,7 +109,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 8d5c63c29e..990650c7ef 100644 --- a/common/lcd.c +++ b/common/lcd.c @@ -51,7 +51,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 68ba38b6b3..fd2885573c 100644 --- a/drivers/video/cfb_console.c +++ b/drivers/video/cfb_console.c @@ -197,7 +197,6 @@ #include #include #include -#include #if defined(CONFIG_CMD_DATE) #include diff --git a/drivers/video/sed156x.c b/drivers/video/sed156x.c index d8b0d7f5d6..f324354c39 100644 --- a/drivers/video/sed156x.c +++ b/drivers/video/sed156x.c @@ -25,7 +25,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 7ef9519997..6e341cf759 100644 --- a/include/video_font.h +++ b/include/video_font.h @@ -8,9 +8,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 4e544f0d7f..346a162f56 100644 --- a/include/video_font_data.h +++ b/include/video_font_data.h @@ -8,7 +8,12 @@ #ifndef _VIDEO_FONT_DATA_ #define _VIDEO_FONT_DATA_ -static unsigned char video_fontdata[VIDEO_FONT_SIZE] = { +#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 __maybe_unused video_fontdata[VIDEO_FONT_SIZE] = { /* 0 0x00 '^@' */ 0x00, /* 00000000 */