public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* supporting stupid chips
@ 2004-08-20 12:23 Ian Molton
  2004-08-20 23:26 ` supporting stupid chips part II Ian Molton
  0 siblings, 1 reply; 5+ messages in thread
From: Ian Molton @ 2004-08-20 12:23 UTC (permalink / raw)
  To: linux-mtd

Hi.

I've come to the conclusion that my controller only supports word reads from its data register.

the question is, what to do?

My choice would be to provide a read_id function and facility to indicate that read_byte is not available (NULL ptr?). IIRC we can already provide bulk transfer functions anyhow.

If this is OK I can make these changes and submit a patch.

if not, suggestions ?

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: supporting stupid chips part II
  2004-08-20 12:23 supporting stupid chips Ian Molton
@ 2004-08-20 23:26 ` Ian Molton
  2004-08-22 13:10   ` supporting stupid chips part III Ian Molton
  0 siblings, 1 reply; 5+ messages in thread
From: Ian Molton @ 2004-08-20 23:26 UTC (permalink / raw)
  To: linux-mtd

Hi.

I've hacked some new read/write functions and a new command function
too, and I can now get to the 24th block before it complains that every
subsequent block is a bad erase block.

The controller is a pest. for writes of commands, it needs bytes. for
the address it needs a word.

for everything else? god only knows. I think probably words for data
transfers.

having never used MTD before, Im not sure how to go about testing it.

Does it require userspace tools?
Should I see anything in /proc/mtd (or anywhere else) ?
What should I expect it to do, given the disk probably has a SSFDC DOS
filesystem on it (winCE handheld device)?

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: supporting stupid chips part III
  2004-08-20 23:26 ` supporting stupid chips part II Ian Molton
@ 2004-08-22 13:10   ` Ian Molton
  2004-08-22 23:38     ` supporting stupid chips part IV Ian Molton
  0 siblings, 1 reply; 5+ messages in thread
From: Ian Molton @ 2004-08-22 13:10 UTC (permalink / raw)
  To: linux-mtd


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?

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: supporting stupid chips part IV
  2004-08-22 13:10   ` supporting stupid chips part III Ian Molton
@ 2004-08-22 23:38     ` Ian Molton
  2004-08-22 23:43       ` Ian Molton
  0 siblings, 1 reply; 5+ messages in thread
From: Ian Molton @ 2004-08-22 23:38 UTC (permalink / raw)
  To: linux-mtd

This gets worse...

So, now we have the chip reading OK with soft ECC, albeit using a *bizarre* layout for the ECC data.

but it appears the hardware ECC doesnt work! the little bugger.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: supporting stupid chips part IV
  2004-08-22 23:38     ` supporting stupid chips part IV Ian Molton
@ 2004-08-22 23:43       ` Ian Molton
  0 siblings, 0 replies; 5+ messages in thread
From: Ian Molton @ 2004-08-22 23:43 UTC (permalink / raw)
  To: linux-mtd

On Mon, 23 Aug 2004 00:38:35 +0100
Ian Molton <spyro@f2s.com> wrote:

Hit ctrl-enter, oops... try again...

> This gets worse...
> 
> So, now we have the chip reading OK with soft ECC, albeit using a
> *bizarre* layout for the ECC data.
> 
> but it appears the hardware ECC doesnt work! the little bugger.

looking at winCE code more closely, I now see that winCE only uses hw
ECC when *writing*, although it actually seems to reset and enable hw
ECC when reading - just discards the results, bah!

oh well. I guess its back ot soft ECC for now... I'll send an email to
toshiba and see if they have anything to say...

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2004-08-22 23:43 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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   ` supporting stupid chips part III Ian Molton
2004-08-22 23:38     ` supporting stupid chips part IV Ian Molton
2004-08-22 23:43       ` Ian Molton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox