]>
git.ipfire.org Git - people/ms/u-boot.git/blob - board/ssv/adnpesc1/flash.c
fd8379b1b825b3c106e9fab24d2d7b205a60a5a0
2 * (C) Copyright 2000-2004
3 * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
5 * (C) Copyright 2004, Li-Pro.Net <www.li-pro.net>
6 * Stephan Linz <linz@li-pro.net>
8 * See file CREDITS for list of people who contributed to this
11 * This program is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU General Public License as
13 * published by the Free Software Foundation; either version 2 of
14 * the License, or (at your option) any later version.
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
21 * You should have received a copy of the GNU General Public License
22 * along with this program; if not, write to the Free Software
23 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
32 * include common flash code (for ssv boards)
34 #include "../common/flash.c"
36 /*---------------------------------------------------------------------*/
37 #define BANKSZ (8 * 1024 * 1024)
38 #define SECTSZ (64 * 1024)
39 #define UBOOTSECS ((CFG_MONITOR_LEN + CFG_ENV_SIZE) / SECTSZ)
40 #define UBOOTAREA (UBOOTSECS * 64 * 1024) /* monitor / env area */
42 /*---------------------------------------------------------------------*/
43 unsigned long flash_init (void)
47 flash_info_t
*fli
= &flash_info
[0];
50 fli
->sector_count
= CFG_MAX_FLASH_SECT
;
51 fli
->flash_id
= FLASH_MAN_AMD
+ FLASH_AMLV640U
;
53 addr
= CFG_FLASH_BASE
;
54 for (i
= 0; i
< fli
->sector_count
; ++i
) {
58 /* Protect monitor / environment area */
59 if (addr
<= (CFG_FLASH_BASE
+ UBOOTAREA
))