From patchwork Tue Apr 30 16:29:04 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 163123 Delivered-To: patch@linaro.org Received: by 2002:a92:7e86:0:0:0:0:0 with SMTP id q6csp3447822ill; Tue, 30 Apr 2019 09:29:47 -0700 (PDT) X-Google-Smtp-Source: APXvYqyDcAiQQ2SxcAUioylDqC+S4pqDjmauTsj3Dg3SYF+POGbIby/ADb1udG0GwU3gdNQS+HbY X-Received: by 2002:a65:62cc:: with SMTP id m12mr67969066pgv.118.1556641787511; Tue, 30 Apr 2019 09:29:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556641787; cv=none; d=google.com; s=arc-20160816; b=ER1obYw1qX6L792CJkaj1RaEW4kGDkK00pnYQjBJwKPGcIrCkwmEhc3+GKnnTSyHuC 2ACfhUi0xo5PTFeStKB5sl0VYUjVqoY7mT+c6xV+bRnOkKG/00ycWPCON9XDiuoz0b0D RHxgAhHYOqsch2bZah2yNCOO+VKF440ob+Zq4vMMNpFwHT94R3yS0qSnK9whRSF9jlt3 5uOh/oS3R4R72yhp49GkZjzVjFJhj3hxt4OnRNBU+SgNIZ9rpcNdgBRy4oDDcF5xQ3oZ YbXS4TEyOxpytOol5hQmjZ6/F0Dec3CnUHvbcjKsk/5UFPn4pIrhLCyssPQekmRwFElQ s1gQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=pJcnizSX09s8fd54NDpfsOEpZWqIjJb4KGon6CoHIdE=; b=jwmpgqpllhRv/AJK6fcmfOrZgj+uP3KZbyGniBIsxwYq5y9jhIZvmRr4WbIKhXY7lf jDkkYBuTW3KoRfHU/3CJ0j0ja3Oq7SaP3KytZ241x8fXIgdXxE+JJNr0aPvGicGfDNco XhNzVEwmNxtSuAI21FE1Cc+8JKo/fPTjdnyYJMHyEuB/FFqokMr3XUZ6ekP5pt25DJMg 2wNHjYi9rFYSWedjIwk5eCEozwBKX5owb48mhJC2VPsWRlRsDe5scyGA6UWwgH3x1Yvr QZ38rTk6IiX7oSmX9QZCkVTlypkAs/KnRekm45FWJT15WnRMqIPhycxkf5eIoI90Bdxx MEXQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=kAt6Dfvs; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t1si16723339plq.227.2019.04.30.09.29.47; Tue, 30 Apr 2019 09:29:47 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=kAt6Dfvs; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726526AbfD3Q3q (ORCPT + 3 others); Tue, 30 Apr 2019 12:29:46 -0400 Received: from mail-wr1-f68.google.com ([209.85.221.68]:37495 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726028AbfD3Q3q (ORCPT ); Tue, 30 Apr 2019 12:29:46 -0400 Received: by mail-wr1-f68.google.com with SMTP id r6so21781617wrm.4 for ; Tue, 30 Apr 2019 09:29:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=pJcnizSX09s8fd54NDpfsOEpZWqIjJb4KGon6CoHIdE=; b=kAt6DfvsoMEHFhgdnVzV+s9YIgmyxSKYpBh6b+I2H9eu/PEnBAoh+w/TypaG5YDPUp QJghPybgsEgarbZMdnKUYaQszvNm9YfL6CT/sl4vYcCLSomRGRtOvzL76Wthc3URDenE kq602HzH60sURQqKmhZFfLvKUfMjmcEqZJl14K8JPoBiJtW8FfvzhhSd/rRyaVY5k4D2 V0rPDJE5XWxwTCsX7u0fzq70bvCPbxqHb3LM0cDe9SSfYvLK0pz++qIFqdClZl2TKKIN 8BhXdozQndFP1q7WSc/caAVc1yP3paxyB+UuvJD0UFUuxjrofnpGsp6uTstCsj8GG932 ZKng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=pJcnizSX09s8fd54NDpfsOEpZWqIjJb4KGon6CoHIdE=; b=VkLqPmQuOEyrYjfsulN5U4GstqydRAiI3YvNbCSLrmvgTPXwB/rEa8VnbXMhhSngPj Pb8AMX3WK8D3G69608TNsXE9N5iuf6Zl1pdFXmzT8GI0JeGRAxOOAsbm1jkige1SoJie ZIAVqnq3OEnYqIuPQH+sI3Q+9a3fYZdJ+N2roXRogeoe6tyQRHkiFNA4NOhTZlnyQB3Q J6w8tbbB6JE0C3JdZ6Iog3qoIjZYxZyu5YBIOCKDcyaDvzA64LrCz7hMTQR/GIDrAnbe IHZdN3L765+M0ALR52Ri2rOfEQH3uIt/edlnpg6uhXnIZImLuFfZoA8pCg9dwMX15qz4 qScg== X-Gm-Message-State: APjAAAWPjdzuEoH58Hx35ogCzvTDy+yzGkiyfh1WEzYMzJv2oYtU45Rt SvfFgMiFFHKGVO7NQOz+YWS1VtRVkpwNdQ== X-Received: by 2002:a5d:6347:: with SMTP id b7mr754362wrw.1.1556641783915; Tue, 30 Apr 2019 09:29:43 -0700 (PDT) Received: from sudo.home ([2a01:cb1d:112:6f00:1ca3:6afc:30c:1068]) by smtp.gmail.com with ESMTPSA id t67sm5848890wmg.0.2019.04.30.09.29.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 30 Apr 2019 09:29:42 -0700 (PDT) From: Ard Biesheuvel To: linux-crypto@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org, linus.walleij@linaro.org, joakim.bech@linaro.org, Ard Biesheuvel , Herbert Xu , Tudor Ambarus Subject: [PATCH 0/5] synquacer - wire up Atmel SHA204A as RNG in DT and ACPI mode Date: Tue, 30 Apr 2019 18:29:04 +0200 Message-Id: <20190430162910.16771-1-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org The Socionext SynQuacer based 96boards DeveloperBox platform does not incorporate a random number generator, but it does have a 96boards low speed connector which supports extension boards such as the Secure96, which has a TPM and some crypto accelerators, one of which incorporates a random number generator. This series implements support for the RNG part, which is one of several functions of the Atmel SHA204A I2C crypto accelerator, and wires it up so both DT and ACPI based boot methods can use the device. Cc: Herbert Xu Cc: Tudor Ambarus Ard Biesheuvel (5): i2c: acpi: permit bus speed to be discovered after enumeration crypto: atmel-ecc: add support for ACPI probing on non-AT91 platforms crypto: atmel-ecc: factor out code that can be shared crypto: atmel-i2c: add support for SHA204A random number generator dt-bindings: add Atmel SHA204A I2C crypto processor Documentation/devicetree/bindings/crypto/atmel-crypto.txt | 13 + drivers/crypto/Kconfig | 19 +- drivers/crypto/Makefile | 2 + drivers/crypto/atmel-ecc.c | 403 ++------------------ drivers/crypto/atmel-ecc.h | 116 ------ drivers/crypto/atmel-i2c.c | 364 ++++++++++++++++++ drivers/crypto/atmel-i2c.h | 196 ++++++++++ drivers/crypto/atmel-sha204a.c | 171 +++++++++ drivers/i2c/i2c-core-acpi.c | 6 +- 9 files changed, 790 insertions(+), 500 deletions(-) delete mode 100644 drivers/crypto/atmel-ecc.h create mode 100644 drivers/crypto/atmel-i2c.c create mode 100644 drivers/crypto/atmel-i2c.h create mode 100644 drivers/crypto/atmel-sha204a.c -- 2.20.1