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.85_2 #1 (Red Hat Linux)) id 1cEwJp-0004V0-Re for barebox@lists.infradead.org; Thu, 08 Dec 2016 10:52:55 +0000 From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= Date: Thu, 8 Dec 2016 11:52:25 +0100 Message-Id: <20161208105226.27858-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 1/2] spi: mvebu: add LSB support To: barebox@lists.infradead.org U2lnbmVkLW9mZi1ieTogVXdlIEtsZWluZS1Lw7ZuaWcgPHUua2xlaW5lLWtvZW5pZ0BwZW5ndXRy b25peC5kZT4KLS0tCiBkcml2ZXJzL3NwaS9tdmVidV9zcGkuYyB8IDI4ICsrKysrKysrKysrKysr KysrKysrKysrKy0tLS0KIDEgZmlsZSBjaGFuZ2VkLCAyNCBpbnNlcnRpb25zKCspLCA0IGRlbGV0 aW9ucygtKQoKZGlmZiAtLWdpdCBhL2RyaXZlcnMvc3BpL212ZWJ1X3NwaS5jIGIvZHJpdmVycy9z cGkvbXZlYnVfc3BpLmMKaW5kZXggNjkyMWNiOGNkN2RiLi5jNWQ4NzMyZTRmODQgMTAwNjQ0Ci0t LSBhL2RyaXZlcnMvc3BpL212ZWJ1X3NwaS5jCisrKyBiL2RyaXZlcnMvc3BpL212ZWJ1X3NwaS5j CkBAIC0zMSw4ICszMSwxMyBAQAogI2RlZmluZSAgSUZfUkVBRF9SRUFEWQkJQklUKDEpCiAjZGVm aW5lICBJRl9DU19FTkFCTEUJCUJJVCgwKQogI2RlZmluZSBTUElfSUZfQ09ORklHCQkwe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