Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp1950918ybe; Thu, 12 Sep 2019 02:04:48 -0700 (PDT) X-Google-Smtp-Source: APXvYqw9liT3YL0meQIxKipFDcse321UtNAy0tpPAn+b60N3dzrto0X1snij5FvbeAc/84JUH+HQ X-Received: by 2002:a17:906:d932:: with SMTP id rn18mr33593233ejb.49.1568279088452; Thu, 12 Sep 2019 02:04:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568279088; cv=none; d=google.com; s=arc-20160816; b=qYtqvgqUks47Yd8/L73XSphZxGmszHS3ndMayBZfdQ3T0+VDoNo3JykpWR8zNunAUD QCpXDAxx7CgDDruk6m4b0ldFnyRdQl8mWgvknV8bz3OumRmkU3/qdESa34hmvIg9DrRW 9P7RUko/D7BK8Tao/TTPNZ5gRtPTxJHgTzn/RcwySMSLEbue6xoGEmn3BDn9fLmybRaR UezI237CFinYqcfiYPBvYS2vsfmlm55DdC2dkL4yXPQ8BtLmMQZy2Ftv+bfNfAiXciBQ gE1D3Xd5hG+LBFqF9J8N75DOh1bjewz1f3X9ESWGBgVcAk0jeUN/pYAa8a6TPlJs/xxQ fAGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=AnlQOWMrgAb3+Hxba5ceNc+A4QsOMVTgxnG7d6Cj7vM=; b=RucxLtwYTPu1JvtO+kvMBmvP3iNRCraesuGwK9b1ec2RX+Xa8c3Uu4QiUv6zZFWofV 6sWtfSbIO/v712Uw3tFYcpn7zEJ89FA6ZNbkCbB90DBR7NLhiZfR5UXmE8OqxVjkozf3 g8UY+aZ6gY7JPodRqbaKkTFifkVuVHgXqfuvlE6GxCuWciCwn/YmVFRqxB/rx26RHR4u A5kKXx92bZZBKOm/DIxVJxyJNtYzOyCMm9umWqq/52//b1RxYSFbp/CMJgO6R5/h615Z csKoVXSuqsI3vfDCY5iqdc+4CppOawJ26VYJCSn7kfY+LdBbHdtWS+WKC/1KHQrG38E2 lJIg== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b9si10668407eju.125.2019.09.12.02.04.23; Thu, 12 Sep 2019 02:04:48 -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; 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=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730371AbfILJDV (ORCPT + 99 others); Thu, 12 Sep 2019 05:03:21 -0400 Received: from 212.199.177.27.static.012.net.il ([212.199.177.27]:42872 "EHLO herzl.nuvoton.co.il" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1730083AbfILJDU (ORCPT ); Thu, 12 Sep 2019 05:03:20 -0400 Received: from taln60.nuvoton.co.il (ntil-fw [212.199.177.25]) by herzl.nuvoton.co.il (8.13.8/8.13.8) with ESMTP id x8C91p8g011595; Thu, 12 Sep 2019 12:01:51 +0300 Received: by taln60.nuvoton.co.il (Postfix, from userid 10070) id 774EA628F1; Thu, 12 Sep 2019 12:01:51 +0300 (IDT) From: Tomer Maimon To: mpm@selenic.com, herbert@gondor.apana.org.au, arnd@arndb.de, gregkh@linuxfoundation.org, robh+dt@kernel.org, mark.rutland@arm.com, avifishman70@gmail.com, tali.perry1@gmail.com, venture@google.com, yuenn@google.com, benjaminfair@google.com, sumit.garg@linaro.org, jens.wiklander@linaro.org, vkoul@kernel.org, tglx@linutronix.de, joel@jms.id.au Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-crypto@vger.kernel.org, openbmc@lists.ozlabs.org, Tomer Maimon Subject: [PATCH v3 0/2] hwrng: npcm: add NPCM RNG driver support Date: Thu, 12 Sep 2019 12:01:47 +0300 Message-Id: <20190912090149.7521-1-tmaimon77@gmail.com> X-Mailer: git-send-email 2.18.0 Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org This patch set adds Random Number Generator (RNG) support for the Nuvoton NPCM Baseboard Management Controller (BMC). The RNG driver we use power consumption when the RNG is not required. The NPCM RNG driver tested on NPCM750 evaluation board. Addressed comments from:. - Daniel Thompson: https://lkml.org/lkml/2019/9/10/352 - Milton Miller II : https://lkml.org/lkml/2019/9/10/847 - Daniel Thompson: https://lkml.org/lkml/2019/9/10/294 Changes since version 2: - Rearrange wait parameter in npcm_rng_read function. - Calling pm_runtime_enable function before hwrng_register function called to enable the hwrng before add_early_randomness called. - Remove quality dt-binding parameter in the driver and documentation. - Disable CONFIG_PM if devm_hwrng_register failed. - Remove owner setting in the driver struct. Changes since version 1: - Define timout in real-world units. - Using readl_poll_timeout in rng_read function. - Honor wait parameter in rng_read function. - Using local variable instead of #ifndef. - Remove probe print. Tomer Maimon (2): dt-binding: hwrng: add NPCM RNG documentation hwrng: npcm: add NPCM RNG driver .../bindings/rng/nuvoton,npcm-rng.txt | 12 ++ drivers/char/hw_random/Kconfig | 13 ++ drivers/char/hw_random/Makefile | 1 + drivers/char/hw_random/npcm-rng.c | 186 ++++++++++++++++++ 4 files changed, 212 insertions(+) create mode 100644 Documentation/devicetree/bindings/rng/nuvoton,npcm-rng.txt create mode 100644 drivers/char/hw_random/npcm-rng.c -- 2.18.0