public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: Shane Nay <shane@agendacomputing.com>
To: David Vrabel <dv207@hermes.cam.ac.uk>
Cc: mtd@infradead.org
Subject: Re: cfi_cmdset_0001.c: do_write_buffer: wrong length
Date: Mon, 18 Dec 2000 23:07:47 +0000	[thread overview]
Message-ID: <0012182307472P.11759@www.easysolutions.net> (raw)
In-Reply-To: <Pine.HPX.4.21L.0012190929510.12642-100000@punch.eng.cam.ac.uk>

On Tuesday 19 December 2000 09:41, David Vrabel wrote:
> On Mon, 18 Dec 2000, Shane Nay wrote:
> > Okay, last message was way cryptic again..., I'm not a master
> > communicator. Anyway, I have succesfully tested the following change on
> > two interleaves. First device:
> > two x16 devices in x8 mode interleaved
> > Second device:
> > one x16 device in x16 mode
> >
> > It's only one change... cfi_cmdset_0001.c:
> > /* Write length of data to come */
> > -cfi_write(map,CMD((len/(cfi->device_type*CFIDEV_INTERLEAVE))-1),cmd_adr)
> >; +cfi_write(map,CMD((len/(cfi->device_type))-1),cmd_adr);
>
> However this would break the case 1 in the table below.  Whereas
>     cfi_write(map, CMD(len/CFIDEV_BUSWIDTH-1), cmd_adr);
> would work.
>
> To add to the table...
>
> 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
> 2 (x16)      2           2 (x16)    len/2-1
>
> It's still len/buswidth-1.
>

Hmm..., good point.  But what about interleaved x8 devices?  Would they be 
fine?  (Brains not functioning at the moment, but my instinct says it would 
be divided by 2 when it should be divided by 1, but I might be messing up the 
"len" calculation that happens before this.  I initially did it the way you 
mention here, but thought I found a flaw, but could definetly be wrong.)

Thanks,
Shane.


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

      reply	other threads:[~2000-12-19 10:08 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
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 [this message]

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=0012182307472P.11759@www.easysolutions.net \
    --to=shane@agendacomputing.com \
    --cc=dv207@hermes.cam.ac.uk \
    --cc=mtd@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