From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from smtp3-g21.free.fr ([2a01:e0c:1:1599::12]) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Ua77N-00060C-06 for barebox@lists.infradead.org; Wed, 08 May 2013 16:21:26 +0000 From: =?UTF-8?q?Eric=20B=C3=A9nard?= Date: Wed, 8 May 2013 18:20:50 +0200 Message-Id: <1368030050-7989-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_base: fix to test for JCPV problem To: barebox@lists.infradead.org U2lnbmVkLW9mZi1ieTogRXJpYyBCw6luYXJkIDxlcmljQGV1a3JlYS5jb20+Ci0tLQogZHJpdmVy cy9tdGQvbmFuZC9uYW5kX2Jhc2UuYyB8IDIwICsrKysrLS0tLS0tLS0tLS0tLS0tCiAxIGZpbGUg Y2hhbmdlZCwgNSBpbnNlcnRpb25zKCspLCAxNSBkZWxldGlvbnMoLSkKCmRpZmYgLS1naXQgYS9k cml2ZXJzL210ZC9uYW5kL25hbmRfYmFzZS5jIGIvZHJpdmVycy9tdGQvbmFuZC9uYW5kX2Jhc2Uu YwppbmRleCBlODEwM2NmLi5kMDRlMjRiIDEwMDY0NAotLS0gYS9kcml2ZXJzL210ZC9uYW5kL25h bmRfYmFzZS5jCisrKyBiL2RyaXZlcnMvbXRkL25hbmQvbmFuZF9iYXNlLmMKQEAgLTExNjcsMTAg KzExNjcsOSBAQCBzdGF0aWMgc3RydWN0IG5hbmRfZmxhc2hfZGV2ICpuYW5kX2dldF9mbGFzaF90 eXBlKHN0cnVjdCBtdGRfaW5mbyAqbXRkLAogCiAJY2hpcC0+Y21kZnVuYyhtdGQsIE5BTkRfQ01E X1JFQURJRCwgMHgwMCwg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