From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cdakY-0000VH-5Y for barebox@lists.infradead.org; Tue, 14 Feb 2017 10:54:26 +0000 From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= Date: Tue, 14 Feb 2017 11:53:58 +0100 Message-Id: <20170214105358.6666-3-u.kleine-koenig@pengutronix.de> In-Reply-To: <20170214105358.6666-1-u.kleine-koenig@pengutronix.de> References: <20170214105358.6666-1-u.kleine-koenig@pengutronix.de> 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" Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: [PATCH 3/3] mvebu: rework how memory is detected To: barebox@lists.infradead.org U3RhdHVzIHF1byBpcyB0aGF0IGluaXRpYWxseSBhIHNpemUgb2YgNjQgTWlCIGlzIGFzc3VtZWQg KHdoaWNoIGlzIGFsc28KdXNlZCB0byBkZXRlcm1pbmUgdGhlIHNpemUgb2YgdGhlIG1hbGxvYyBh cmVhKSBhbmQgdGhlbiBsYXRlciB0aGUgZHRiCmlzIGZpeGVkIHVwIHdpdGggdGhlIGFjdHVhbGx5 IGF2YWlsYWJsZSBSQU0gd2hpY2ggaXMgdGhlbiB1c2VkLgoKSW5zdGVhZCBkZXRlY3QgdGhlIHJl YWwgUkFNIHNpemUgZWFybGllciBhbmQgZG9uJ3QgZml4dXAgdGhlIGRldmljZSB0cmVlLgpUaGUg ZGV2aWNlIHRyZWUgaXMgZml4ZWQgdXAgaW5zdGVhZCBieSBnZW5lcmljIGNvZGUuIFRoaXMgd2F5 IHRoZSBtYWxsb2MKYXJlYSBpcyBtb3JlIGFwcHJvcHJpYXRlbHkgc2l6ZWQgYW5kIFJ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