From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from smtp.megiteam.pl ([31.186.83.105]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fwnk6-0007Zp-Ut for barebox@lists.infradead.org; Mon, 03 Sep 2018 12:14:08 +0000 From: Marcin Niestroj Date: Mon, 3 Sep 2018 13:44:39 +0200 Message-Id: <20180903114452.4611-15-m.niestroj@grinn-global.com> In-Reply-To: <20180903114452.4611-1-m.niestroj@grinn-global.com> References: <20180903112408.2086-1-m.niestroj@grinn-global.com> <20180903114452.4611-1-m.niestroj@grinn-global.com> 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 05/18] crypto: caam - add support for iMX6UL To: barebox@lists.infradead.org Cc: Marcin Niestroj UGljayBjb21taXQgNGU1MTg4MTZhOTM4MTg3YjNiZmUxYjYyZmEyOTFkNGUzOGRjYTA2ZSBmcm9t IExpbnV4CnVwc3RyZWFtLgoKICAgIGNyeXB0bzogY2FhbSAtIGFkZCBzdXBwb3J0IGZvciBpTVg2 VUwKCiAgICBpLk1YNlVMIGRvZXMgb25seSByZXF1aXJlIHRocmVlIGNsb2NrcyB0byBlbmFibGUg Q0FBTSBtb2R1bGUuCgogICAgU2lnbmVkLW9mZi1ieTogTWFyY3VzIEZvbGtlc3NvbiA8bWFyY3Vz LmZvbGtlc3NvbkBnbWFpbC5jb20+CiAgICBBY2tlZC1ieTogUm9iIEhlcnJpbmcgPHJvYmhAa2Vy bmVsLm9yZz4KICAgIFJldmlld2VkLWJ5OiBIb3JpYSBHZWFudMSDIDxob3JpYS5nZWFudGFAbnhw LmNvbT4KICAgIFNpZ25lZC1vZmYtYnk6IEhlcmJlcnQgWHUgPGhlcmJlcnRAZ29uZG9yLmFwYW5h Lm9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