Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2705211rwd; Fri, 19 May 2023 09:06:18 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4ggykGzDDgZXGQitshF02vF6uXj/JmCNpkh/JsYyp9PNEuMQJJk8WR2STjoir2AteNBBAs X-Received: by 2002:a05:6a00:2d90:b0:64d:2487:5b3c with SMTP id fb16-20020a056a002d9000b0064d24875b3cmr3583975pfb.29.1684512377725; Fri, 19 May 2023 09:06:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684512377; cv=none; d=google.com; s=arc-20160816; b=He2UF/5Lpg1Pl0+JBUqRjSF4eYIYL4XrOHDBT8mHBsD38jcvJMLhGTp7docx8NzWzK afGUnxWzVxV0KrIc7Yzi7Wf2x7i5iNCaRyOHCla4wwgW1nMlphGzRa8JI0eWVmdAHnCS j/USzo+bm3qm89TaH9oh04q3lEyl1alBM3evVI1xdyxF6agLMJAFT++RxdWjNoS6EiEm cWqEqkRq0W6iExA9WqFn0zE12Lvd7EL2Qel8lTVwTvV88qWTlbWPGQeKYGc2LsUji86G umW6y32+JPxpSe+EZGA4kl0wNcCEaDUVnVyJ+MlOc4hI+cYycyEcDrN3jYpPfSEYdzkT t1HQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=8Xwo9z4oulA/WF7mcH5NWZgNiPRyhvUNggR+yQQIbRs=; b=xxNnuTqnTsPIaiX0UmxXpL+wslZdr9fTGAojb/KFNYlLlhaaKvNvIJmmQcbJ6V4kK/ fKa7iphJNyapZX54DeVyjtC2GmVos7tzWBMpp6S6sw6YADltwvL3ohqVxKc+Bw57QByn M3JvWKOtTNEewjAgxb6cWQ6vfu0V4JscDWdeEU60SwvEVgYcTRsaO8EvcPeQG+Jr3PpB HC09UkESVG4T1l/F5Bl9hslh1J8RIeT53PQFn8VtsMoiJSC7Dx+ZEEMh9tJO+rjqdyIe E1tj6TaeoChnD6poplWttFukttyDUKNQaHAup/EeW0agqTuR/eZLr85p5BSHcDg0esyO qDCQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b14-20020aa7950e000000b00640f330a547si3982675pfp.236.2023.05.19.09.05.36; Fri, 19 May 2023 09:06:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-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-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229480AbjESQFf (ORCPT + 99 others); Fri, 19 May 2023 12:05:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40280 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229451AbjESQFe (ORCPT ); Fri, 19 May 2023 12:05:34 -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 0BAE3BA; Fri, 19 May 2023 09:05:32 -0700 (PDT) Received: from ipservice-092-217-072-086.092.217.pools.vodafone-ip.de ([92.217.72.86] helo=martin-debian-2.paytec.ch) by viti.kaiser.cx with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1q02bf-0001Ah-Jo; Fri, 19 May 2023 18:05:27 +0200 From: Martin Kaiser To: Herbert Xu Cc: linux-crypto@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Martin Kaiser Subject: [PATCH v2 0/3] hwrng: imx-rngc - simplify register definitions Date: Fri, 19 May 2023 18:04:30 +0200 Message-Id: <20230519160433.287161-1-martin@kaiser.cx> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230427185357.923412-1-martin@kaiser.cx> References: <20230427185357.923412-1-martin@kaiser.cx> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE 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-crypto@vger.kernel.org This series simplifies some definitions for register bits and fields. We can then use the FIELD_GET macro to read register fields instead of masking and shifting manually. Tested on an imx258 board (rngb). v2: - simpler check if random bytes are available Martin Kaiser (3): hwrng: imx-rngc - simpler check for available random bytes hwrng: imx-rngc - use bitfield macros to read rng type hwrng: imx-rngc - use BIT(x) for register bit defines drivers/char/hw_random/imx-rngc.c | 35 +++++++++++++------------------ 1 file changed, 15 insertions(+), 20 deletions(-) -- 2.30.2