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 merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1SwyKW-0004sc-JW for barebox@lists.infradead.org; Thu, 02 Aug 2012 16:32:57 +0000 From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= Date: Thu, 2 Aug 2012 18:32:42 +0200 Message-Id: <1343925162-18040-1-git-send-email-u.kleine-koenig@pengutronix.de> In-Reply-To: <1343296420-25857-1-git-send-email-u.kleine-koenig@pengutronix.de> References: <1343296420-25857-1-git-send-email-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-bounces@lists.infradead.org Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: [PATCH v2] arm/imx: provide command to add ram device with autodetected size To: barebox@lists.infradead.org VGhlIGFtb3VudCBvZiBhdmFpbGFibGUgcmFtIGlzIGRldGVybWluZWQgYnkgdGhlIEVTRENUTCBy ZWdpc3Rlciwgc28KYmV0dGVyIGRvbid0IGhhcmRjb2RlIHRoZSB2YWx1ZS4KClRoaXMgY29tbWl0 IHByb3ZpZGVzIGEgY29tbWFuZCB0aGF0IGNhbiBiZSB1c2VkIGluc3RlYWQgb2YKYXJtX2FkZF9t ZW1fZGV2aWNlIGFuZCBjb252ZXJ0ZXMgcGNtMDQzIChvbiB3aGljaCB0aGlzIHBhdGNoIHdhcyB0 ZXN0ZWQpCnRvIGl0LgoKU2lnbmVkLW9mZi1ieTogVXdlIEtsZWluZS1Lw7ZuaWcgPHUua2xlaW5l LWtvZW5pZ0BwZW5ndXRyb25peC5kZT4KLS0tCmNoYW5nZXMgc2luY2UgaW1wbGljaXQgdjE6CiAt IHN1cHBvcnQgMm5kIHNkcmFtIGNoaXAg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