From: Shawn Jin <shawnxtech@yahoo.com>
To: linuxmtd <linux-mtd@lists.infradead.org>
Subject: Why CFI_DEVICETYPE_X8 in cfi_send_gen_cmd()?
Date: Tue, 24 Feb 2004 17:24:49 -0800 (PST) [thread overview]
Message-ID: <20040225012449.90118.qmail@web20722.mail.yahoo.com> (raw)
Hi,
In cfi_cmdset_0002.c, there is a piece of comment stating that the
CFI_DEVICETYPE_X8 is needed even when cfi->device_type !=
CFI_DEVICETYPE_X8. Why is it the case?
In my case, two Am29PL320D chips are interleaved and each works in 32-bit
mode. So the buswidth is 64 bits. When CFI_DEVICETYPE_x8 is used in either
erase_oneblock() or write_oneword(), the command address generated is not
right. For example, to erase a block, the following commands are generated:
Addr: 0xff002aaa Data: 0x000000aa000000aa
Addr: 0xff001554 Data: 0x0000005500000055
I found out that the cfi->addr_unlock1(2) are set to 0x1555 (0xaaa) because
of CFI_DEVICETYPE_X32 in cfi_cmdset_0002().
According to the datasheet of Am29PL320D
(http://www.amd.com/us-en/assets/content_type/white_papers_and_tech_docs/24075.pdf),
the correct addresses should be 0xff002aa8 (555 << 3) and 0xff001550 (2aa
<< 3).
So I replaced CFI_DEVICETYPE_X8 with cfi->device_type in both
do_erase_oneblock() and do_write_oneword(). I tested and found that erase
can succeed but write still fails.
Any ideas or explanations?
Thanks,
-Shawn.
__________________________________
Do you Yahoo!?
Yahoo! Mail SpamGuard - Read only the mail you want.
http://antispam.yahoo.com/tools
next reply other threads:[~2004-02-25 1:24 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-02-25 1:24 Shawn Jin [this message]
2004-02-25 11:08 ` Why CFI_DEVICETYPE_X8 in cfi_send_gen_cmd()? David Vrabel
2004-02-25 12:31 ` David Woodhouse
[not found] <3236F92B82933347807DFF6A8BA632802133B9@wcosmb04.cos.agilent.com>
2004-02-27 10:03 ` David Vrabel
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=20040225012449.90118.qmail@web20722.mail.yahoo.com \
--to=shawnxtech@yahoo.com \
--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