From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from inx.pm.waw.pl ([195.116.170.130]) by canuck.infradead.org with esmtps (Exim 4.72 #1 (Red Hat Linux)) id 1PeaM3-0008FU-T5 for barebox@lists.infradead.org; Sun, 16 Jan 2011 21:41:44 +0000 From: Krzysztof Halasa Date: Sun, 16 Jan 2011 22:40:41 +0100 Message-ID: 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] CFI NOR flash: fix write timeout units. To: barebox@lists.infradead.org V3JpdGUgdGltZW91dHMgYXJlIGV4cHJlc3NlZCBpbiBtaWNyb3NlY29uZHMuIE1pbGxpc2Vjb25k cyBhcmUgMTAwMCB0aW1lcwpsb25nZXIgdGhhbiBtaWNyb3NlY29uZHMsIG5vdCAxMDAwIHRpbWVz IHNob3J0ZXIuCgpCZWZvcmUgKEludGVsIDI4RjEyOEozRDc1KToKCkNGSSBjb25mb3JtYW50IEZM QVNIICgxNiB4IDE2KSAgU2l6ZTogMTYgTUIgaW4gMTI4IFNlY3RvcnMKICBJbnRlbCBFeHRlbmRl ZCBjb21tYW5kIHNldCwgTWFudWZhY3R1cmVyIElEOiAweDg5LCBEZXZpY2UgSUQ6IDB4MTgKICBF cmFzZSB0aW1lb3V0OiA0MDk2IG1zLCB3cml0ZSB0aW1lb3V0OiAyNTYwMDAgbXMKICBCdWZmZXIg d3JpdGUgdGltZW91dDogMTAyNDAwMCBtcywgYnVmZmVyIHNpemU6IDMyIGJ5dGVzCgpBZnRlcjoK ICAuLi4KICBFcmFzZSB0aW1lb3V0OiA0MDk2IG1zLCB3cml0ZSB0aW1lb3V0OiAyNTYgdXMKICBC dWZmZXIgd3JpdGUgdGltZW91dDogMTAyNCB1cywgYnVmZmVyIHNpemU6IDMyI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