Re: [U-Boot] [PATCH 3/5] NetStar: use generic flash driver

2009-03-24 Thread Ladislav Michl
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;
-
-

Re: [U-Boot] [PATCH 3/5] NetStar: use generic flash driver

2009-03-18 Thread Wolfgang Denk
Dear Ladislav Michl,

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:

Applying: NetStar: use generic flash driver
error: patch failed: include/configs/netstar.h:106
error: include/configs/netstar.h: patch does not apply
error: patch failed: board/netstar/netstar.c:21
error: board/netstar/netstar.c: patch does not apply
error: patch failed: board/netstar/Makefile:28
error: board/netstar/Makefile: patch does not apply
fatal: sha1 information is lacking or useless
(include/configs/netstar.h).
Repository lacks necessary blobs to fall back on 3-way merge.
Cannot fall back to three-way merge.
Patch failed at 0001.


Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
The  release  of  emotion  is  what  keeps  us  health.  Emotionally
healthy.
That may be, Doctor. However, I have noted that the healthy  release
of emotion is frequently unhealthy for those closest to you.
-- McCoy and Spock, Plato's Stepchildren, stardate 5784.3
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot