All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [mips][cfi] Unable to write into flash under qemu
Date: Tue, 5 Jul 2016 19:34:21 +0200	[thread overview]
Message-ID: <577BEF9D.6090608@gmail.com> (raw)
In-Reply-To: <CAOazyz1Vx405FDJh+Tqfg+UtL138m0QFvSBwLN6svxvhpARHDA@mail.gmail.com>



Am 05.07.2016 um 19:17 schrieb Alon Bar-Lev:
> On 5 July 2016 at 20:05, Daniel Schwierzeck
> <daniel.schwierzeck@gmail.com> wrote:
>>
>>
>> Am 05.07.2016 um 18:50 schrieb Alon Bar-Lev:
>>> Thank you so much!
>>> Erase does not complain any more.
>>
>> please do not top-quote on a mailing list.
>>
> 
> Sorry.
> 
>>>
>>> However, write is not working.
>>>
>>> Result is always something like:
>>> be040000: 00800080 00800080 00800080 00800080    ................
>>
>> hm, I can't reproduce that:
>>
>> $ qemu-system-mips -M malta -cpu 24Kc -m 256 -nographic -drive if=pflash,file=/work/u-boot-mips/pflash.bin,format=raw -netdev user,id=ubtest,tftp=/work/u-boot-mips -device pcnet,netdev=ubtest
>>
>> malta # md BE040000 4
>> be040000: ffffffff ffffffff ffffffff ffffffff    ................
>> malta # erase BE040000 +10000
>>
>> . done
>> Erased 1 sectors
>> malta # md BE040000 4
>> be040000: ffffffff ffffffff ffffffff ffffffff    ................
> 
> 
> Can you please try to copy from sector in flash to another as I've shown?
> It seems to happen especially in this case.
> Maybe it is just impossible...
> 
> <snip>
> 

I think it's a bug in flash_write_cfibuffer(). It looks like the flash status value is written to the destination address. It works if you disable CONFIG_SYS_FLASH_USE_BUFFER_WRITE in include/configs/malta.h.

-- 
- Daniel

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: OpenPGP digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160705/be12f9e8/attachment.sig>

  reply	other threads:[~2016-07-05 17:34 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-05  0:08 [U-Boot] [mips][cfi] Unable to write into flash under qemu Alon Bar-Lev
2016-07-05 12:04 ` Alon Bar-Lev
2016-07-05 16:10   ` Daniel Schwierzeck
2016-07-05 16:50     ` Alon Bar-Lev
2016-07-05 17:05       ` Daniel Schwierzeck
2016-07-05 17:17         ` Alon Bar-Lev
2016-07-05 17:34           ` Daniel Schwierzeck [this message]
2016-07-05 17:57             ` Alon Bar-Lev
2016-07-10 20:50     ` Alon Bar-Lev
2016-07-18  8:38       ` Stefan Roese
2016-07-18 12:13         ` Daniel Schwierzeck

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=577BEF9D.6090608@gmail.com \
    --to=daniel.schwierzeck@gmail.com \
    --cc=u-boot@lists.denx.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.