From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L3zDJ-0006SQ-1x for qemu-devel@nongnu.org; Sat, 22 Nov 2008 15:36:21 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L3zDH-0006RW-DW for qemu-devel@nongnu.org; Sat, 22 Nov 2008 15:36:20 -0500 Received: from [199.232.76.173] (port=38550 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L3zDH-0006RK-6N for qemu-devel@nongnu.org; Sat, 22 Nov 2008 15:36:19 -0500 Received: from rv-out-0708.google.com ([209.85.198.247]:18119) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1L3zDH-0008Cj-A7 for qemu-devel@nongnu.org; Sat, 22 Nov 2008 15:36:19 -0500 Received: by rv-out-0708.google.com with SMTP id f25so1372621rvb.22 for ; Sat, 22 Nov 2008 12:36:15 -0800 (PST) Message-ID: Date: Sat, 22 Nov 2008 21:36:15 +0100 From: "andrzej zaborowski" Subject: Re: [Qemu-devel] Question regarding NAND emulation. In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org 2008/11/22 Dmitry Baryshkov : > Hi, > > I have a question regarding NAND emulation. While simple NAND emulation > is easy, ECC stuff left me in uncertain state. In hw/spitz.c I saw some > balck magic regarding ecc.lp with shifts, ors etc. So, the question is: > if I'd like to implement HW ECC emulation for my NAND device, how should > I return ECC line and col parity bytes? It depends totally on the nand controller you emulate, but it can be deduced from a linux driver for it. Basically lp holds line parity bits and cp the column parity, you'll see different black magic applied in spitz.c and in onenand.c and in omap2.c and in https://svn.openmoko.org/trunk/src/host/qemu-neo1973/hw/s3c2410.c Cheers