From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from smtp2-g21.free.fr ([2a01:e0c:1:1599::11]) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UPxW6-0000J9-V8 for barebox@lists.infradead.org; Wed, 10 Apr 2013 16:05:00 +0000 Received: from e6520eb.local.eukrea.com (unknown [82.240.38.71]) by smtp2-g21.free.fr (Postfix) with ESMTP id 583DB4B0074 for ; Wed, 10 Apr 2013 18:04:53 +0200 (CEST) From: =?UTF-8?q?Eric=20B=C3=A9nard?= Date: Wed, 10 Apr 2013 18:04:52 +0200 Message-Id: <1365609892-2322-1-git-send-email-eric@eukrea.com> In-Reply-To: <20130410172212.3c672251@e6520eb> References: <20130410172212.3c672251@e6520eb> MIME-Version: 1.0 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Sender: "barebox" Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: [PATCH v2] nand_base: detect more ONFI flash To: barebox@lists.infradead.org aWYgdGhlIGZsYXNoIGhhcyBhIGtub3duIHR5cGUsIHRoZSBPTkZJIGRldGVjdGlvbiB3b24ndCBv Y2N1cgphbmQgdGh1cyB3ZSBtYXkgbm90IGRldGVjdCB0aGUgcmlnaHQgcGFyYW1ldGVycy4KQnkg dGVzdGluZyBib3RoIG5hbWQgYW5kIHBhZ2VzaXplLCBhcyBkb25lIGluIHRoZSBrZXJuZWwsIHdl CmNhbiBkZXRlY3QgT05GSSBmbGFzaCB3aXRoIGtub3cgSURzLgoKQXMgYW4gZXhhbXBsZSBvbiBh biBpLk1YNTMgYm9hcmQgOgotIHdpdGhvdXQgdGhlIHBhdGNoIDoKTkFORCBkZXZpY2U6IE1hbnVm YWN0dXJlciBJRDogMHgyYywgQ2hpcCBJRDogMHhkMwooTWljcm9uIE5BTkQgMUdpQiAzLDNWIDgt Yml0KSwgcGFnZSBzaXpl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