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 fe53ab4de9194351a9906a91cb44780220847914..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;
}
@@
-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,8
+142,6
@@
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;