From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from 11.mo4.mail-out.ovh.net ([46.105.34.195] helo=mo4.mail-out.ovh.net) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UP6cL-000184-9Y for barebox@lists.infradead.org; Mon, 08 Apr 2013 07:35:55 +0000 Received: from mail628.ha.ovh.net (b7.ovh.net [213.186.33.57]) by mo4.mail-out.ovh.net (Postfix) with SMTP id 2DF52104E9FD for ; Mon, 8 Apr 2013 09:47:57 +0200 (CEST) Date: Mon, 8 Apr 2013 09:31:50 +0200 From: Jean-Christophe PLAGNIOL-VILLARD Message-ID: <20130408073150.GW1568@game.jcrosoft.org> References: <20130402065241.GB1906@pengutronix.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: 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: [PATCH] ARM: Support for IXP4xx hardware Queue Manager. To: Krzysztof Halasa Cc: barebox@lists.infradead.org c2FtZSBoZXJlIG5vIHByaW50ZiB1c2UgZGV2X2RiZyBvciBwcl9kZWJ1ZwoKT24gMjE6NTUgU3Vu IDA3IEFwciAgICAgLCBLcnp5c3p0b2YgSGFsYXNhIHdyb3RlOgo+IFNpZ25lZC1vZmYtYnk6IEty enlzenRvZiBIYcWCYXNhIDxraGNAcG0ud2F3LnBsPgo+IAo+IGRpZmYgLS1naXQgYS9hcmNoL2Fy bS9tYWNoLWl4cDR4eC9LY29uZmlnIGIvYXJjaC9hcm0vbWFjaC1peHA0eHgvS2NvbmZpZwo+IGlu ZGV4IGU2OWRlMjkuLjkyNDRiZTkgMTAwNjQ0Cj4gLS0tIGEvYXJjaC9hcm0vbWFjaC1peHA0eHgv S2NvbmZpZwo+ICsrKyBiL2FyY2gvYXJtL21hY2gtaXhwNHh4L0tjb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