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-0006bq-1C for barebox@lists.infradead.org; Mon, 26 Aug 2013 06:56:33 +0000 From: Sascha Hauer Date: Mon, 26 Aug 2013 08:55:49 +0200 Message-Id: <1377500163-28962-9-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 08/22] ARM: am33xx: Cleanup of lowlevel code To: barebox@lists.infradead.org RnJvbTogVGVyZXNhIEfDoW1leiA8dC5nYW1lekBwaHl0ZWMuZGU+CgpUaGVyZSBpcyBhIGxvdCBv ZiBkdXBsaWNhdGUgbG93bGV2ZWwgY29kZSBiZXR3ZWVuIHRoZQphbTMzeHggYm9hcmRzLiBNb3Zl IHRoaXMgY29kZSB0byBhbTMzeHhfZ2VuZXJpYyBhbmQKY3JlYXRlIHN0cnVjdHMgZm9yIHNkcmFt IHNldHRpbmdzLgoKU2lnbmVkLW9mZi1ieTogVGVyZXNhIEfDoW1leiA8dC5nYW1lekBwaHl0ZWMu ZGU+ClNpZ25lZC1vZmYtYnk6IFNhc2NoYSBIYXVlciA8cy5oYXVlckBwZW5ndXRyb25peC5kZT4K LS0tCiBhcmNoL2FybS9tYWNoLW9tYXAvYW0zM3h4X2dlbmVyaWMuYyAgICAgICAgICAgICAgfCAx NTcgKysrKysrKysrKysrKysrKysrKysrKysKIGFyY2gvYXJtL21hY2gtb21hcC9pbmNsdWRlL21h Y2gvYW0zM3h4L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