From: Ian Molton <spyro@f2s.com>
To: linux-mtd@lists.infradead.org
Subject: Re: supporting stupid chips part III
Date: Sun, 22 Aug 2004 14:10:42 +0100 [thread overview]
Message-ID: <20040822141042.3b3f0dfa.spyro@f2s.com> (raw)
In-Reply-To: <20040821002633.13ba0927.spyro@f2s.com>
Hi.
so, we can read the chip... progress!
this isnt sitting very well with me though.
this controllers read accesses to the data register are odd in that it
*requires* word reads for some accesses but not others, which doesnt
mesh well with the generic code.
Currently in the generic code, we call this->read_byte in the functions:
nand_scan
nand_block_bad
nand_check_wp
nand_command
nand_command_lp
nand_wait
in nand_scan(), we use it to read the id and extended id attributes.
in nand_block_bad(), its used to read a single byte of the OOB
in nand_check_wp() its used to read the chips status.
in nand_wait() its used to read the chips status also.
I havent been able to test this, but based on what I know, the usage in
nand_block_bad(), nand_check_wp(), and nand_wait() will probably work on
this chip. nand_scan() does not as it attempts two consecutive reads
when the chip demands a word read.
Im also unclear as to what on earth nand_command() is up to when given a
SEQIN comand - heres the code...
if (command == NAND_CMD_SEQIN) {
int readcmd;
if (column >= mtd->oobblock) {
/* OOB area */
column -= mtd->oobblock;
readcmd = NAND_CMD_READOOB;
} else if (column < 256) {
/* First 256 bytes --> READ0 */
readcmd = NAND_CMD_READ0;
} else {
column -= 256;
readcmd = NAND_CMD_READ1;
}
this->write_byte(mtd, readcmd);
}
this->write_byte(mtd, command);
SEQIN is 0x80, and according to both my spec and my disassemblies, you
dont send additional data with it. AFAICT, every time we send SEQIN we
send readcmd first. why?
next prev parent reply other threads:[~2004-08-22 13:10 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-08-20 12:23 supporting stupid chips Ian Molton
2004-08-20 23:26 ` supporting stupid chips part II Ian Molton
2004-08-22 13:10 ` Ian Molton [this message]
2004-08-22 23:38 ` supporting stupid chips part IV Ian Molton
2004-08-22 23:43 ` Ian Molton
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=20040822141042.3b3f0dfa.spyro@f2s.com \
--to=spyro@f2s.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