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.80.1 #2 (Red Hat Linux)) id 1VDqix-0006bs-1J for barebox@lists.infradead.org; Mon, 26 Aug 2013 06:56:41 +0000 From: Sascha Hauer Date: Mon, 26 Aug 2013 08:55:51 +0200 Message-Id: <1377500163-28962-11-git-send-email-s.hauer@pengutronix.de> In-Reply-To: <1377500163-28962-1-git-send-email-s.hauer@pengutronix.de> References: <1377500163-28962-1-git-send-email-s.hauer@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 10/22] ARM: beaglebone: Clean up lowlevel code To: barebox@lists.infradead.org RnJvbTogVGVyZXNhIEfDoW1leiA8dC5nYW1lekBwaHl0ZWMuZGU+CgpVc2luZyBoZXJlIG5vdyB0 aGUgaW5pdGlhbGlzaWF0aW9uIGZ1bmN0aW9ucyBpbgphbTMzeHhfZ2VuZXJpYy4KClNpZ25lZC1v ZmYtYnk6IFRlcmVzYSBHw6FtZXogPHQuZ2FtZXpAcGh5dGVjLmRlPgpTaWduZWQtb2ZmLWJ5OiBT YXNjaGEgSGF1ZXIgPHMuaGF1ZXJAcGVuZ3V0cm9uaXguZGU+Ci0tLQogYXJjaC9hcm0vYm9hcmRz L2JlYWdsZWJvbmUvbG93bGV2ZWwuYyB8IDI1NiArKysrKysrLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tCiAxIGZpbGUgY2hhbmdlZCwgNTIgaW5zZXJ0aW9ucygrKSwgMjA0IGRlbGV0aW9ucygt KQoKZGlmZiAtLWdpdCBhL2FyY2gvYXJtL2JvYXJkcy9iZWFnbGVib25lL2xvd2xldmVsLmM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