From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6974 invoked by alias); 8 Jun 2007 14:09:36 -0000 Received: (qmail 6965 invoked by uid 22791); 8 Jun 2007 14:09:35 -0000 X-Spam-Check-By: sourceware.org Received: from londo.lunn.ch (HELO londo.lunn.ch) (80.238.139.98) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 08 Jun 2007 14:09:32 +0000 Received: from lunn by londo.lunn.ch with local (Exim 3.36 #1 (Debian)) id 1Hwf9Z-00067q-00; Fri, 08 Jun 2007 16:09:25 +0200 Date: Sat, 09 Jun 2007 08:47:00 -0000 To: Sergei Gavrikov Cc: ecos-discuss@ecos.sourceware.org Message-ID: <20070608140925.GD14051@lunn.ch> Mail-Followup-To: Sergei Gavrikov , ecos-discuss@ecos.sourceware.org References: <1181310684.7166.14.camel@sg-ubuntu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1181310684.7166.14.camel@sg-ubuntu> User-Agent: Mutt/1.5.13 (2006-08-11) From: Andrew Lunn X-IsSubscribed: yes Mailing-List: contact ecos-discuss-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: ecos-discuss-owner@ecos.sourceware.org Subject: Re: [ECOS] Question: Banked FLASH X-SW-Source: 2007-06/txt/msg00098.txt.bz2 On Fri, Jun 08, 2007 at 04:51:23PM +0300, Sergei Gavrikov wrote: > Hello, > > Does exist a way (like FLASH_P2V macro) to manage flash banking using > _generic_PIO_? I have 1 part of the solid 2M Intel 28fxxx flash, but I > cannot use A20 line in a address mode. That line is a generic PIO line. > Should I copy a generic 28fxxx driver code in my hal/devs/flash and > tweak that source or there is more elegant way in eCos flash devices > world? There is no existing solution to this that i know of. The flash_v2 branch has some interesting possibilities. It supports multiple flash drivers in a flexible way. It also supports a form of virtual addresses. So with the V2 branch you could have the 28fxxx driver at the physical address of the flash, and it would drive which ever bank is currently mapped in. On top of that you have a virtual driver which implements the full 2M address range but at a different address. It would set the GPIO line as appropriate and then pass requests onto the physical driver, mapping the addresses as appropriate. If you do decide to implement this, it would be great to have it contributed back. It should be possible to make the virtual driver generic with a hardware specific package which implements the bank manipulation function. I can help with the design and testing. It is something i thought about doing a while ago, but never got around to. Andrew -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss