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.87 #1 (Red Hat Linux)) id 1dLGBO-0003WB-Mw for barebox@lists.infradead.org; Wed, 14 Jun 2017 21:50:38 +0000 From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= Date: Wed, 14 Jun 2017 23:50:09 +0200 Message-Id: <20170614215010.11886-2-u.kleine-koenig@pengutronix.de> In-Reply-To: <20170614215010.11886-1-u.kleine-koenig@pengutronix.de> References: <20170614215010.11886-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 2/3] clk: mvebu: Add support for Armada 38x's coreclk To: barebox@lists.infradead.org VGhpcyBpcyBhIG1peHR1cmUgb2YgdGhlIEFybWFkYSAzNzAgYmFyZWJveCBkcml2ZXIgYW5kIHRo ZSBBcm1hZGEgMzh4IExpbnV4CmRyaXZlci4KClNpZ25lZC1vZmYtYnk6IFV3ZSBLbGVpbmUtS8O2 bmlnIDx1LmtsZWluZS1rb2VuaWdAcGVuZ3V0cm9uaXguZGU+Ci0tLQogZHJpdmVycy9jbGsvbXZl YnUvTWFrZWZpbGUgICAgIHwgICAxICsKIGRyaXZlcnMvY2xrL212ZWJ1L2FybWFkYS0zOHguYyB8 IDE0NCArKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKysrKwogZHJpdmVycy9j bGsvbXZlYnUvY29tbW9uLmMgICAgIHwgICA0ICsrCiBkcml2ZXJzL2Nsay9tdmVidS9jb21tb24u aCAgICAgfCAgIDggKysrCiA0IGZpbGVzIGNoYW5nZWQsIDE1NyBpbnNlcnRpb25zKCspCiBjcmVh dGU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0sCit9OworCitzdGF0aWMgY29uc3QgaW50IGFybWFkYV8zOHhfY3B1X2wyX3JhdGlvc1sz Ml1bMl0gPSB7CisgICAgICAgIHswLCAxfSwgezAsIDF9LCB7MCwgMX0sIHswLCAxfSwKKyAgICAg ICAgezEsIDJ9LCB7MCwgMX0sIHswLCAxfSwgezAsIDF9LAorICAgICAgICB7MSwgMn0sIHswLCAx fSwgezAsIDF9LCB7MCwgMX0sCisgICAgICAgIHsxLCAyfSwgezAsIDF9LCB7MCwgMX0sIHswLCAx fSwKKyAgICAgICAgezAsIDF9LCB7MCwgMX0sIHswLCAxfSwgezAsIDF9LAorICAgICAgICB7MCwg MX0sIHswLCAxfSwgezAsIDF9LCB7MCwgMX0sCisgICAgICAgIHswLCAxfSwgezAsIDF9LCB7MCwg MX0sIHswLCAxfSwKKyAgICAgICAgezAsIDF9LCB7MCwgMX0sIHswLCAxfSwgezAsIDF9LAorfTsK Kworc3RhdGljIGNvbnN0IGludCBhcm1hZGFfMzh4X2NwdV9kZHJfcmF0aW9zWzMyXVsyXSA9IHsK KyAgICAgICAgezAsIDF9LCB7MCwgMX0sIHswLCAxfSwgezAsIDF9LAorICAgICAgICB7MSwgMn0s IHswLCAxfSwgezAsIDF9LCB7MCwgMX0sCisgICAgICAgIHsxLCAyfSwgezAsIDF9LCB7MCwgMX0s IHswLCAxfSwKKyAgICAgICAgezEsIDJ9LCB7MCwgMX0sIHswLCAxfSwgezAsIDF9LAorICAgICAg ICB7MCwgMX0sIHswLCAxfSwgezAsIDF9LCB7MCwgMX0sCisgICAgICAgIHswLCAxfSwgezAsIDF9 LCB7MCwgMX0sIHswLCAxfSwKKyAgICAgICAgezAsIDF9LCB7MCwgMX0sIHswLCAxfSwgezAsIDF9 LAorICAgICAgICB7MCwgMX0sIHswLCAxfSwgezAsIDF9LCB7MCwgMX0sCit9OworCitzdGF0aWMg dm9pZCBhMzh4X2dldF9jbGtfcmF0aW8oCisJdm9pZCBfX2lvbWVtICpzYXIsIGludCBp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