From owner-freebsd-embedded@FreeBSD.ORG Tue Mar 15 21:04:48 2011 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CD2E91065670; Tue, 15 Mar 2011 21:04:48 +0000 (UTC) (envelope-from ray@ddteam.net) Received: from mail-fx0-f54.google.com (mail-fx0-f54.google.com [209.85.161.54]) by mx1.freebsd.org (Postfix) with ESMTP id 399EF8FC1B; Tue, 15 Mar 2011 21:04:47 +0000 (UTC) Received: by fxm11 with SMTP id 11so1174490fxm.13 for ; Tue, 15 Mar 2011 14:04:47 -0700 (PDT) Received: by 10.223.16.82 with SMTP id n18mr3782402faa.48.1300222334094; Tue, 15 Mar 2011 13:52:14 -0700 (PDT) Received: from rnote.ddteam.net (155-147-133-95.pool.ukrtel.net [95.133.147.155]) by mx.google.com with ESMTPS id o17sm127957fal.25.2011.03.15.13.52.11 (version=SSLv3 cipher=OTHER); Tue, 15 Mar 2011 13:52:12 -0700 (PDT) Date: Tue, 15 Mar 2011 22:52:09 +0200 From: Aleksandr Rybalko To: Andrew Duane Message-Id: <20110315225209.2cc2dbe2.ray@ddteam.net> In-Reply-To: References: <20110314170942.90bfb5a8.ray@dlink.ua> X-Mailer: Sylpheed 3.1.0 (GTK+ 2.22.1; amd64-portbld-freebsd9.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: Aleksandr Rybalko , "freebsd-embedded@freebsd.org" , "freebsd-current@freebsd.org" Subject: Re: [CFT][patch]cfi driver support for NOR flash arrays X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Mar 2011 21:04:48 -0000 Hi Andrew, Marcel and list readers, On Tue, 15 Mar 2011 14:41:09 -0400 Andrew Duane 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