public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: "J.D. Bakker" <bakker@thorgal.et.tudelft.nl>,
	linux-mtd@lists.infradead.org
Subject: Re: Handling multiple NAND chips -- take 2
Date: Wed, 25 Feb 2004 21:22:42 +0100	[thread overview]
Message-ID: <200402252023.47907.tglx@linutronix.de> (raw)
In-Reply-To: <a06002001bc6281361918@[130.161.115.44]>

On Wednesday 25 February 2004 18:44, J.D. Bakker wrote:

> * Assumption: all devices are the same type and size.
> * No support (yet) for building a wider data bus through putting
> multiple devices in parallel
> * All detected devices are concatenated and represented as one large
> linear array of pages
> * All devices are soldered to a motherboard. We are not interested in
> taking devices out of the array.
> * No optimizations (yet) wrt accessing device n while device m is
> busy. Easier to get working code fast than to get fast code working,
> and I don't see a way to take advantage of parallelism without
> modifying higher layers
If all devices share the same control lines (except CS) then an optimization 
of accessing device n while m is busy can be rather complex. 

I have already done some tests with 4 chips on a board. The scenario is, that 
all bus /  control lines except the CS lines are shared over all devices.

The idea is to add 3 pointers to the nand structure. 
p_state		points to state 
p_chip_lock	points to chip_lock
p_wq			points to wq

The pointers can either be initialized in the chip driver or are initialized 
by the nand_scan function to the default fields (state, chip_lock, wq). This 
would not break any existing chipdrivers.

All accesses to state, chiplock and wq must be modified so the access happens 
through the pointers instead of accessing the fields directly.

For your case you must initialize the pointers of chip 2 - 8 to share the 
state, chip_lock and wq field of the first chip. The hwcontrol function is 
shared for all chips.

Then you can use the existing mtdconcat layer to build partition(s) over 
several chips. 

This solution supports 
* different chip type / sizes
* removable devices 
* flexible partitioning

-- 
Thomas
________________________________________________________________________
linutronix - competence in embedded & realtime linux
http://www.linutronix.de
mail: tglx@linutronix.de

  parent reply	other threads:[~2004-02-25 20:25 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-02-25 17:44 Handling multiple NAND chips -- take 2 J.D. Bakker
2004-02-25 17:59 ` David Woodhouse
2004-02-25 18:06   ` Derek Jones
2004-02-25 18:29   ` jasmine
2004-02-25 19:35     ` J.D. Bakker
2004-02-25 20:46       ` Thomas Gleixner
2004-02-25 19:19   ` J.D. Bakker
2004-02-25 20:22 ` Thomas Gleixner [this message]
2004-02-26  7:54   ` David Woodhouse

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=200402252023.47907.tglx@linutronix.de \
    --to=tglx@linutronix.de \
    --cc=bakker@thorgal.et.tudelft.nl \
    --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