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 1TbLv3-0007V2-9q for barebox@lists.infradead.org; Thu, 22 Nov 2012 01:49:35 +0000 From: =?UTF-8?q?=E5=BC=A0=E5=BF=A0=E5=B1=B1?= Date: Thu, 22 Nov 2012 09:48:16 +0800 Message-Id: <1353548896-5506-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 ci9jZmlfZmxhc2hfYW1kLmMgfCAgIDIyICsrKysrKysrKysrKystLS0tLS0tLS0KIDEgZmlsZXMg Y2hhbmdlZCwgMTMgaW5zZXJ0aW9ucygrKSwgOSBkZWxldGlvbnMoLSkKCmRpZmYgLS1naXQgYS9k cml2ZXJzL25vci9jZmlfZmxhc2hfYW1kLmMgYi9kcml2ZXJzL25vci9jZmlfZmxhc2hfYW1kLmMK aW5kZXggNDVjNTliOS4uODM4NGY0NiAxMDA2NDQKLS0tIGEvZHJpdmVycy9ub3IvY2ZpX2ZsYXNo X2FtZC5jCisrKyBiL2RyaXZlcnMvbm9yL2NmaV9mbGFzaF9hbWQuYwpAQCAtNjIsMTUgKzYyLDE5 IEBAIHN0YXRpYyB2b2lkIGFtZF9yZWFkX2plZGVjX2lkcyAoc3RydWN0IGZsYXNoX2luZm8gKmlu Zm8pCiAJdWRlbGF5KDEwMDApOyAvKiBzb21lIGZsYXNoIGFyZSBzbG93IHRvIHJlc3BvbmQgKi8K IAogCWluZm8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