2 * (C) Copyright 2012 Lothar Waßmann <LW@KARO-electronics.de>
4 * See file CREDITS for list of people who contributed to this
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * version 2 as published by the Free Software Foundation.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
23 #include <jffs2/load_kernel.h>
27 DECLARE_GLOBAL_DATA_PTR;
29 #ifndef CONFIG_DM_VIDEO
30 static ulong calc_fbsize(void)
32 return panel_info.vl_row * panel_info.vl_col *
33 NBITS(panel_info.vl_bpix) / 8;
36 static ulong calc_fbsize(void)
42 int karo_load_splashimage(int mode)
45 unsigned long la = gd->fb_base;
46 char *splashimage = getenv("splashimage");
47 ulong fbsize = calc_fbsize();
50 if (!la || !splashimage)
53 if ((simple_strtoul(splashimage, &end, 16) != 0) &&
57 la = simple_strtoul(splashimage, NULL, 16);
58 splashimage = "logo.bmp";
66 ret = karo_load_part(splashimage, (void *)la, fbsize);
68 printf("Failed to load logo from '%s': %d\n", splashimage, ret);