From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4A2F0C7EE2A for ; Fri, 19 May 2023 16:05:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229530AbjESQFf (ORCPT ); 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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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