qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@web.de>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] CFI02 flashes
Date: Thu, 08 May 2008 20:31:39 +0200	[thread overview]
Message-ID: <4823470B.40803@web.de> (raw)
In-Reply-To: <20080508003435.GB15238@edgar.se.axis.com>

[-- Attachment #1: Type: text/plain, Size: 2006 bytes --]

Edgar E. Iglesias wrote:
> Hello,
> 
> I ran into problems when mounting jffs2 images on CFI02 flashes on a linux
> guest. Looks like we got some fields wrong in our CFI table.
> 
> 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.
> 
> This patch seems to work (only tested with ETRAX/CRIS).
> Comments?

No regressions found for the MusicPal (which uses cfi02 as well). But...

> 
> Best regards
> --
> Edgar E. Iglesias
> Axis Communications AB
> 
> commit 7f62e4f49c65f64ef8624474c5d22d9785d9b18c
> Author: Edgar E. Iglesias <edgar.iglesias@axis.com>
> Date:   Thu May 8 01:48:55 2008 +0200
> 
>     CFI-0002 linux MTD compatibility.
>     * Add an extended table area.
>     * Clear buffer write timeouts to indicate that we dont support it.
>     * Correct device size.
> 
> 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] = 0x02;
>      pfl->cfi_table[0x14] = 0x00;
> -    /* Primary extended table address (none) */
> -    pfl->cfi_table[0x15] = 0x00;
> +    /* Primary extended table address */
> +    pfl->cfi_table[0x15] = 0x31;
>      pfl->cfi_table[0x16] = 0x00;
>      /* Alternate command set (none) */
>      pfl->cfi_table[0x17] = 0x00;
> @@ -627,22 +627,22 @@ pflash_t *pflash_cfi02_register(target_phys_addr_t base, ram_addr_t off,
>      pfl->cfi_table[0x1E] = 0x00;
>      /* Reserved */
>      pfl->cfi_table[0x1F] = 0x07;
> -    /* Timeout for min size buffer write (16 ÄĐs) */

... I had to apply you patch manually due to this encoding issue.

Jan


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 254 bytes --]

      reply	other threads:[~2008-05-08 18:32 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-08  0:34 [Qemu-devel] CFI02 flashes Edgar E. Iglesias
2008-05-08 18:31 ` Jan Kiszka [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4823470B.40803@web.de \
    --to=jan.kiszka@web.de \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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 NNTP newsgroup(s).