From: Michael Schwingen Date: Tue, 13 Nov 2007 20:13:40 +0100 Subject: [U-Boot-Users] PATCH: support JEDEC flash roms in CFI-flash framework In-Reply-To: <200711131545.40500.sr@denx.de> References: <20071112202311.GB29521@discworld.dascon.de> <200711131545.40500.sr@denx.de> Message-ID: <20071113191340.GB21337@discworld.dascon.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Tue, Nov 13, 2007 at 03:45:40PM +0100, Stefan Roese wrote: > > A reference to a mail thread is not good in a commit description. Please try > to add all necessary infos directly in this text. OK. I will await further comments and then re-submit with documentation. > > + debug("Found JEDEC Flash: %s\n", jedec_entry->name); > > + info->vendor = jedec_entry->CmdSet; > > + /* Todo: do we need device-specific timeouts? */ > > + info->erase_blk_tout = 30000; > > + info->buffer_write_tout = 1000; > > + info->write_tout = 100; > > + info->name = jedec_entry->name; > > How does the Linux driver handle this timeout? Is it device specific there? No. I do not completely understand all the Linux MTD/Flash code, but a quick glance did not show any timer-based timeout handling - it seems the code relies on the timeout bit from the flash (I looked at 2.6.21.6). The Jedec code has no device-specific timeout values in the tables, so I used hardcoded values which seem "big enough". To make this perfect, we would really need device-specific values, but from my expecience, relying on the flash status register to signal timeouts is sufficient. cu Michael