From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from [2a01:e0c:1:1599:215:17ff:fe31:f1c] (helo=smtp1-g21.free.fr) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1VqoT2-00049n-F4 for barebox@lists.infradead.org; Wed, 11 Dec 2013 18:25:06 +0000 Received: from e6520eb.local.eukrea.com (unknown [88.170.243.169]) by smtp1-g21.free.fr (Postfix) with ESMTP id 78B8A940058 for ; Wed, 11 Dec 2013 19:24:32 +0100 (CET) From: =?UTF-8?q?Eric=20B=C3=A9nard?= Date: Wed, 11 Dec 2013 19:24:27 +0100 Message-Id: <1386786267-6462-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" Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: [PATCH] nand_imx: fix read ONFI param on NFC v21 To: barebox@lists.infradead.org dGVzdGVkIG9uIGFuIGkuTVgyNSB3aGVyZSB3ZSBub3cgZ2V0IDoKbmFuZDogT05GSSBwYXJhbSBw YWdlIDAgdmFsaWQKbmFuZDogT05GSSBmbGFzaCBkZXRlY3RlZApuYW5kOiBOQU5EIGRldmljZTog TWFudWZhY3R1cmVyIElEOiAweDJjLCBDaGlwIElEOiAweGRhIChNaWNyb24gTVQyOUYyRzA4QUJB RUFXUCksIDI1Nk1pQiwgcGFnZSBzaXplOiAyMDQ4LCBPT0Igc2l6ZTogNjQKClNpZ25lZC1vZmYt Ynk6IEVyaWMgQsOpbmFyZCA8ZXJpY0BldWtyZWEuY29tPgotLS0KIGRyaXZlcnMvbXRkL25hbmQv bmFuZF9pbXguYyB8IDI1ICsrKysrKysrKy0tLS0tLS0tLS0tLS0tLS0KIDEgZmlsZSBjaGFuZ2Vk LCA5IGluc2VydGlvbnMoKyksIDE2IGRlbGV0aW9ucygtKQoKZ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