summaryrefslogtreecommitdiffstats
path: root/board
diff options
context:
space:
mode:
authorStefan Roese <sr@denx.de>2006-12-22 14:29:40 +0100
committerStefan Roese <sr@denx.de>2006-12-22 14:29:40 +0100
commit1b3c360c235dc684ec06c2d5f183f0a282ce45e2 (patch)
treedb5b5e49ae9d47b56428d1b224ec9d0ba6b25654 /board
parent82e5236a8b719543643fd26d5827938ab2b94818 (diff)
downloadbarebox-1b3c360c235dc684ec06c2d5f183f0a282ce45e2.tar.gz
barebox-1b3c360c235dc684ec06c2d5f183f0a282ce45e2.tar.xz
[PATCH] Fix sequoia flash autodetection (finally correct)
Now 32MByte and 64MByte FLASH is know to work and other configurations should work too. Signed-off-by: Stefan Roese <sr@denx.de>
Diffstat (limited to 'board')
-rw-r--r--board/amcc/sequoia/sequoia.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/board/amcc/sequoia/sequoia.c b/board/amcc/sequoia/sequoia.c
index ccf6f0c803..ff211aef2d 100644
--- a/board/amcc/sequoia/sequoia.c
+++ b/board/amcc/sequoia/sequoia.c
@@ -31,6 +31,8 @@ DECLARE_GLOBAL_DATA_PTR;
extern flash_info_t flash_info[CFG_MAX_FLASH_BANKS]; /* info for FLASH chips */
+ulong flash_get_size (ulong base, int banknum);
+
int board_early_init_f(void)
{
unsigned long sdr0_cust0;
@@ -152,6 +154,11 @@ int misc_init_r(void)
*/
/* Re-do sizing to get full correct info */
+
+ /* adjust flash start and offset */
+ gd->bd->bi_flashstart = 0 - gd->bd->bi_flashsize;
+ gd->bd->bi_flashoffset = 0;
+
#if defined(CONFIG_NAND_U_BOOT) || defined(CONFIG_NAND_SPL)
mtdcr(ebccfga, pb3cr);
#else
@@ -192,9 +199,10 @@ int misc_init_r(void)
#endif
mtdcr(ebccfgd, pbcr);
- /* adjust flash start and offset */
- gd->bd->bi_flashstart = 0 - gd->bd->bi_flashsize;
- gd->bd->bi_flashoffset = 0;
+ /*
+ * Re-check to get correct base address
+ */
+ flash_get_size(gd->bd->bi_flashstart, 0);
#ifdef CFG_ENV_IS_IN_FLASH
/* Monitor protection ON by default */