This is the mail archive of the
ecos-patches@sources.redhat.com
mailing list for the eCos project.
Re: Flash infrastructure rework
- From: Savin Zlobec <savin at elatec dot si>
- To: Andrew Lunn <andrew at lunn dot ch>
- Cc: eCos Patches <ecos-patches at ecos dot sourceware dot org>
- Date: Tue, 28 Sep 2004 12:08:23 +0200
- Subject: Re: Flash infrastructure rework
- References: <413EFA11.8060505@elatec.si> <20040914160913.GJ18964@lunn.ch>
Andrew Lunn wrote:
2) cyg_flash_erase/program/read loops have their condition set
to addr <= end_addr, many flash drivers calculate flash end address
as CYGNUM_FLASH_BASE+ (flash_dev_info->device_size * CYGNUM_FLASH_SERIES).
If the end address is not in the flash then erase/program/read ops
beyond the flash space can result in endless loops (the lower layer funs are
actually called with length = 0).
I decided that the end address should be the last valid address of the
flash, not the first invalid address. Attached (if i remember) is a
patch which makes all the v2 device drivers consistenly set this
correctly. Also the legacy driver interface now correctly sets the end
address. I also added code which checks the end address against the
block info when asserts are enabled.
This will require a minor change to your dataFlash driver. Would you
like me to commit the dataflash driver to the flash_v2 tree?
Hi Andrew,
thanx for the changes - I'll fix the dataflash driver and test it.
I intend to slightly change the dataflash API, so its best to
hold off the commit till this gets done.
savin