This is the mail archive of the
ecos-patches@sources.redhat.com
mailing list for the eCos project.
Re: [ECOS] Atmel DataFlash Driver and EB55
- From: Andrew Lunn <andrew at lunn dot ch>
- To: Sebastian Block <SebastianBlock at gmx dot net>
- Cc: Savin Zlobec <savin at elatec dot si>, ecos-patches at sources dot redhat dot com
- Date: Wed, 6 Oct 2004 11:50:11 +0200
- Subject: Re: [ECOS] Atmel DataFlash Driver and EB55
- References: <200410060933.39249.SebastianBlock@gmx.net> <20041006082840.GI7625@lunn.ch> <200410061039.40727.SebastianBlock@gmx.net>
> I think there is a general problem, cause this statement
> #ifdef CYGNUM_REDBOOT_FLASH_BASE
> cyg_flash_info_t info;
> #endif
> has no else-tree where a variable calls info is declared when
> REDBOOT_FLASH_BASE isn't set.
> Or am I wrong !?
You are correct, the code is broken. I just committed the following
patch. Do a cvs up for the redboot package.
Andrew
Index: redboot/current/ChangeLog
===================================================================
RCS file: /cvs/ecos/ecos/packages/redboot/current/ChangeLog,v
retrieving revision 1.199.2.4
diff -u -r1.199.2.4 ChangeLog
--- redboot/current/ChangeLog 14 Sep 2004 14:02:47 -0000 1.199.2.4
+++ redboot/current/ChangeLog 6 Oct 2004 09:48:29 -0000
@@ -1,3 +1,8 @@
+2004-10-06 Andrew Lunn <andrew.lunn@ascom.ch>
+
+ * src/flash.c (do_flash_init): We need info independent of
+ CYGNUM_REDBOOT_FLASH_BASE being set or not.
+
2004-09-14 Andrew Lunn <andrew.lunn@ascom.ch>
* cdl/redboot.cdl: Change CYGNUM_REDBOOT_FLASH_BASE to a booldata
Index: redboot/current/src/flash.c
===================================================================
RCS file: /cvs/ecos/ecos/packages/redboot/current/src/flash.c,v
retrieving revision 1.67.2.3
diff -u -r1.67.2.3 flash.c
--- redboot/current/src/flash.c 21 Aug 2004 13:47:13 -0000 1.67.2.3
+++ redboot/current/src/flash.c 6 Oct 2004 09:48:31 -0000
@@ -1374,9 +1374,7 @@
{
int stat, i;
cyg_flashaddr_t err_addr;
-#ifdef CYGNUM_REDBOOT_FLASH_BASE
cyg_flash_info_t info;
-#endif
if (!__flash_init) {
__flash_init = 1;