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.
22 #include <jffs2/load_kernel.h>
26 DECLARE_GLOBAL_DATA_PTR;
28 static ulong calc_fbsize(void)
30 return panel_info.vl_row * panel_info.vl_col *
31 NBITS(panel_info.vl_bpix) / 8;
34 int karo_load_splashimage(int mode)
37 unsigned long la = gd->fb_base;
38 char *splashimage = getenv("splashimage");
39 ulong fbsize = calc_fbsize();
42 if (!la || !splashimage)
45 if ((simple_strtoul(splashimage, &end, 16) != 0) &&
49 la = simple_strtoul(splashimage, NULL, 16);
50 splashimage = "logo.bmp";
58 ret = karo_load_part(splashimage, (void *)la, fbsize);
60 printf("Failed to load logo from '%s': %d\n", splashimage, ret);