From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JuAuq-0003Z4-Qc for qemu-devel@nongnu.org; Thu, 08 May 2008 14:32:28 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JuAuo-0003Yr-Lc for qemu-devel@nongnu.org; Thu, 08 May 2008 14:32:27 -0400 Received: from [199.232.76.173] (port=37041 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JuAuo-0003Yo-H1 for qemu-devel@nongnu.org; Thu, 08 May 2008 14:32:26 -0400 Received: from fmmailgate01.web.de ([217.72.192.221]:32970) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JuAuo-0006Tb-5D for qemu-devel@nongnu.org; Thu, 08 May 2008 14:32:26 -0400 Received: from smtp07.web.de (fmsmtp07.dlan.cinetic.de [172.20.5.215]) by fmmailgate01.web.de (Postfix) with ESMTP id 8F247DE61B40 for ; Thu, 8 May 2008 20:31:44 +0200 (CEST) Received: from [88.64.10.113] (helo=[192.168.1.198]) by smtp07.web.de with asmtp (TLSv1:AES256-SHA:256) (WEB.DE 4.109 #226) id 1JuAu8-0005Xg-00 for qemu-devel@nongnu.org; Thu, 08 May 2008 20:31:44 +0200 Message-ID: <4823470B.40803@web.de> Date: Thu, 08 May 2008 20:31:39 +0200 From: Jan Kiszka MIME-Version: 1.0 Subject: Re: [Qemu-devel] CFI02 flashes References: <20080508003435.GB15238@edgar.se.axis.com> In-Reply-To: <20080508003435.GB15238@edgar.se.axis.com> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigB5642B32B126B3BD06B2503A" Sender: jan.kiszka@web.de Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigB5642B32B126B3BD06B2503A Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Edgar E. Iglesias wrote: > Hello, >=20 > I ran into problems when mounting jffs2 images on CFI02 flashes on a li= nux > guest. Looks like we got some fields wrong in our CFI table. >=20 > We are reporting a too large device size, MTD doesn't like that. > We are reporting timing info for buffer writes, this makes MTD beleive = we > support buffer writes leading failures when programming. > Also linux MTD seems to require an extended CFI table to use the device= =2E >=20 > This patch seems to work (only tested with ETRAX/CRIS). > Comments? No regressions found for the MusicPal (which uses cfi02 as well). But... >=20 > Best regards > -- > Edgar E. Iglesias > Axis Communications AB >=20 > commit 7f62e4f49c65f64ef8624474c5d22d9785d9b18c > Author: Edgar E. Iglesias > Date: Thu May 8 01:48:55 2008 +0200 >=20 > CFI-0002 linux MTD compatibility. > * Add an extended table area. > * Clear buffer write timeouts to indicate that we dont support it. > * Correct device size. >=20 > diff --git a/hw/pflash_cfi02.c b/hw/pflash_cfi02.c > index cb9b250..1daaac3 100644 > --- a/hw/pflash_cfi02.c > +++ b/hw/pflash_cfi02.c > @@ -608,8 +608,8 @@ pflash_t *pflash_cfi02_register(target_phys_addr_t = base, ram_addr_t off, > /* Command set (AMD/Fujitsu) */ > pfl->cfi_table[0x13] =3D 0x02; > pfl->cfi_table[0x14] =3D 0x00; > - /* Primary extended table address (none) */ > - pfl->cfi_table[0x15] =3D 0x00; > + /* Primary extended table address */ > + pfl->cfi_table[0x15] =3D 0x31; > pfl->cfi_table[0x16] =3D 0x00; > /* Alternate command set (none) */ > pfl->cfi_table[0x17] =3D 0x00; > @@ -627,22 +627,22 @@ pflash_t *pflash_cfi02_register(target_phys_addr_= t base, ram_addr_t off, > pfl->cfi_table[0x1E] =3D 0x00; > /* Reserved */ > pfl->cfi_table[0x1F] =3D 0x07; > - /* Timeout for min size buffer write (16 =C3=84=C4=90s) */ =2E.. I had to apply you patch manually due to this encoding issue. Jan --------------enigB5642B32B126B3BD06B2503A Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4-svn0 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org iD8DBQFII0cPniDOoMHTA+kRAnkmAJ9vvIBIQuTwVHgGhQo5Af9nBJlyhwCeIe3x 20YviLYX7sDmEoeAwWKIxTM= =e34Q -----END PGP SIGNATURE----- --------------enigB5642B32B126B3BD06B2503A--