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 1SuKlZ-0006hh-0d for barebox@lists.infradead.org; Thu, 26 Jul 2012 09:53:58 +0000 From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= Date: Thu, 26 Jul 2012 11:53:40 +0200 Message-Id: <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 RFC] arm/imx: provide command to add ram device with autodetected size To: barebox@lists.infradead.org VGhlIGFtb3VudCBvZiBhdmFpbGFibGUgcmFtIGlzIGRldGVybWluZWQgYnkgdGhlIEVTRENUTCBy ZWdpc3Rlciwgc28KYmV0dGVyIGRvbid0IGhhcmRjb2RlIHRoZSB2YWx1ZS4KClRoaXMgY29tbWl0 IHByb3ZpZGVzIGEgY29tbWFuZCB0aGF0IGNhbiBiZSB1c2VkIGluc3RlYWQgb2YKYXJtX2FkZF9t ZW1fZGV2aWNlIGFuZCBjb252ZXJ0ZXMgcGNtMDQzIChvbiB3aGljaCB0aGlzIHBhdGNoIHdhcyB0 ZXN0ZWQpCnRvIGl0LgoKU2lnbmVkLW9mZi1ieTogVXdlIEtsZWluZS1Lw7ZuaWcgPHUua2xlaW5l LWtvZW5pZ0BwZW5ndXRyb25peC5kZT4KLS0tCkhlbGxvLAoKbWF5YmUgYmV0dGVyIG1vdmUgdGhl IG5ldyBmdW5jdGlvbiBpbnRvIGEgbmV3IGZpbGUKYXJjaC9hcm0vbWFjaC1pbXgvZXNkY3RsLmMg YW5kIHRoZSBwcm90b3R5cGUgaW50byA8bWF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