From: Nicolas Royer Subject: [PATCH 3/5] crypto: Atmel AES driver: add support for latest release of the IP (0x130) Date: Tue, 6 Nov 2012 17:32:47 +0100 Message-ID: <1352219567-30455-1-git-send-email-nicolas@eukrea.com> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Cc: herbert@gondor.apana.org.au, nicolas.ferre@atmel.com, linux-crypto@vger.kernel.org, eric@eukrea.com, plagnioj@jcrosoft.com, davem@davemloft.net, linux-arm-kernel@lists.infradead.org, Nicolas Royer To: linux-kernel@vger.kernel.org Return-path: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=m.gmane.org@lists.infradead.org List-Id: linux-crypto.vger.kernel.org VXBkYXRlcyBmcm9tIHByZXZpb3VzIElQIHJlbGVhc2UgKDB4MTIwKToKIC0gYWRkIGNmYjY0IHN1 cHBvcnQKIC0gYWRkIERNQSBkb3VibGUgaW5wdXQgYnVmZmVyIHN1cHBvcnQKClNpZ25lZC1vZmYt Ynk6IE5pY29sYXMgUm95ZXIgPG5pY29sYXNAZXVrcmVhLmNvbT4KQWNrZWQtYnk6IE5pY29sYXMg RmVycmUgPG5pY29sYXMuZmVycmVAYXRtZWwuY29tPgpBY2tlZC1ieTogRXJpYyBCw6luYXJkIDxl cmljQGV1a3JlYS5jb20+ClRlc3RlZC1ieTogRXJpYyBCw6luYXJkIDxlcmljQGV1a3JlYS5jb20+ Ci0tLQogZHJpdmVycy9jcnlwdG8vYXRtZWwtYWVzLmMgfCAgNDcwICsrKysrKysrKysrKysrKysr KysrKysrKysrKysrKysrKy0tLS0tLS0tLS0tCiAxIGZpbGVzIGNoYW5nZWQsIDM1MiBpbnNlcnRp b25zKCspLCAxMTggZGVsZXRpb25zKC0pCgpkaWZmIC0tZ2l0IGEvZHJpdmVycy9jcnlwdG8vYXRt ZWwtYWVzLmMgYi9kcml2ZXJzL2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