+// SPDX-License-Identifier: GPL-2.0+
/*
* (C) Copyright 2005-2009
* BuS Elektronik GmbH & Co.KG <esw@bus-elektonik.de>
*
* (C) Copyright 2000-2003
* Wolfgang Denk, DENX Software Engineering, wd@denx.de.
- *
- * See file CREDITS for list of people who contributed to this
- * project.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
*/
#include <common.h>
#include <command.h>
#include "asm/m5282.h"
#include <bmp_layout.h>
+#include <env.h>
+#include <init.h>
#include <status_led.h>
#include <bus_vcxk.h>
return 0;
}
-phys_size_t initdram (int board_type)
+int dram_init(void)
{
int size, i;
*(unsigned int *) (CONFIG_SYS_SDRAM_BASE1 + 0x220) = 0xA5A5;
size += CONFIG_SYS_SDRAM_SIZE1 * 1024 * 1024;
#endif
- return size;
+ gd->ram_size = size;
+
+ return 0;
}
#if defined(CONFIG_SYS_DRAM_TEST)
-int testdram (void)
+int testdram(void)
{
uint *pstart = (uint *) CONFIG_SYS_MEMTEST_START;
uint *pend = (uint *) CONFIG_SYS_MEMTEST_END;
int enable;
enable = 1;
- s = getenv("watchdog");
+ s = env_get("watchdog");
if (s != NULL)
if ((strncmp(s, "off", 3) == 0) || (strncmp(s, "0", 1) == 0))
enable = 0;
void __led_set(led_id_t mask, int state)
{
- if (state == STATUS_LED_ON)
+ if (state == CONFIG_LED_STATUS_ON)
MCFGPTA_GPTPORT |= (1 << 3);
else
MCFGPTA_GPTPORT &= ~(1 << 3);
unsigned long splash;
#endif
printf("Init Video as ");
- s = getenv("displaywidth");
+ s = env_get("displaywidth");
if (s != NULL)
display_width = simple_strtoul(s, NULL, 10);
else
display_width = 256;
- s = getenv("displayheight");
+ s = env_get("displayheight");
if (s != NULL)
display_height = simple_strtoul(s, NULL, 10);
else
vcxk_init(display_width, display_height);
#ifdef CONFIG_SPLASH_SCREEN
- s = getenv("splashimage");
+ s = env_get("splashimage");
if (s != NULL) {
splash = simple_strtoul(s, NULL, 16);
vcxk_acknowledge_wait();
/*---------------------------------------------------------------------------*/
#ifdef CONFIG_VIDEO
-int do_brightness(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+int do_brightness(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
int rcode = 0;
ulong side;