summaryrefslogtreecommitdiffstats
path: root/board/genietv
diff options
context:
space:
mode:
authorWolfgang Denk <wd@denx.de>2011-11-04 15:55:41 +0000
committerWolfgang Denk <wd@denx.de>2011-11-07 22:14:25 +0100
commit250b66e2cec11289c41f274082e73cb04706cd3c (patch)
tree448625f2f082fd63a53d50f05fe64e1aec1c597b /board/genietv
parent098a8a83ea36aab1b854dc4880fffb6bdee67905 (diff)
downloadblackbird-obmc-uboot-250b66e2cec11289c41f274082e73cb04706cd3c.tar.gz
blackbird-obmc-uboot-250b66e2cec11289c41f274082e73cb04706cd3c.zip
board/genietv/flash.c: Fix flash initialization
The GENIETV has only one NOR flash bank. Remove all code trying to deal with a second bank. This also fixes a number of GCC 4.6 build warnings: flash.c:65:12: warning: array subscript is above array bounds [-Warray-bounds] flash.c:66:12: warning: array subscript is above array bounds [-Warray-bounds] flash.c:69:12: warning: array subscript is above array bounds [-Warray-bounds] flash.c:183:2: warning: format '%x' expects argument of type 'unsigned int', but argument 2 has type ' Signed-off-by: Wolfgang Denk <wd@denx.de>
Diffstat (limited to 'board/genietv')
-rw-r--r--board/genietv/flash.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/board/genietv/flash.c b/board/genietv/flash.c
index 6170120d53..19a428abb8 100644
--- a/board/genietv/flash.c
+++ b/board/genietv/flash.c
@@ -1,5 +1,5 @@
/*
- * (C) Copyright 2000
+ * (C) Copyright 2000-2011
* Wolfgang Denk, DENX Software Engineering, wd@denx.de.
*
* See file CREDITS for list of people who contributed to this
@@ -38,7 +38,7 @@ static void flash_get_offsets(ulong base, flash_info_t *info);
unsigned long flash_init(void)
{
- unsigned long size_b0, size_b1;
+ unsigned long size_b0;
int i;
/* Init: no FLASHes known */
@@ -60,15 +60,9 @@ unsigned long flash_init(void)
&flash_info[0]);
#endif
- size_b1 = 0 ;
-
- flash_info[1].flash_id = FLASH_UNKNOWN;
- flash_info[1].sector_count = -1;
-
flash_info[0].size = size_b0;
- flash_info[1].size = size_b1;
- return size_b0 + size_b1;
+ return size_b0;
}
/*-----------------------------------------------------------------------
@@ -186,7 +180,7 @@ static ulong flash_get_size(vu_long *addr, flash_info_t *info)
/* Write auto select command: read Manufacturer ID */
- debug("Base address is: %08x\n", caddr);
+ debug("Base address is: %8p\n", caddr);
caddr[0x0555] = 0xAA;
caddr[0x02AA] = 0x55;
OpenPOWER on IntegriCloud