From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from m15-113.126.com ([220.181.15.113]) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TbQco-0004O5-Sk for barebox@lists.infradead.org; Thu, 22 Nov 2012 06:51:04 +0000 From: =?UTF-8?q?=E5=BC=A0=E5=BF=A0=E5=B1=B1?= Date: Thu, 22 Nov 2012 14:49:47 +0800 Message-Id: <1353566987-20609-1-git-send-email-zzs213@126.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] read cfi device id according the bus width To: barebox@lists.infradead.org U2lnbmVkLW9mZi1ieTog5byg5b+g5bGxIDx6enMyMTNAMTI2LmNvbT4KLS0tCiBkcml2ZXJzL25v ci9jZmlfZmxhc2hfYW1kLmMgICB8ICAgIDcgKysrKystLQogZHJpdmVycy9ub3IvY2ZpX2ZsYXNo X2ludGVsLmMgfCAgICA3ICsrKysrLS0KIDIgZmlsZXMgY2hhbmdlZCwgMTAgaW5zZXJ0aW9ucygr KSwgNCBkZWxldGlvbnMoLSkKCmRpZmYgLS1naXQgYS9kcml2ZXJzL25vci9jZmlfZmxhc2hfYW1k LmMgYi9kcml2ZXJzL25vci9jZmlfZmxhc2hfYW1kLmMKaW5kZXggNDVjNTliOS4uM2FiNGJlMCAx MDA2NDQKLS0tIGEvZHJpdmVycy9ub3IvY2ZpX2ZsYXNoX2FtZC5jCisrKyBiL2RyaXZlcnMvbm9y L2NmaV9mbGFzaF9hbWQuYwpAQCAtNjIsOCArNjIsMTEgQEAgc3RhdGljIHZvaWQgYW1kX3JlYWRf amVkZWNfaWRzIChzdHJ1Y3QgZmxhc2hfaW5mbyAqaW5mbykKIAl1ZGVsYXkoMTAwMCk7IC8qIHNv bWUgZmxh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