X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=arch%2Fsh%2Flib%2Fboard.c;h=968566c6f5109b2f1665d7f1c0a0fc898d12af36;hb=5aebe3b07254d9ec8f7ae23a4525a6c535a7f858;hp=fe53ab4de9194351a9906a91cb44780220847914;hpb=1032d97496f6d534bf0030a5779ff1cb38cc9ebf;p=oweals%2Fu-boot.git diff --git a/arch/sh/lib/board.c b/arch/sh/lib/board.c index fe53ab4de9..968566c6f5 100644 --- 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 * * This program is free software; you can redistribute it and/or @@ -32,6 +32,8 @@ #include #endif +DECLARE_GLOBAL_DATA_PTR; + 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) { - DECLARE_GLOBAL_DATA_PTR; - 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; } @@ -99,7 +103,6 @@ static int sh_mem_env_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; } @@ -139,8 +142,6 @@ init_fnc_t *init_sequence[] = void sh_generic_init(void) { - DECLARE_GLOBAL_DATA_PTR; - bd_t *bd; init_fnc_t **init_fnc_ptr;