summaryrefslogtreecommitdiff
path: root/arch/powerpc/cpu/mpc512x/diu.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/cpu/mpc512x/diu.c')
-rw-r--r--arch/powerpc/cpu/mpc512x/diu.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/arch/powerpc/cpu/mpc512x/diu.c b/arch/powerpc/cpu/mpc512x/diu.c
index 9361161..f8d19a0 100644
--- a/arch/powerpc/cpu/mpc512x/diu.c
+++ b/arch/powerpc/cpu/mpc512x/diu.c
@@ -34,6 +34,8 @@
#include <video_fb.h>
#endif
+DECLARE_GLOBAL_DATA_PTR;
+
#ifdef CONFIG_FSL_DIU_LOGO_BMP
extern unsigned int FSL_Logo_BMP[];
#else
@@ -65,10 +67,11 @@ void diu_set_pixel_clock(unsigned int pixclock)
char *valid_bmp(char *addr)
{
unsigned long h_addr;
+ bd_t *bd = gd->bd;
h_addr = simple_strtoul(addr, NULL, 16);
- if (h_addr < CONFIG_SYS_FLASH_BASE ||
- h_addr >= (CONFIG_SYS_FLASH_BASE + CONFIG_SYS_FLASH_SIZE - 1)) {
+ if (h_addr < bd->bi_flashstart ||
+ h_addr >= (bd->bi_flashstart + bd->bi_flashsize - 1)) {
printf("bmp addr %lx is not a valid flash address\n", h_addr);
return 0;
} else if ((*(char *)(h_addr) != 'B') || (*(char *)(h_addr+1) != 'M')) {
@@ -84,8 +87,13 @@ int mpc5121_diu_init(void)
char *bmp = NULL;
char *bmp_env;
+#if defined(CONFIG_VIDEO_XRES) & defined(CONFIG_VIDEO_YRES)
+ xres = CONFIG_VIDEO_XRES;
+ yres = CONFIG_VIDEO_YRES;
+#else
xres = 1024;
yres = 768;
+#endif
pixel_format = 0x88883316;
debug("mpc5121_diu_init\n");