From owner-freebsd-arm@freebsd.org Wed Apr 6 21:05:39 2016 Return-Path: Delivered-To: freebsd-arm@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E76A0B06B7B for ; Wed, 6 Apr 2016 21:05:39 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from erouter6.ore.mailhop.org (erouter6.ore.mailhop.org [54.187.213.119]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B03191D0D for ; Wed, 6 Apr 2016 21:05:39 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-User: 30f5ec31-fc3b-11e5-827e-7d17a39bef25 X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 73.34.117.227 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [73.34.117.227]) by outbound3.ore.mailhop.org (Halon Mail Gateway) with ESMTPSA; Wed, 6 Apr 2016 21:04:45 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.14.9) with ESMTP id u36L5bFB001897; Wed, 6 Apr 2016 15:05:37 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <1459976737.1091.289.camel@freebsd.org> Subject: Re: information on accessing nand From: Ian Lepore To: Craig Butler , freebsd-arm@freebsd.org Date: Wed, 06 Apr 2016 15:05:37 -0600 In-Reply-To: <20160406214115.784b8a1f@zbox.lerwick.hopto.org> References: <20160406214115.784b8a1f@zbox.lerwick.hopto.org> Content-Type: text/plain; charset="us-ascii" X-Mailer: Evolution 3.16.5 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Apr 2016 21:05:40 -0000 On Wed, 2016-04-06 at 21:41 +0100, Craig Butler wrote: > Hello List > > Is there a HOWTO or some instructions/black magic for adding new > definitions and drivers for accessing currently unsupported nand ?? > > So far I *think* I need to; > - define the nand in the board dts definitions > - code a nfc_ (omap2??) driver > - set kernel configs with option nandfs and WITH_NAND="YES" > - cross fingers > > Have I missed anything ? > > Kind Regards > You should be aware before you get too far into this that there is lots of stuff in freebsd related to nand, and most of it doesn't work. The driver framework is completely tied to 1-bit hamming code ECC, which is only used by ancient small chips, nothing modern. If you get past that (say, by using chips with builtin hardware ECC that appear to just never get errors), you quickly discover that the nandfs code is slow and buggy. Slow like it can lock up the system for seconds at a time. Buggy like it corrupts data and there's no way to recover. -- Ian