All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Artem B. Bityutskiy" <dedekind@yandex.ru>
To: David Brownell <david-b@pacbell.net>
Cc: Linux MTD <linux-mtd@lists.infradead.org>
Subject: Re: DataFlash & writesize
Date: Tue, 27 Jun 2006 11:05:55 +0400	[thread overview]
Message-ID: <44A0D8D3.4020908@yandex.ru> (raw)
In-Reply-To: <200606261333.11632.david-b@pacbell.net>

David,

David Brownell wrote:
> What are the intended semantics for "writesize" by the way?

Design-wise, it an attempt to generalize MTD. Different flashes have 
different minimal I/O unit size, like 1 byte in case of NOR, 16 bytes in 
case of ECCed NOR, 512/2K in case of NAND, etc. There were no such a 
field before and we had to do ugly things like


switch (mtd->type) {
	case MTD_NORFLASH:
		blah();
		break;
	case MTD_NANDFLASH:
		blah1();

etc.

Here is a comment from include/linux/mtd.h:

/* Minimal writable flash unit size. In case of NOR flash it is 1 (even
  * though individual bits can be cleared), in case of NAND flash it is
  * one NAND page (or half, or one-fourths of it), in case of ECC-ed NOR
  * it is of ECC block size, etc. It is illegal to have writesize = 0.
  * Any driver registering a struct mtd_info must ensure a writesize of
  * 1 or larger.
  */

> I noticed I was getting that first BUG_ON in mtdcore:add_mtd_device
> since, with NOR CFI cmdset 1 flash, with current GIT.  Seems like
> writesie should have been set up already.

We fixed all drivers and now it should be fine - see commit 
17ffc7ba6d7ea68b8d5f55a5ca1b87163e69720d

-- 
Best Regards,
Artem B. Bityutskiy,
St.-Petersburg, Russia.

  parent reply	other threads:[~2006-06-27  7:06 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-20  7:49 DataFlash & writesize Artem B. Bityutskiy
2006-06-23 10:27 ` Andrew Victor
2006-06-23 10:43   ` Artem B. Bityutskiy
2006-06-26 20:33     ` David Brownell
2006-06-26 21:42       ` Josh Boyer
2006-06-26 22:27         ` David Brownell
2006-06-26 22:32           ` Thomas Gleixner
2006-06-27  7:02       ` Artem B. Bityutskiy
2006-06-27  7:05       ` Artem B. Bityutskiy [this message]
2006-06-27  8:10         ` David Brownell

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=44A0D8D3.4020908@yandex.ru \
    --to=dedekind@yandex.ru \
    --cc=david-b@pacbell.net \
    --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 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.