Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 15 Mar 2011 22:52:09 +0200
From:      Aleksandr Rybalko <ray@ddteam.net>
To:        Andrew Duane <aduane@juniper.net>
Cc:        Aleksandr Rybalko <ray@dlink.ua>, Marcel Moolenaar <xcllnt@mac.com>, "freebsd-embedded@freebsd.org" <freebsd-embedded@freebsd.org>, "freebsd-current@freebsd.org" <freebsd-current@freebsd.org>
Subject:   Re: [CFT][patch]cfi driver support for NOR flash arrays
Message-ID:  <20110315225209.2cc2dbe2.ray@ddteam.net>
In-Reply-To: <AC6674AB7BC78549BB231821ABF7A9AE9DC0E6867E@EMBX01-WF.jnpr.net>
References:  <20110314170942.90bfb5a8.ray@dlink.ua> <F9D2993A-F90E-403F-B2E6-01B5BA5C42D9@mac.com> <AC6674AB7BC78549BB231821ABF7A9AE9DC0E6867E@EMBX01-WF.jnpr.net>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi Andrew, Marcel and list readers,

On Tue, 15 Mar 2011 14:41:09 -0400
Andrew Duane <aduane@juniper.net> wrote:

> Marcel Moolenaar wrote:
> > On Mar 14, 2011, at 8:09 AM, Aleksandr Rybalko wrote:
> > 
> >> Hi, all.
> >> 
> >> proposed patch add support of NOR flash arrays to cfi driver
> >> http://my.ddteam.net/files/2011-03-11_cfi_flash_array_support.patch
> > 
> > Hi Aleksandr,
> > 
> > The patch is interesting, but combines a whole bunch of different
> > changes. Some of the changes are similar to the fixes we have at
> > Juniper ourselves, so getting the driver sync'd up is a good idea.
> > Not to mention that we have added support for the SPI interface.
> > 
> > Just a quick question: is an array different from 2 independent
> > CFI devices on the same bus? I mean: can we support an array by
> > having 2 driver instances?
> > 
> > Thanks,
> 
> Arrays can be horizontal or vertical. A vertical array is just two
> chips, 0->XXXXX and XXXXX+1->YYYYYY. This would work with 2 driver
> instances.
> 
> Horizontal (interleaved) is two chips that share a single address
> space and provide alternating bits/bytes/words. This would not work
> with two instances.
> 
> --
> 
> Andrew Duane             Juniper Networks
> 978-589-0551             10 Technology Park Dr
> aduane@juniper.net       Westford, MA  01886-3418
>  

Driver designed to handle "any" array configuration (limitation only
1,2,4,8 for interleaved), only one rule must be applied - flash chips
must be same type, since driver don't handle different timing or sizes
of other chips.

So if for example we have:
	chip 1 at 0x1f000000 size 4M - CS rise on A22=0 and A23=0
	chip 2 at 0x1f400000 size 4M - CS rise on A22=1 and A23=0
	chip 3 at 0x1f800000 size 4M - CS rise on A22=0 and A23=1
as result we get 12M array.

If Marcel question in "can driver support more than one flash chip" -
answer yes, that why I wrote this patch.

But if you need join two devices located not back-to-back on bus -
answer is no. For that case I think best choice strip down one of geom
RAID modules like geom_strip or geom_concat. 

Maybe I misunderstand something, sorry for my English then. :)

-- 
Aleksandr Rybalko <ray@ddteam.net>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20110315225209.2cc2dbe2.ray>