From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from smtp5-g21.free.fr ([2a01:e0c:1:1599::14]) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1U5frV-00005c-K3 for barebox@lists.infradead.org; Wed, 13 Feb 2013 17:11:15 +0000 Date: Wed, 13 Feb 2013 18:10:58 +0100 From: Eric =?UTF-8?B?QsOpbmFyZA==?= Message-ID: <20130213181058.5bbbf613@e6520eb> In-Reply-To: <1360773918-10663-2-git-send-email-maxime.ripard@free-electrons.com> References: <1360773918-10663-1-git-send-email-maxime.ripard@free-electrons.com> <1360773918-10663-2-git-send-email-maxime.ripard@free-electrons.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: Re: [PATCH 1/2] cfa-10036: Use the second MMC partition to store the environment To: Maxime Ripard Cc: barebox@lists.infradead.org, Brian Lilly SGkgTWF4aW1lLAoKTGUgV2VkLCAxMyBGZWIgMjAxMyAxNzo0NToxNyArMDEwMCwKTWF4aW1lIFJp cGFyZCA8bWF4aW1lLnJpcGFyZEBmcmVlLWVsZWN0cm9ucy5jb20+IGEgw6ljcml0IDoKCj4gU2lu Y2UgdGhlIG9ubHkgc3RvcmFnZSBtZWRpdW0gb24gdGhlIGNmYS0xMDAzNiBpcyB0aGUgTU1DIGNh cmQsIHdlIG5lZWQKPiB0byBoYXZlIGEgcmVnaXN0ZXJlZCBlbnZpcm9ubWVudCBwYXJ0aXRpb24g b24gaXQgaWYgd2Ugd2FudCB0byBiZSBhYmxlCj4gdG8gbW9kaWZ5IGF0IHJ1bnRpbWUuCj4gCm1h eWJlIHlvdSBjb3VsZCBhZGQgOgpjb2RlIGNvcGllZCBmcm9tIGlteDIzLW9saW51eGluby5jCgpF cmljCgo+IFNpZ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