From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from smtp3-g21.free.fr ([2a01:e0c:1:1599::12]) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1U4ZgF-0005kJ-7Q for barebox@lists.infradead.org; Sun, 10 Feb 2013 16:23:10 +0000 Received: from localhost.localdomain (unknown [82.233.81.124]) by smtp3-g21.free.fr (Postfix) with ESMTP id C0E45A626B for ; Sun, 10 Feb 2013 17:22:53 +0100 (CET) From: =?UTF-8?q?Eric=20B=C3=A9nard?= Date: Sun, 10 Feb 2013 17:22:49 +0100 Message-Id: <1360513371-16470-1-git-send-email-eric@eukrea.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 1/3] mx23-evk: fix MCI support To: barebox@lists.infradead.org LSB0aGlzIHBhdGNoIGZpeCBNQ0kgc3VwcG9ydCBhbmQgZW5hYmxlIHVzaW5nIHRoZSBTRENhcmQg dG8gc3RvcmUKdGhlIGVudmlyb25tZW50LgotIGl0IGlzIGZ1bGx5IGNvcGllZCBmcm9tIGlteDIz LW9saW51eGluby5jCi0gdGVzdGVkIG9uIGkuTVgyMyBFVksgUmV2QjEKClNpZ25lZC1vZmYtYnk6 IEVyaWMgQsOpbmFyZCA8ZXJpY0BldWtyZWEuY29tPgotLS0KIGFyY2gvYXJtL2JvYXJkcy9mcmVl c2NhbGUtbXgyMy1ldmsvbXgyMy1ldmsuYyB8IDU0ICsrKysrKysrKysrKysrKysrKysrKysrKyst LQogMSBmaWxlIGNoYW5nZWQsIDUwIGluc2VydGlvbnMoKyksIDQgZGVsZXRpb25zKC0pCgpkaWZm IC0tZ2l0IGEvYXJjaC9hcm0vYm9hcmRzL2ZyZWVzY2FsZS1teDIzLWV2ay9teDIzLW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