From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from metis.ext.pengutronix.de ([2001:6f8:1178:4:290:27ff:fe1d:cc33]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Z6uWZ-0002j4-LB for barebox@lists.infradead.org; Mon, 22 Jun 2015 05:44:04 +0000 Date: Mon, 22 Jun 2015 07:43:40 +0200 From: Sascha Hauer Message-ID: <20150622054340.GB6325@pengutronix.de> References: <1434728762-32567-1-git-send-email-alllecs@yandex.ru> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1434728762-32567-1-git-send-email-alllecs@yandex.ru> 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: Re: [RFC] add decode command (SPD EEPROM data decoder) To: Alexander Smirnov Cc: barebox@lists.infradead.org SGkgQWxleGFuZGVyLAoKT24gRnJpLCBKdW4gMTksIDIwMTUgYXQgMDY6NDY6MDJQTSArMDMwMCwg QWxleGFuZGVyIFNtaXJub3Ygd3JvdGU6Cj4gZGVjb2RlLWRpbW1zIHBlcmwgc2NyaXB0IGlzIHVz ZWQgYXMgcHJvdG90eXBlCj4gKHNlZSBodHRwczovL2dpdGh1Yi5jb20vZ3JvZWNrL2kyYy10b29s cy9ibG9iL21hc3Rlci9lZXByb20vZGVjb2RlLWRpbW1zKS4KPiAKPiBIZXJlIGlzIGEgc2FtcGxl IGRlY29kZSBvdXRwdXQ6Cj4gCj4gYmFyZWJveEBiYXJlYm94IHNhbmRib3g6LyBkZWNvZGUgZW52 L2NydWNpYWxfcGMyLTY0MDBfZGRyMgo+IERlY29kaW5nIEVFUFJPTTogZW52L2NydWNpYWxfcGMy LTY0MDBfZGRyMgo+IAo+IC0tLT09PSBTUEQgRUVQUk9NIEluZm9ybWF0aW9uID09PS0tLQo+IEVF UFJPT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