Dear Wolfgang,
On Wed, Mar 18, 2009 at 08:44:20PM +0100, Wolfgang Denk wrote:
In message 20090316222932.gd1...@localhost.localdomain you wrote:
Use generic flash driver.
Signed-off-by: Ladislav Michl la...@linux-mips.org
Does not apply to me:
I'm sorry for that. Updated version follows.
Signed-off-by: Ladislav Michl la...@linux-mips.org
diff --git a/board/netstar/Makefile b/board/netstar/Makefile
index 0d163fd..11a952b 100644
--- a/board/netstar/Makefile
+++ b/board/netstar/Makefile
@@ -28,7 +28,7 @@ include $(TOPDIR)/config.mk
LIB= $(obj)lib$(BOARD).a
-COBJS := netstar.o flash.o
+COBJS := netstar.o
SOBJS := setup.o crcek.o
SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) eeprom.c \
diff --git a/board/netstar/flash.c b/board/netstar/flash.c
deleted file mode 100644
index e9eca35..000
--- a/board/netstar/flash.c
+++ /dev/null
@@ -1,343 +0,0 @@
-/*
- * (C) Copyright 2002
- * Sysgo Real-Time Solutions, GmbH www.elinos.com
- * Alex Zuepke a...@sysgo.de
- *
- * (C) Copyright 2005
- * 2N Telekomunikace, a.s. www.2n.cz
- * Ladislav Michl mi...@2n.cz
- *
- * See file CREDITS for list of people who contributed to this
- * project.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
- */
-
-#include common.h
-
-/*#if 0 */
-#if (PHYS_SDRAM_1_SIZE != SZ_32M)
-
-#include crcek.h
-
-#if (CONFIG_SYS_MAX_FLASH_BANKS 1)
-#error There is always only _one_ flash chip
-#endif
-
-flash_info_t flash_info[CONFIG_SYS_MAX_FLASH_BANKS];
-
-#define CMD_READ_ARRAY 0x00f0
-#define CMD_UNLOCK10x00aa
-#define CMD_UNLOCK20x0055
-#define CMD_ERASE_SETUP0x0080
-#define CMD_ERASE_CONFIRM 0x0030
-#define CMD_PROGRAM0x00a0
-#define CMD_UNLOCK_BYPASS 0x0020
-
-#define MEM_FLASH_ADDR1(*(volatile u16
*)(CONFIG_SYS_FLASH_BASE + (0x0555 1)))
-#define MEM_FLASH_ADDR2(*(volatile u16
*)(CONFIG_SYS_FLASH_BASE + (0x02aa 1)))
-
-#define BIT_ERASE_DONE 0x0080
-#define BIT_RDY_MASK 0x0080
-#define BIT_PROGRAM_ERROR 0x0020
-#define BIT_TIMEOUT0x8000 /* our flag */
-
-/*---
- */
-
-ulong flash_init(void)
-{
- int i;
-
- flash_info[0].flash_id = (AMD_MANUFACT FLASH_VENDMASK) |
-(AMD_ID_LV800B FLASH_TYPEMASK);
- flash_info[0].size = PHYS_FLASH_1_SIZE;
- flash_info[0].sector_count = CONFIG_SYS_MAX_FLASH_SECT;
- memset(flash_info[0].protect, 0, CONFIG_SYS_MAX_FLASH_SECT);
-
- for (i = 0; i flash_info[0].sector_count; i++) {
- switch (i) {
- case 0: /* 16kB */
- flash_info[0].start[0] = CONFIG_SYS_FLASH_BASE;
- break;
- case 1: /* 8kB */
- flash_info[0].start[1] = CONFIG_SYS_FLASH_BASE + 0x4000;
- break;
- case 2: /* 8kB */
- flash_info[0].start[2] = CONFIG_SYS_FLASH_BASE + 0x4000
+
-0x2000;
- break;
- case 3: /* 32 KB */
- flash_info[0].start[3] = CONFIG_SYS_FLASH_BASE + 0x4000
+
-2 * 0x2000;
- break;
- case 4:
- flash_info[0].start[4] = CONFIG_SYS_FLASH_BASE + 0x4000
+
-2 * 0x2000 + 0x8000;
- break;
- default: /* 64kB */
- flash_info[0].start[i] = flash_info[0].start[i-1] +
-0x1;
- break;
- }
- }
-
- /* U-Boot */
- flash_protect(FLAG_PROTECT_SET,
- LOADER1_OFFSET,
- LOADER1_OFFSET + LOADER_SIZE - 1, flash_info);
- /* Protect crcek, env and r_env as well */
- flash_protect(FLAG_PROTECT_SET, 0, 0x8000 - 1, flash_info);
-
- return flash_info[0].size;
-}
-
-/*---
- */
-void flash_print_info(flash_info_t *info)
-{
- int i;
-
-