All of lore.kernel.org
 help / color / mirror / Atom feed
From: "D. Vrabel" <dv207@cam.ac.uk>
To: Nicolas Pitre <nico@cam.org>
Cc: mtd@infradead.org
Subject: Re: cfi_cmdset_0001.c: do_write_buffer: wrong length
Date: Fri, 08 Dec 2000 19:56:23 +0000	[thread overview]
Message-ID: <3A313CE7.DFF1BC4E@cam.ac.uk> (raw)
In-Reply-To: Pine.LNX.4.30.0012081303110.6716-100000@xanadu.gn.com

Hi,

Nicolas Pitre wrote:
> 
> On Fri, 8 Dec 2000, David Vrabel wrote:
> >
> > In cfi_cmdset_0001.c do_write_buffer writes an incorrect length to the
> > chip
> >
> >     cfi_write(map, CMD((len/(cfi->device_type*CFIDEV_INTERLEAVE))-1),
> >         cmd_adr);
> >
> > Should it it be?
> >     cfi_write(map, CMD(len/map->buswidth-1), cmd_adr);
> 
> No.  This will break the case where the interleave isn't 1.
> 
> Hmmm... Will it?
> 
> Euh...  Each time I get around this question I get confused...
> 
> Does someone have the data sheet nearby? (I don't ATM)...  What should the
> lenght be if a x16 chip is used in x8 mode?  bytes/sizeof(char) or
> bytes/sizeof(short)?
> 
> On a 2 x16 arrangement you have buswidth=4, interleave=2, devicetype=2.  In
> that case it should be len/4 - 1.
> 
> Maybe you are right after all.

Time to compile a big list of all the arrangements of chips and the
resultant buffer write length...

So far we have:

device type  interleave  bus width    buf write len
2 (x16)      1           1 (x8)       len/1-1
2 (x16)      1           2 (x16)      len/2-1
2 (x16)      2           4 (x32)      len/4-1

So far it len/buswidth-1...

David Vrabel


To unsubscribe, send "unsubscribe mtd" to majordomo@infradead.org

  reply	other threads:[~2000-12-08 19:56 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-12-08 14:45 cfi_cmdset_0001.c: do_write_buffer: wrong length David Vrabel
2000-12-08 18:21 ` Nicolas Pitre
2000-12-08 19:56   ` D. Vrabel [this message]
2000-12-18 22:13     ` Shane Nay
2000-12-18 22:24     ` Shane Nay
2000-12-19  9:41       ` David Vrabel
2000-12-18 23:07         ` Shane Nay

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=3A313CE7.DFF1BC4E@cam.ac.uk \
    --to=dv207@cam.ac.uk \
    --cc=mtd@infradead.org \
    --cc=nico@cam.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 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.