From owner-freebsd-embedded@FreeBSD.ORG Tue Mar 18 14:07:12 2014 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CF36746D for ; Tue, 18 Mar 2014 14:07:12 +0000 (UTC) Received: from mail-ie0-f173.google.com (mail-ie0-f173.google.com [209.85.223.173]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9926661B for ; Tue, 18 Mar 2014 14:07:12 +0000 (UTC) Received: by mail-ie0-f173.google.com with SMTP id rl12so7186323iec.32 for ; Tue, 18 Mar 2014 07:07:06 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:content-type:mime-version:subject:from :in-reply-to:date:cc:content-transfer-encoding:message-id:references :to; bh=htULXrsYFYUEeS5Hd0VzFptP3VskuTndtnEt1MI8Nko=; b=meSR8z7y9CuCEBLZUEg7Q/smaPNZjPLq88MYRZotwBdffJQ5galxlAzT3ois9lQzN3 fTXk0dHnuDP/M7hIzSWyMPzgSlspvFJBArcmF+6SZarypNesn9hkfS6Pkj663fPBY0s1 KCTHDaIL9OUAgBlw9IJkPz7sTUtsKfUOBj0WUZlud0WF7/1BBytejOs+RIEw7ra1Q1Ia gxe+tAIj0bVBUlqYOxzDwqKsr+RggWJV3gnVDN4gsxbwDqL4ojeF9eSRgxnyYBYcJ8iD LAB2wBOanD6HFNFSFx7p6/4mk2N16BZRjKj4iqioi4jbByKiPdK030+MrFQOGaFFAp4O qBFA== X-Gm-Message-State: ALoCoQkR0u/gprC2slxr6JOY5KJXpSoOSejOgJF9DTxABL/3UM9T2lbDUoifZ1v9sJtAsjPzA4zF X-Received: by 10.42.64.17 with SMTP id e17mr24382954ici.26.1395151626104; Tue, 18 Mar 2014 07:07:06 -0700 (PDT) Received: from [172.29.91.92] ([198.202.203.177]) by mx.google.com with ESMTPSA id nh12sm23834335igb.12.2014.03.18.07.07.04 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 18 Mar 2014 07:07:05 -0700 (PDT) Sender: Warner Losh Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 7.2 \(1874\)) Subject: Re: nand controller - how should one handle controllers that want the command+address bits together? From: Warner Losh In-Reply-To: Date: Tue, 18 Mar 2014 08:07:04 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: <72611BD5-E115-497D-82FC-3C1065E8A3F5@bsdimp.com> References: To: Adrian Chadd X-Mailer: Apple Mail (2.1874) Cc: "freebsd-embedded@freebsd.org" X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Mar 2014 14:07:12 -0000 On Mar 18, 2014, at 5:35 AM, Adrian Chadd wrote: > Hiya, >=20 > I've got the atheros ar934x nand controller bits looking like they're > working on freebsd-head enough to send/receive a READID command with > an address of 0x0. However, the NAND controller sends commands with > the cmd and address phases as part of the command, rather than calling > send_command / send_address methods called multiple times. >=20 > It seems like our nandbus and nand controller layer is a very thin > shim over what the NAND control messages look like, rather than some > higher level 'thing' that allows for slightly more intelligent (read: > DMA/ECC capable) hardware. >=20 > So, what gives? Our NAND layer is very thin. The early controllers that were targeted by = the NAND controller were rather dump, little more than bit-bang controllers that = could modulate ALE and CLE as needed. There=92s no provision for DMA, at all = really. There=92s very little provision for ECC, since that=92s usually done as = part of the DMA operation. I=92m surprised you haven=92t complained about the excruciatingly long = busy waits yet. Our complete ignoring of the B/NR signal. The lack of any kind of = interrupt attempts for the GPIO pins we=92re driving, the hardwired state machines for the = NAND that just happen to work with the older generation parts but will encounter issues = on the latest NAND. Warner