From: Dmitry <daermon@mail.ru>
To: linux-mtd@lists.infradead.org
Subject: m28w640fst flash: quarduple words write method
Date: Thu, 18 Jan 2007 16:40:22 +0200 [thread overview]
Message-ID: <eoo0sn$p05$1@sea.gmane.org> (raw)
Hi, All
Kernel: linux-sh4-2.6.11.12_stm20-33
flash: m28w640fst
This flash is CFI compatible, but it doesn't support buffer write method
(CFI command - 0xe8). Flash support single (CFI command - 0x10 or 0x40),
double (CFI command - 0x30) and quadruple (CFI command - 0x56) words
write method.
MTD supports only single word write method for this flash.
I have implemented double words write method. It works fine.
But I have problem with quadruple word write method implementation.
Part of function:
static int __xipram do_write_quadrupleword(
struct map_info *map,
struct flchip *chip,
unsigned long adr,
const u_char *buf,
int len)
{
<...skip...>
XIP_INVAL_CACHED_RANGE(map, adr, map_bankwidth(map));
ENABLE_VPP(map);
xip_disable(map, chip, adr);
map_write(map, CMD(0x56), adr);
datum = map_word_ff(map);
datum = map_word_load(map, buf);
map_write(map, datum, adr);
datum = map_word_load(map, buf+2);
map_write(map, datum, adr+2);
datum = map_word_load(map, buf+4);
map_write(map, datum, adr+4);
datum = map_word_load(map, buf+6);
map_write(map, datum, adr+6);
map_write(map,CMD(0x70),adr);
status = map_read(map, adr);
printk("--> %s: status %X\n", __FUNCTION__, status);
<...skip...>
Several fist status is 0x80 ('OK'), then function gets status 0x92
('Program Error' and 'Program/Erase on protected Block, Abort').
Does anybody implement this write method or know what wrong?
Thank you.
reply other threads:[~2007-01-18 14:56 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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='eoo0sn$p05$1@sea.gmane.org' \
--to=daermon@mail.ru \
--cc=linux-mtd@lists.infradead.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