From owner-freebsd-embedded@FreeBSD.ORG Tue Mar 16 01:10:49 2010 Return-Path: Delivered-To: embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8B8B4106564A for ; Tue, 16 Mar 2010 01:10:49 +0000 (UTC) (envelope-from andrew@fubar.geek.nz) Received: from out2.smtp.messagingengine.com (out2.smtp.messagingengine.com [66.111.4.26]) by mx1.freebsd.org (Postfix) with ESMTP id 590798FC15 for ; Tue, 16 Mar 2010 01:10:49 +0000 (UTC) Received: from compute1.internal (compute1.internal [10.202.2.41]) by gateway1.messagingengine.com (Postfix) with ESMTP id 7751DE309C; Mon, 15 Mar 2010 21:10:48 -0400 (EDT) Received: from heartbeat2.messagingengine.com ([10.202.2.161]) by compute1.internal (MEProxy); Mon, 15 Mar 2010 21:10:48 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=messagingengine.com; h=date:from:to:cc:subject:message-id:in-reply-to:references:mime-version:content-type:content-transfer-encoding; s=smtpout; bh=ykT5x+Z6uH168yrS8M0rARrYRQI=; b=sPmDXPTar9iqnhSU6YEwLMCZrx15/xPwS4zTEdjtN0X6AurM3yFl8ZsVFr+pyizCIGjFyCqIA2pTKbJDIVJYOr4eyUYILhVPbroS/cM8/VukpAB8ZLwrBIXGd05YJZ6Hp6F55X4Xa/G6uU0IPN8Q8/Aiueu7ZBFcjsY2O4K+n38= X-Sasl-enc: 3eAZ5pw2571bPxunmrU2yoIMnwWawJZetXlT7rqIl+WN 1268701847 Received: from localhost (FL1-122-130-178-234.kyt.mesh.ad.jp [122.130.178.234]) by mail.messagingengine.com (Postfix) with ESMTPA id 502AB1A790; Mon, 15 Mar 2010 21:10:47 -0400 (EDT) Date: Tue, 16 Mar 2010 10:10:44 +0900 From: Andrew Turner To: Grzegorz Bernacki Message-ID: <20100316101044.0401295e@fubar.geek.nz> In-Reply-To: <4B9E1697.9090602@semihalf.com> References: <0AE04EFA-A3EB-4939-BD81-607C00355B67@semihalf.com> <20100314165825.121d346b@fubar.geek.nz> <4B9E1697.9090602@semihalf.com> X-Mailer: Claws Mail 3.7.5 (GTK+ 2.18.7; amd64-portbld-freebsd8.0) X-Pirate: Arrrr Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: embedded@freebsd.org, Luiz Otavio O Souza Subject: Re: NAND Flash Framework for review 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, 16 Mar 2010 01:10:49 -0000 On Mon, 15 Mar 2010 12:14:31 +0100 Grzegorz Bernacki wrote: > >> Chip drivers: > >> - lnand and snand have magic numbers to figure out which drive to > >> use. We should move these to a flag in the chip parameters. > > > > We just need to add the chip size in nand_params and based on that > > we can calculate the number of address cycles (see below) and the > > type of chip (if chip >= 128MB and pagesize > 512 then you have a > > large page device). > > > Yes, I was thinking about adding size of page and column address to > parameters of nfc_send_address. Why not just send each address byte separately like when the command is sent? This will then push the requirement to know how many address bytes to the chip driver. > >> - nand_read_pages should be a device method so we can customise > >> how we handle reading of pages. > > By customising you mean, using interlea Yes. I have also seen some interesting ways of connecting NAND flash. I would like to allow the developers to handle these by overriding the KOBJ methods as required. > >> > >> Ideas: > >> - Can we move ecc and bbt handling into GEOM? This will allow us to > >> bypass them when required. > > > > This is a mandatory feature (disable ecc and may be the bbt checks) > > if you need to deal with some kind of unknown nand FS or unknown > > nand oob layout (like make a backup of your unknown nand data > > before erase it). > > Ok, I didn't know that disabling ECC and BBT is so important. Let me > think about moving it to geom layer. It is also important for filesystems that have their own ECC handling code, e.g. YAFFS expects to manage the OOB it's self including the ECC. I'm not sure how it expects to handle the BBT. Andrew