* Patch fixes bad flash device length
@ 2010-01-16 3:19 Daniel Helgason
2010-01-17 17:20 ` John Dallaway
0 siblings, 1 reply; 2+ messages in thread
From: Daniel Helgason @ 2010-01-16 3:19 UTC (permalink / raw)
To: ecos-patches
[-- Attachment #1: Type: text/plain, Size: 390 bytes --]
Attached is a patch to
ecos/packages/io/flash/current/src/flashiodevlegacy.c
to fix bad flash device length when configured to use absolute addresses
for flash devices.
See line 130 in the same file to check how the 'end' member of the
device private info is computed and how this patch fixes it.
--
+---------------------------------------------
| Daniel Helgason <dhelgason@shaw.ca>
[-- Attachment #2: flashiodevlegacy.c.diff --]
[-- Type: text/x-patch, Size: 938 bytes --]
--- flashiodevlegacy.c 2009-11-20 14:47:57.000000000 -0800
+++ flashiodevlegacy_new.c 2010-01-15 16:42:09.000000000 -0800
@@ -337,7 +337,7 @@
#ifdef CYGNUM_IO_FLASH_BLOCK_CFG_STATIC_ABSOLUTE_1
static struct flashiodev_priv_t priv1 = CYG_FLASHIODEV_DEV(
CYGNUM_IO_FLASH_BLOCK_ABSOLUTE_START_1, // start
- CYGNUM_IO_FLASH_BLOCK_ABSOLUTE_START_1 + CYGNUM_IO_FLASH_BLOCK_ABSOLUTE_LENGTH_1,
+ CYGNUM_IO_FLASH_BLOCK_ABSOLUTE_LENGTH_1, // end
0, // use_fis
1, // use_static
0, // use_offset
@@ -385,7 +385,7 @@
#ifdef CYGNUM_IO_FLASH_BLOCK_CFG_STATIC_ABSOLUTE_2
static struct flashiodev_priv_t priv2 = CYG_FLASHIODEV_DEV(
CYGNUM_IO_FLASH_BLOCK_ABSOLUTE_START_2, // start
- CYGNUM_IO_FLASH_BLOCK_ABSOLUTE_START_2 + CYGNUM_IO_FLASH_BLOCK_ABSOLUTE_LENGTH_2,
+ CYGNUM_IO_FLASH_BLOCK_ABSOLUTE_LENGTH_2, // end
0, // use_fis
1, // use_static
0, // use_offset
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Patch fixes bad flash device length
2010-01-16 3:19 Patch fixes bad flash device length Daniel Helgason
@ 2010-01-17 17:20 ` John Dallaway
0 siblings, 0 replies; 2+ messages in thread
From: John Dallaway @ 2010-01-17 17:20 UTC (permalink / raw)
To: Daniel Helgason; +Cc: eCos Patches List
[-- Attachment #1: Type: text/plain, Size: 503 bytes --]
Hi Daniel
Daniel Helgason wrote:
> Attached is a patch to
>
> ecos/packages/io/flash/current/src/flashiodevlegacy.c
>
> to fix bad flash device length when configured to use absolute addresses
> for flash devices.
>
> See line 130 in the same file to check how the 'end' member of the
> device private info is computed and how this patch fixes it.
Agreed. Fix checked in. Thank you.
I've also fixed the absolute start address display strings. Final patch
attached.
John Dallaway
eCos maintainer
[-- Attachment #2: flash-abs-length-100117.patch --]
[-- Type: text/x-patch, Size: 5488 bytes --]
Index: ChangeLog
===================================================================
RCS file: /cvs/ecos/ecos/packages/io/flash/current/ChangeLog,v
retrieving revision 1.53
diff -U5 -r1.53 ChangeLog
--- ChangeLog 1 Jul 2009 18:52:09 -0000 1.53
+++ ChangeLog 17 Jan 2010 16:56:44 -0000
@@ -1,5 +1,13 @@
+2010-01-17 John Dallaway <john@dallaway.org.uk>
+
+ * src/flashiodevlegacy.c: Specify flash block device lengths correctly
+ when using static configuration via absolute addresses. Issue reported
+ by Daniel Helgason.
+ * cdl/io_flash.cdl: Fix display strings for
+ CYGNUM_IO_FLASH_BLOCK_ABSOLUTE_START_[12].
+
2009-03-02 Sergei Gavrikov <sergei.gavrikov@gmail.com>
* doc/flash.sgml: Fixed typos in a FLASH API listing.
2009-02-20 Jonathan Larmour <jifl@eCosCentric.com>
@@ -689,11 +697,11 @@
//===========================================================================
// ####GPLCOPYRIGHTBEGIN####
// -------------------------------------------
// This file is part of eCos, the Embedded Configurable Operating System.
-// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2005, 2006, 2008, 2009, 2010 Free Software Foundation, Inc.
//
// 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 or (at your option) any
// later version.
Index: cdl/io_flash.cdl
===================================================================
RCS file: /cvs/ecos/ecos/packages/io/flash/current/cdl/io_flash.cdl,v
retrieving revision 1.21
diff -U5 -r1.21 io_flash.cdl
--- cdl/io_flash.cdl 13 Feb 2009 16:22:38 -0000 1.21
+++ cdl/io_flash.cdl 17 Jan 2010 16:56:44 -0000
@@ -6,11 +6,11 @@
#
# ====================================================================
## ####ECOSGPLCOPYRIGHTBEGIN####
## -------------------------------------------
## This file is part of eCos, the Embedded Configurable Operating System.
-## Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2006 Free Software Foundation, Inc.
+## Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2006, 2009, 2010 Free Software Foundation, Inc.
##
## eCos 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 or (at your option) any later
## version.
@@ -297,11 +297,11 @@
description "
This configures the flash block device $::dev
with absolute base address and a length"
cdl_option CYGNUM_IO_FLASH_BLOCK_ABSOLUTE_START_$::dev {
- display "Start offset from flash base"
+ display "Start absolute address"
flavor data
default_value 0xFFFFFFFF
requires 0xFFFFFFFF != CYGNUM_IO_FLASH_BLOCK_ABSOLUTE_START_$::dev
description "
This gives the absolute address in flash which this
Index: src/flashiodevlegacy.c
===================================================================
RCS file: /cvs/ecos/ecos/packages/io/flash/current/src/flashiodevlegacy.c,v
retrieving revision 1.4
diff -U5 -r1.4 flashiodevlegacy.c
--- src/flashiodevlegacy.c 20 Feb 2009 22:06:15 -0000 1.4
+++ src/flashiodevlegacy.c 17 Jan 2010 16:56:45 -0000
@@ -6,11 +6,11 @@
//
//==========================================================================
// ####ECOSGPLCOPYRIGHTBEGIN####
// -------------------------------------------
// This file is part of eCos, the Embedded Configurable Operating System.
-// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2004, 2009 Free Software Foundation, Inc.
+// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2004, 2009, 2010 Free Software Foundation, Inc.
//
// eCos 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 or (at your option) any later
// version.
@@ -335,11 +335,11 @@
#endif
#ifdef CYGNUM_IO_FLASH_BLOCK_CFG_STATIC_ABSOLUTE_1
static struct flashiodev_priv_t priv1 = CYG_FLASHIODEV_DEV(
CYGNUM_IO_FLASH_BLOCK_ABSOLUTE_START_1, // start
- CYGNUM_IO_FLASH_BLOCK_ABSOLUTE_START_1 + CYGNUM_IO_FLASH_BLOCK_ABSOLUTE_LENGTH_1,
+ CYGNUM_IO_FLASH_BLOCK_ABSOLUTE_LENGTH_1, // end
0, // use_fis
1, // use_static
0, // use_offset
""); // fis_name
#endif
@@ -383,11 +383,11 @@
#endif
#ifdef CYGNUM_IO_FLASH_BLOCK_CFG_STATIC_ABSOLUTE_2
static struct flashiodev_priv_t priv2 = CYG_FLASHIODEV_DEV(
CYGNUM_IO_FLASH_BLOCK_ABSOLUTE_START_2, // start
- CYGNUM_IO_FLASH_BLOCK_ABSOLUTE_START_2 + CYGNUM_IO_FLASH_BLOCK_ABSOLUTE_LENGTH_2,
+ CYGNUM_IO_FLASH_BLOCK_ABSOLUTE_LENGTH_2, // end
0, // use_fis
1, // use_static
0, // use_offset
""); // fis_name
#endif
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-01-17 17:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-01-16 3:19 Patch fixes bad flash device length Daniel Helgason
2010-01-17 17:20 ` John Dallaway
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).