From patchwork Thu Aug 24 19:20:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Kaiser X-Patchwork-Id: 13724 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a7d1:0:b0:3f2:4152:657d with SMTP id p17csp1402920vqm; Thu, 24 Aug 2023 14:30:39 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEwamvkqcAg74w/8UoCMgiLXqRajkBNmUa6YgOnBSCQnbCXfJfix/p6NF6JZQlTXd/NTxy+ X-Received: by 2002:a05:6a00:148f:b0:68a:4d66:ca1 with SMTP id v15-20020a056a00148f00b0068a4d660ca1mr15321467pfu.6.1692912639077; Thu, 24 Aug 2023 14:30:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1692912639; cv=none; d=google.com; s=arc-20160816; b=KderfjeFYeq9XH5PnLRGDCORAPwy1Juj8PA/zYSQn3zRjZj9YGm6YKktLToU95mgoa XTslMLtoXVguhzP5TcEHH6JsH+110i2rP3iDjjCfkra4ovJ6HMY33F7Lqx/jVk7cEg45 Y3+VMrnx4UOF0nLG2YFY0niVIRHCGu1Y1ziwdIs/imAuOmG64hWIBLH69lVDpHaNr1n+ re6PzbqoEPhrwuEMbbikKWVZkFzVr3mQvfqo1nlH1+C6aUQ6zIh5gWnRn+dTBlKCwT9Z VvzZNdsqcObhFykKSWiJ4EcDjn0QktEqD4w+5fUpL5Ib8L69iQemQ+vdwBEj8GBLUwNV U/cA== 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=ENZktTKKqaAZchFIP5+1I0C7ZbqkN1hxkwkMgH4FiAw=; fh=MlvSK6e3kwN+F1KP9aqWF9U5JWJ1T+e+f4RH8e/Tu2E=; b=gvWwAXZl1wJ1oejW8+CLkjjWsviluQj0xCTT55cuMPH5KGULD12Tjx1Xa2+Lcs8DvX jXezfc+onlWFZgmpXQogMmf/2YPtSTj30o6b2emO5xzG+F0jzV39TNHLI9tHuO/5vF/1 8eKll8j/hM/xzLzluh+ZgQ+SM17xbbtthyBNzb8G5TUxzaGv6RMS1BT9L63+BMvQd67E aHDS6zx5k9aF/C1syP0XxcLR61/yWqNkltoYv1WulQP1cgvNfn1TKsDt64Vp8vb5x3bj 896Rf+36kpqaWMAG6GpTZtchc2qDkWi5ynyztLxB5UisSBe9JtfAL53yPWNYSGulzntX XoGw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id br13-20020a056a00440d00b00688535b71a2si355353pfb.67.2023.08.24.14.30.25; Thu, 24 Aug 2023 14:30:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243191AbjHXTYM (ORCPT + 99 others); Thu, 24 Aug 2023 15:24:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52986 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243022AbjHXTXv (ORCPT ); Thu, 24 Aug 2023 15:23:51 -0400 Received: from viti.kaiser.cx (viti.kaiser.cx [IPv6:2a01:238:43fe:e600:cd0c:bd4a:7a3:8e9f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EF9EC1BE6; Thu, 24 Aug 2023 12:23:48 -0700 (PDT) Received: from dslb-188-097-211-187.188.097.pools.vodafone-ip.de ([188.97.211.187] helo=martin-debian-2.paytec.ch) by viti.kaiser.cx with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1qZFvg-00036P-Ny; Thu, 24 Aug 2023 21:23:40 +0200 From: Martin Kaiser To: Herbert Xu Cc: Alexander Stein , linux-crypto@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Martin Kaiser Subject: [PATCH v2 0/6] hwrng: imx-rngc - use polling instead of interrupt Date: Thu, 24 Aug 2023 21:20:53 +0200 Message-Id: <20230824192059.1569591-1-martin@kaiser.cx> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1775147563462451494 X-GMAIL-MSGID: 1775147563462451494 Use polling and wait actively for the self test and the initial seeding of the rngc to complete. This is much simpler than using an interrupt and a completion. v2: - set reasonable timeouts - separate commit for the removal of interrupt handling - readl_poll_timeout does not wait in the foreground Martin Kaiser (6): hwrng: imx-rngc - reasonable timeout for selftest hwrng: imx-rngc - reasonable timeout for initial seed hwrng: imx-rngc - use polling to detect end of self test hwrng: imx-rngc - read status register for error checks hwrng: imx-rngc - use polling for initial seed hwrng: imx-rngc - remove interrupt handler drivers/char/hw_random/imx-rngc.c | 100 ++++++------------------------ 1 file changed, 18 insertions(+), 82 deletions(-)