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 1cEvAz-0002l4-2c for barebox@lists.infradead.org; Thu, 08 Dec 2016 09:39:46 +0000 From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= Date: Thu, 8 Dec 2016 10:39:22 +0100 Message-Id: <20161208093922.23194-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] spi: mvebu: only read from bus when data is needed To: barebox@lists.infradead.org VGhpcyBvcHRpbWl6YXRpb24gcmVkdWNlZCB0aGUgdGltZSB0byB0cmFuc2ZlciA0MCBNQiBhdCA1 MCBIeiBmcm9tCjIxNCBzZWNvbmRzIHRvIDIwMyBzZWNvbmRzLgoKU2lnbmVkLW9mZi1ieTogVXdl IEtsZWluZS1Lw7ZuaWcgPHUua2xlaW5lLWtvZW5pZ0BwZW5ndXRyb25peC5kZT4KLS0tCiBkcml2 ZXJzL3NwaS9tdmVidV9zcGkuYyB8IDEwICsrKysrLS0tLS0KIDEgZmlsZSBjaGFuZ2VkLCA1IGlu c2VydGlvbnMoKyksIDUgZGVsZXRpb25zKC0pCgpkaWZmIC0tZ2l0IGEvZHJpdmVycy9zcGkvbXZl YnVfc3BpLmMgYi9kcml2ZXJzL3NwaS9tdmVidV9zcGkuYwppbmRleCA1OGFjNjA1N2FmZTMuLjY4 ODM4YzBjZTE4NCAxMDA2NDQKLS0tIGEvZHJpdmVycy9zcGkvbXZlYnVfc3BpLmMKKysrIGIvZHJp dmVycy9zcGkvbXZlYnVfc3BpLmMKQEAgLTMwMCwxMiArMzAwLDEyIEBAIHN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