projects
/
oweals
/
u-boot.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'master' of git://git.denx.de/u-boot-mpc85xx
[oweals/u-boot.git]
/
arch
/
sh
/
lib
/
board.c
diff --git
a/arch/sh/lib/board.c
b/arch/sh/lib/board.c
index c97e20c3e1cfc3f3a7cc2506835c59e3071c5562..968566c6f5109b2f1665d7f1c0a0fc898d12af36 100644
(file)
--- a/
arch/sh/lib/board.c
+++ b/
arch/sh/lib/board.c
@@
-1,5
+1,5
@@
/*
/*
- * Copyright (C) 2007,
2008
+ * Copyright (C) 2007,
2008, 2010
* Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
*
* This program is free software; you can redistribute it and/or
* Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
*
* This program is free software; you can redistribute it and/or
@@
-32,6
+32,8
@@
#include <miiphy.h>
#endif
#include <miiphy.h>
#endif
+DECLARE_GLOBAL_DATA_PTR;
+
extern int cpu_init(void);
extern int board_init(void);
extern int dram_init(void);
extern int cpu_init(void);
extern int board_init(void);
extern int dram_init(void);
@@
-43,10
+45,12
@@
unsigned long monitor_flash_len = CONFIG_SYS_MONITOR_LEN;
static int sh_flash_init(void)
{
static int sh_flash_init(void)
{
- DECLARE_GLOBAL_DATA_PTR;
-
gd->bd->bi_flashsize = flash_init();
gd->bd->bi_flashsize = flash_init();
- printf("FLASH: %ldMB\n", gd->bd->bi_flashsize / (1024*1024));
+
+ if (gd->bd->bi_flashsize >= (1024 * 1024))
+ printf("Flash: %ldMB\n", gd->bd->bi_flashsize / (1024*1024));
+ else
+ printf("Flash: %ldKB\n", gd->bd->bi_flashsize / 1024);
return 0;
}
return 0;
}
@@
-89,7
+93,7
@@
static int sh_pci_init(void)
static int sh_mem_env_init(void)
{
static int sh_mem_env_init(void)
{
- mem_malloc_init(
TEXT_BASE - CONFIG_SYS
_GBL_DATA_SIZE -
+ mem_malloc_init(
CONFIG_SYS_TEXT_BASE - GENERATED
_GBL_DATA_SIZE -
CONFIG_SYS_MALLOC_LEN, CONFIG_SYS_MALLOC_LEN - 16);
env_relocate();
jumptable_init();
CONFIG_SYS_MALLOC_LEN, CONFIG_SYS_MALLOC_LEN - 16);
env_relocate();
jumptable_init();
@@
-99,7
+103,6
@@
static int sh_mem_env_init(void)
#if defined(CONFIG_CMD_NET)
static int sh_net_init(void)
{
#if defined(CONFIG_CMD_NET)
static int sh_net_init(void)
{
- DECLARE_GLOBAL_DATA_PTR;
gd->bd->bi_ip_addr = getenv_IPaddr("ipaddr");
return 0;
}
gd->bd->bi_ip_addr = getenv_IPaddr("ipaddr");
return 0;
}
@@
-139,12
+142,10
@@
init_fnc_t *init_sequence[] =
void sh_generic_init(void)
{
void sh_generic_init(void)
{
- DECLARE_GLOBAL_DATA_PTR;
-
bd_t *bd;
init_fnc_t **init_fnc_ptr;
bd_t *bd;
init_fnc_t **init_fnc_ptr;
- memset(gd, 0,
CONFIG_SYS
_GBL_DATA_SIZE);
+ memset(gd, 0,
GENERATED
_GBL_DATA_SIZE);
gd->flags |= GD_FLG_RELOC; /* tell others: relocation done */
gd->flags |= GD_FLG_RELOC; /* tell others: relocation done */