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.76 #1 (Red Hat Linux)) id 1SmjDH-0008JS-Sz for barebox@lists.infradead.org; Thu, 05 Jul 2012 10:23:14 +0000 Received: from localhost.localdomain (unknown [82.240.38.71]) by smtp2-g21.free.fr (Postfix) with ESMTP id 605794B0039 for ; Thu, 5 Jul 2012 12:22:51 +0200 (CEST) From: =?UTF-8?q?Eric=20B=C3=A9nard?= Date: Thu, 5 Jul 2012 12:22:46 +0200 Message-Id: <1341483767-20487-2-git-send-email-eric@eukrea.com> In-Reply-To: <1341483767-20487-1-git-send-email-eric@eukrea.com> References: <1341483767-20487-1-git-send-email-eric@eukrea.com> 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-bounces@lists.infradead.org Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: [PATCH 2/3] nand_base: add ONFI flash detection To: barebox@lists.infradead.org dGhlIGNvZGUgaXMgdGFrZW4gZnJvbSBsaW51eCAmIHUtYm9vdCBpbXBsZW1lbnRhdGlvbnMKVmFs aWRhdGVkIG9uIGFuIGkuTVg1MyB3aGljaCBnaXZlcyB0aGUgZm9sbG93aW5nIGxvZyA6Ck9ORkkg Zmxhc2ggZGV0ZWN0ZWQgLi4uIE9ORkkgcGFyYW0gcGFnZSAwIHZhbGlkCk5BTkQgZGV2aWNlOiBN YW51ZmFjdHVyZXIgSUQ6IDB4MmMsIENoaXAgSUQ6IDB4MzggKE1pY3JvbiBNVDI5RjhHMDhBQkFC QVdQKSwgcGFnZSBzaXplOiA0MDk2LCBPT0Igc2l6ZTogMjI0CgpTaWduZWQtb2ZmLWJ5OiBFcmlj IELDqW5hcmQgPGVyaWNAZXVrcmVhLmNvbT4KLS0tCiBkcml2ZXJzL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