Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp3106838pxb; Tue, 21 Sep 2021 14:54:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwMekCbA8zOoED3JTTMtmMlh9U1bvDl0oLxPLbLnRF3694kAI9qcwrlTl35ZiQY0bsJzVt9 X-Received: by 2002:a05:6638:35ac:: with SMTP id v44mr1989556jal.48.1632261247899; Tue, 21 Sep 2021 14:54:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632261247; cv=none; d=google.com; s=arc-20160816; b=KEPTiaPV2eaKeyxnOQ57wDLlRt58TmU5eJF9sRhw8zzi3wFwCQ80KKPVmDu+q3vAVq tgBOow5TqbQHS9x1j68qdsDvFPAfeEIoMjkBvrtW+iYTxMauoo1tIFy+eorbPg4Y6N1D hh3r6wc5JS7k/J4ledAE3tBP0n4RYMOZTMdsayJHimXRv3w5R88DW/i/qHXwIxmASWlC ke27m1Ks0zn7kzB0T4M8v9U4YHSdesfxrKZmPv/ewNwyyYKo4IdXrpkB1ezGu3ct3EAr V3m4zU1qjgYErsfBh7lxr5B450yGQnyIa/7Rfsmrax+/ytXhnspCKFUXwnPoKkPajOEl Yg1Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=2/JyLIB6hMqbvNyxNZZlyYunzjMhA9XkAiOojy7xT0w=; b=d1DTy4FXRGxtpkU2RJ4KPQjHueSgDaPRdfNZjacsivzcmZ9gg4EKpf15ytq1pC+CTU DyJcz6JTlDwPaz11YypWAs4y0gSePkOZ/BUFbFQ+Qg2gqAGzlzicZ80I7lT/TznS7+Fh 7IHtU+MYkOzNTEjmM0zpNo5vqwqw88pozFKb5O4Ve3/NOdRt8UR9rvY8UhbhXwnhusp/ DF/k3+4Xsb41tqWPg2JROnaHZFz9JW1ADUjZDqTJbmZhBt2k93SYPP7DTh9tmTBi/Lli 1fiUhe9xezSAvguAal6nM+WHeJCyA/Uu992L2ZKJgT4k4De4ACBOonDAhm3clNS/dKPh TVLQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 205si299133ioa.52.2021.09.21.14.53.49; Tue, 21 Sep 2021 14:54:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232348AbhIUVuc (ORCPT + 99 others); Tue, 21 Sep 2021 17:50:32 -0400 Received: from 82-65-109-163.subs.proxad.net ([82.65.109.163]:34180 "EHLO luna.linkmauve.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234138AbhIUVub (ORCPT ); Tue, 21 Sep 2021 17:50:31 -0400 Received: by luna.linkmauve.fr (Postfix, from userid 1000) id 88C64F40B68; Tue, 21 Sep 2021 23:39:43 +0200 (CEST) From: Emmanuel Gil Peyrot To: linux-crypto@vger.kernel.org Cc: Emmanuel Gil Peyrot , Ash Logan , =?UTF-8?q?Jonathan=20Neusch=C3=A4fer?= , Herbert Xu , "David S. Miller" , Rob Herring , Michael Ellerman , Benjamin Herrenschmidt , Paul Mackerras , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Subject: [PATCH 0/4] crypto: nintendo-aes - add a new AES driver Date: Tue, 21 Sep 2021 23:39:26 +0200 Message-Id: <20210921213930.10366-1-linkmauve@linkmauve.fr> X-Mailer: git-send-email 2.33.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org This engine implements AES in CBC mode, using 128-bit keys only. It is present on both the Wii and the Wii U, and is apparently identical in both consoles. The hardware is capable of firing an interrupt when the operation is done, but this driver currently uses a busy loop, I’m not too sure whether it would be preferable to switch, nor how to achieve that. It also supports a mode where no operation is done, and thus could be used as a DMA copy engine, but I don’t know how to expose that to the kernel or whether it would even be useful. In my testing, on a Wii U, this driver reaches 80.7 MiB/s, while the aes-generic driver only reaches 30.9 MiB/s, so it is a quite welcome speedup. This driver was written based on reversed documentation, see: https://wiibrew.org/wiki/Hardware/AES Emmanuel Gil Peyrot (4): crypto: nintendo-aes - add a new AES driver dt-bindings: nintendo-aes: Document the Wii and Wii U AES support powerpc: wii.dts: Expose the AES engine on this platform powerpc: wii_defconfig: Enable AES by default .../bindings/crypto/nintendo-aes.yaml | 34 +++ arch/powerpc/boot/dts/wii.dts | 7 + arch/powerpc/configs/wii_defconfig | 4 +- drivers/crypto/Kconfig | 11 + drivers/crypto/Makefile | 1 + drivers/crypto/nintendo-aes.c | 273 ++++++++++++++++++ 6 files changed, 329 insertions(+), 1 deletion(-) create mode 100644 Documentation/devicetree/bindings/crypto/nintendo-aes.yaml create mode 100644 drivers/crypto/nintendo-aes.c -- 2.33.0