From patchwork Fri Aug 11 20:50:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 134748 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b824:0:b0:3f2:4152:657d with SMTP id z4csp1390216vqi; Fri, 11 Aug 2023 15:25:06 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGHJkEq+G7uJobd+YmMMXIeTekc5h5Vbu0c5SPf1cFsemhwzrkDzj+s/WlMjVrGRPpm5LB+ X-Received: by 2002:a05:6a00:a0b:b0:682:b6c8:2eb with SMTP id p11-20020a056a000a0b00b00682b6c802ebmr3054430pfh.1.1691792706366; Fri, 11 Aug 2023 15:25:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691792706; cv=none; d=google.com; s=arc-20160816; b=JXAofI42UkwR3v8e/JwhcF/NP/8unRAh9vIpHssjG266fiYfEDkWv+1YEgP6Pvkfa+ E3IGtjnufA1vFO4hyHrOFlCmR874wXJ7okMjsm4eDoerIEEUKvUx41zEKSjjO1+uLZ9I ndygqwp4gHvqpOiNOnVZ3vcSbJzMLWaPuYJ/pw74I0tCtQHzVhTwExWvC3OSAEfuKyHB 7/5/5Hmuz/CPisfngvESgGc/K/I2mdZHCVjVMjc+6M9Lm56P0iJ2+2G8WRwTF65wm+4q ZjZMIULRv9qOP/1jksBcK9UgZ7FHwEoKRWN9++8ZEyjnEVXlH4TNeFoCTK4/OiALhJ4e AN1Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=ZJZqdrCnpunqS3BylltOM5jIKNmh9VxM9LXMzEyqRjI=; fh=bUNWcrY0qdCVVd2HHVRe0BtoILtJb2B5/yQdhzM8huU=; b=IP05iR5K1PZMq8KWoQQ/+a8WTrbfoffs8Yp4MT3Gchka0PLdBPGfEExVdArnMU9WDU K1oEIdyWu9r2alYpqD0CUtlQfYejxZ6/BF5g6QX7UtLDSNDQ+AQKfwOxI+Kp8wi04MsQ MQwvwHEJS1s+lAMGouBdMd/qNVxp5EcBPpe4u8nn8oujBVKMkVFoa1JKdPejKrOhyPPn WC/YEKNY9bOTtFoS64icdDucrire/X/rGRaAV4faYdZ2wrQvQxNJXtY4AUwK1fTscSRi t5NFcmXdXie4okH7Re8VcW0ra8cNoZeuhuGaglDa1VhzHmyHGxo6OKhPMqcalT/PnnCU G5Bg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Pj5G0Mdc; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p28-20020a056a0026dc00b006871e641c8dsi3986077pfw.12.2023.08.11.15.24.52; Fri, 11 Aug 2023 15:25:06 -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; dkim=pass header.i=@linaro.org header.s=google header.b=Pj5G0Mdc; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236082AbjHKUvI (ORCPT + 99 others); Fri, 11 Aug 2023 16:51:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49112 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235459AbjHKUvC (ORCPT ); Fri, 11 Aug 2023 16:51:02 -0400 Received: from mail-lf1-x135.google.com (mail-lf1-x135.google.com [IPv6:2a00:1450:4864:20::135]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C2FFF2D55 for ; Fri, 11 Aug 2023 13:51:01 -0700 (PDT) Received: by mail-lf1-x135.google.com with SMTP id 2adb3069b0e04-4fe45da0a89so4066856e87.1 for ; Fri, 11 Aug 2023 13:51:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1691787060; x=1692391860; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=ZJZqdrCnpunqS3BylltOM5jIKNmh9VxM9LXMzEyqRjI=; b=Pj5G0Mdco1jcZUC+NwBukisw4Q598vhEA+/UyBzPOpn8TakZSsu4nSbKKC+3lyxTQe +llpMtKdyJ92Vc91Ilhcr5+oDOSb3sZFgo8qRHvhRolI9RVLXjTOzaxYKU20eGmjNiOO rjuFaDpBdwcUEXB/C4Z7BMp34wxlyVPylNIG73FpXnz5ai/cIXWhJKsklHyS2/ga8bov 1+5WraQXAA2fSdxPXkOi2HVq6AH2MwVx0m+JWoH576yl2mRiIMasaiG2+zDA2m67UkTZ YHlfq35v4gaudloThrOSjK3MXzKa6sfsvXkxMMe5SP6IUGvcz3YWWJRu8kBlvW0ZYISY CbgA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691787060; x=1692391860; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ZJZqdrCnpunqS3BylltOM5jIKNmh9VxM9LXMzEyqRjI=; b=MUpDDhwgVF76kJ+lWghE+VGc/XmeFq62R8F/uWV2IixwnEOx5eOIQGIwpUjEOQrJnx REX1JJCLfv+KPCbq/2INU1Zz1mV9pmBiIltOVVpQnuTqtKD66Y2+IUIm8jP4AEnrnDMS 5iSBzJLzd8kPbIakUVIabSpqy5qcYI/PYsHFMFE+wVDK0bAL5871Pp29CC1wWVELV2Gs dkIiPKjcez08YyYxCvoaaS3wzxov7u7W3lwxnUJStbokhP63br+q9FKLksW7IC0qfNpL RW/MLn95KjcpjjdqGSR1PSJr+dZnfL/c+iSgm2MctJ6vw1ez9e+OrW/g3JyIKAtnRDfS YBew== X-Gm-Message-State: AOJu0Yyn+HcQvmxJvCA9yRNaofFVBFJ3woz7+3o8YiOODzb7y6rO2d/G isNb17nnb7+pNSTZamJa1qbEkA== X-Received: by 2002:a05:6512:1053:b0:4fe:6ff:dfba with SMTP id c19-20020a056512105300b004fe06ffdfbamr2631302lfb.1.1691787059953; Fri, 11 Aug 2023 13:50:59 -0700 (PDT) Received: from [192.168.1.101] (abyj188.neoplus.adsl.tpnet.pl. [83.9.29.188]) by smtp.gmail.com with ESMTPSA id w26-20020a19c51a000000b004fb964d48e6sm858285lfe.95.2023.08.11.13.50.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Aug 2023 13:50:59 -0700 (PDT) From: Konrad Dybcio Date: Fri, 11 Aug 2023 22:50:56 +0200 Subject: [PATCH 1/3] dt-bindings: crypto: qcom,prng: Add SM8450 MIME-Version: 1.0 Message-Id: <20230811-topic-8450_prng-v1-1-01becceeb1ee@linaro.org> References: <20230811-topic-8450_prng-v1-0-01becceeb1ee@linaro.org> In-Reply-To: <20230811-topic-8450_prng-v1-0-01becceeb1ee@linaro.org> To: Andy Gross , Bjorn Andersson , Herbert Xu , "David S. Miller" , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Vinod Koul Cc: Marijn Suijten , linux-arm-msm@vger.kernel.org, linux-crypto@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Konrad Dybcio X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1691787056; l=1394; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=Xs7DWl7UXFCwBwUfTPZ/9JWG71aQ0gSpWJmN6cxyqxU=; b=ZOQu/nQy3JDlJGB64q61SmEmQSYfQGkHtafbccPhQyv/4IVZF95QKS76V1Mr0IVRRkdka1/Q1 G1BAIQLcy2OABTj77ArDFy0LM4PxzaAtQiSQPjSTjgv6uY5SUKZhhsR X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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: 1773973228817292796 X-GMAIL-MSGID: 1773973228817292796 SM8450's PRNG does not require a core clock reference. Add a new compatible with a qcom,prng-ee fallback and handle that. Signed-off-by: Konrad Dybcio Acked-by: Conor Dooley --- .../devicetree/bindings/crypto/qcom,prng.yaml | 24 +++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/Documentation/devicetree/bindings/crypto/qcom,prng.yaml b/Documentation/devicetree/bindings/crypto/qcom,prng.yaml index bb42f4588b40..36b0ebd9a44b 100644 --- a/Documentation/devicetree/bindings/crypto/qcom,prng.yaml +++ b/Documentation/devicetree/bindings/crypto/qcom,prng.yaml @@ -11,9 +11,13 @@ maintainers: properties: compatible: - enum: - - qcom,prng # 8916 etc. - - qcom,prng-ee # 8996 and later using EE + oneOf: + - enum: + - qcom,prng # 8916 etc. + - qcom,prng-ee # 8996 and later using EE + - items: + - const: qcom,sm8450-prng-ee + - const: qcom,prng-ee reg: maxItems: 1 @@ -28,8 +32,18 @@ properties: required: - compatible - reg - - clocks - - clock-names + +allOf: + - if: + not: + properties: + compatible: + contains: + const: qcom,sm8450-prng-ee + then: + required: + - clocks + - clock-names additionalProperties: false From patchwork Fri Aug 11 20:50:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 134735 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b824:0:b0:3f2:4152:657d with SMTP id z4csp1385904vqi; Fri, 11 Aug 2023 15:14:21 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHP1Wr8ozOJh54uc0DVUW+dEzIQMTTftYmvSfg/0LyPcMCX3t+0IDLfdBvYEEYF9rSCvtPS X-Received: by 2002:a05:6a20:7f84:b0:13e:9dba:ea43 with SMTP id d4-20020a056a207f8400b0013e9dbaea43mr7379985pzj.2.1691792061363; Fri, 11 Aug 2023 15:14:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691792061; cv=none; d=google.com; s=arc-20160816; b=myK2iDIztVJrODmqbog7x2no1yaIruruL39U6avzoga1Cq+mLLtC0ckSnx+BRBmjYf 9ZI7LZaP4IMUojr3mpbDShSMXBXcNYBvNfIZfG/rgmUDBoJ+QxPnillsTkVfSWR+FIPu Pq4AcPMLk4nYKijep963bHYs7R+Q4OqR8u3R19PVE0d9M/DSG4FotMMzOAk8i9+6YEcP aiztqEvFyYWcTJ3srfBKP/ayT0k2TSPHdXlyU/qbKuS/rXKboYtLhIsy+cLEZ47hYOIj FNl7ccBPTwVLcsEvnxSDKjwYi3pOXzkFYFnYN7THOkvQACmA82fNGdD3kbkOlV/YqCC8 6yeA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=QB5xPzqWzKOoML0l3PVSjUAWLn+OWEjXc30hnsMTP30=; fh=bUNWcrY0qdCVVd2HHVRe0BtoILtJb2B5/yQdhzM8huU=; b=R0hc6WSr+w7O3/FNh+k7JnOBj02NtRx3+s4Nznu6A4sHzFKJ2M84UmRXAHLIwVIWJj uS0PQTBRKe26afU7SLoLD61INq88HmH/Nf9FTUuA0NOybWWlGm0hLDwe1T8sq2VmTmVQ 3NLO2GKC1NC+bdpieYTm5NpqnFpqA5zqx6l+Vu5BtholX9mcW6K/AwxGNaDUzFUZCilM mazqpLLXdRqcUOnUEWIU29sEJ6KC1uh8dlzrnNZJ/OATJfIlqnmq7qpQC+SFue8nXTc5 kTJWS9IGzZnPsBqnK3Ag65AEirYOEbWCBhL4PI83iiGIRlJe/c3psjyekmBEN5t3t9rL b7+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=fBmCkYdD; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s78-20020a632c51000000b0056554a59ce6si3991004pgs.663.2023.08.11.15.14.04; Fri, 11 Aug 2023 15:14:21 -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; dkim=pass header.i=@linaro.org header.s=google header.b=fBmCkYdD; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236763AbjHKUvK (ORCPT + 99 others); Fri, 11 Aug 2023 16:51:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49204 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236610AbjHKUvG (ORCPT ); Fri, 11 Aug 2023 16:51:06 -0400 Received: from mail-lf1-x136.google.com (mail-lf1-x136.google.com [IPv6:2a00:1450:4864:20::136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DA4AC30EE for ; Fri, 11 Aug 2023 13:51:03 -0700 (PDT) Received: by mail-lf1-x136.google.com with SMTP id 2adb3069b0e04-4fe0e34f498so3844008e87.2 for ; Fri, 11 Aug 2023 13:51:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1691787062; x=1692391862; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=QB5xPzqWzKOoML0l3PVSjUAWLn+OWEjXc30hnsMTP30=; b=fBmCkYdDOdODeooFLeiVItqNPuPMPFnsB2sguQDoHmPAbHa7mBkfKmxoJpZXpbayW9 yqkHuR5uj9WVDaS6qIQ3GM4Z6P6U6Z2xmkNyZTmx5a0poyfVZFHHkjB9p0GSUbSITy5T Vqqe/Cus5frPq6pT5Pg2jlZYCc7Mr+ZnnK8KlV7rXK0JDRVRPXCSBq5zZCiYiVSURHIc ggWR37h9BBUMhYCAFIot+/xPLOj35MkHl2GE3d0Taz2NnFc4D6TsByIsmDyw2wXMLNjj HChGL1aKNx/tKbxfCV7C+l20cp3iWPbK6NZpRE1wQACf9qpY5+wITo0V1VRLQTgRK4EB DVUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691787062; x=1692391862; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=QB5xPzqWzKOoML0l3PVSjUAWLn+OWEjXc30hnsMTP30=; b=YpZ8xoUO7U7/60l3DjbLr5CcF/BEeq0y/bvceP3qO6VxUHzcHttvpnJz4lSnb5stPG XL/ybjlcOWyrnUFgnRiElBV04uw9N9KIXH4TDsbC8vaDfNc0Q4+lgoAQ/B5C4iDvPxge GmN85PztCkt3ic1U2d4hLeIuby7FRmmTY4k+ACl2eJIbXGZKGHltbbuBDVKaBBB1rf3p PBfLQYgJDroDVFq9ib7aRDnkZ+l5Ylk+vD4t797VomVGB1lS3C2RC2bRqj5esCTCxYvk yhwRa0bX+oYDUoPmZ4Ham1+e8EPgSv/lYrD/wlGialhiP2v9ed7axgpgL7PhHPuFr3TI IK/g== X-Gm-Message-State: AOJu0YxeYKj9DzrLUTwZRlGbWaZBZ3Db9oOAJBmhiI+3Ru2GLXTEuWzB 0ZUDwdfpLjUZLz2RxmmPurobAg== X-Received: by 2002:a05:6512:1194:b0:4f5:a181:97b8 with SMTP id g20-20020a056512119400b004f5a18197b8mr2670689lfr.25.1691787062202; Fri, 11 Aug 2023 13:51:02 -0700 (PDT) Received: from [192.168.1.101] (abyj188.neoplus.adsl.tpnet.pl. [83.9.29.188]) by smtp.gmail.com with ESMTPSA id w26-20020a19c51a000000b004fb964d48e6sm858285lfe.95.2023.08.11.13.51.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Aug 2023 13:51:01 -0700 (PDT) From: Konrad Dybcio Date: Fri, 11 Aug 2023 22:50:57 +0200 Subject: [PATCH 2/3] crypto: qcom-rng: Make the core clock optional regardless of ACPI presence MIME-Version: 1.0 Message-Id: <20230811-topic-8450_prng-v1-2-01becceeb1ee@linaro.org> References: <20230811-topic-8450_prng-v1-0-01becceeb1ee@linaro.org> In-Reply-To: <20230811-topic-8450_prng-v1-0-01becceeb1ee@linaro.org> To: Andy Gross , Bjorn Andersson , Herbert Xu , "David S. Miller" , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Vinod Koul Cc: Marijn Suijten , linux-arm-msm@vger.kernel.org, linux-crypto@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Konrad Dybcio X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1691787056; l=1084; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=RzvdGw3IEkgoyMi6gKDkVuP1H4j8B0h8WD5wZuY2HnM=; b=+9SEp37pEI+KIv4leu0konNKFkQlJyzX4N8S00ogXVAhEo4UoRef+dyDlDBl7nifWIr6voJO7 /JIK/XDll/eBBzVyMALXSlpwdsVVy6H4VVHp417WyQtwBxZpzBR0Gx3 X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable 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: 1773972552455837006 X-GMAIL-MSGID: 1773972552455837006 Some newer SoCs (like SM8450) do not require a clock vote for the PRNG to function. Make it entirely optional and rely on the bindings checker to ensure platforms that need it, consume one. Signed-off-by: Konrad Dybcio Reviewed-by: Bjorn Andersson --- drivers/crypto/qcom-rng.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/drivers/crypto/qcom-rng.c b/drivers/crypto/qcom-rng.c index 72dd1a4ebac4..825a729f205e 100644 --- a/drivers/crypto/qcom-rng.c +++ b/drivers/crypto/qcom-rng.c @@ -173,13 +173,9 @@ static int qcom_rng_probe(struct platform_device *pdev) if (IS_ERR(rng->base)) return PTR_ERR(rng->base); - /* ACPI systems have clk already on, so skip clk_get */ - if (!has_acpi_companion(&pdev->dev)) { - rng->clk = devm_clk_get(&pdev->dev, "core"); - if (IS_ERR(rng->clk)) - return PTR_ERR(rng->clk); - } - + rng->clk = devm_clk_get_optional(&pdev->dev, "core"); + if (IS_ERR(rng->clk)) + return PTR_ERR(rng->clk); rng->skip_init = (unsigned long)device_get_match_data(&pdev->dev); From patchwork Fri Aug 11 20:50:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 134738 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b824:0:b0:3f2:4152:657d with SMTP id z4csp1388339vqi; Fri, 11 Aug 2023 15:20:02 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEnAmobBa1vlFeXwLWTyUT/2+F/KkvwqLnRHPCk7wkSQrAkSEWDCivCyiDkbd5ef0DYamIT X-Received: by 2002:a05:6a20:8410:b0:132:bdba:5500 with SMTP id c16-20020a056a20841000b00132bdba5500mr4700980pzd.39.1691792402041; Fri, 11 Aug 2023 15:20:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691792402; cv=none; d=google.com; s=arc-20160816; b=0xGrIY8VdiJsC50sN7b8BIvufXSnjnKL3srZcQDZcRDsTb3SKEKFallHBe8UFshTnJ HWnVNwSEdaYj+WOtHt8ip1Whqh8OXDx/LN0vk0kl/OBmoDCeN+VbCGvBre65ry2QtA2g W4ZfqHjvPZzltBApa8VJeUQUaCezxbE/XGzOEj9E6vTyhSEXYdYbiQSnD2ReEfAytCUY x/9ZGx/6beC6dRdHEVbutpf/aYk95ys8sy4wBhtFuKx3/04RTVfNKOaQ1b2JEW9ckZ7+ 6W/nZdEPvRcZJdJoyY8hlyv9GE7mw3ohYeUvthRzseQ23Sxvg2Az3YShKG6ZfPCEzE/c 2J+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=Z7dwX7d2dU/+Fcf4YUfoOQ8dtmFpWA9dQl9ljKJ8KV8=; fh=bUNWcrY0qdCVVd2HHVRe0BtoILtJb2B5/yQdhzM8huU=; b=0w1+pqkdUtcHwefFiE1B5nUNQf2WFWXA+78c9uWOhojQqSvpDcfDzWtzkJ6GrAuoJK dcn4CIXPAgHo0LNYV+9fDZ2HQ+RyTH7Jz3Bg0bHQD1rfrE8JG76DrDiqdgc1mhgRbdYV fwAAam1+09zeiFvSYw8cZB2N9KnBLHnzdxG0yMEuE3ojm287XGzO8/aR0nq6y2Fjl0RS euvjNizCEqXoNu9b3LFobScKnprFsH7Jv7MyDLLtOJfV4xdxrY7DvoVeWsnxosMXvdCn Gfib45hKQt/KH7b9t5XKxMbhEli2taRhYTE+mtxDqDJ2Ix+lS+ZiqzBVBW5zzTaQhIGB 7t2g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=kOivY6A7; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e16-20020a056a001a9000b0064f78c32b89si4123973pfv.95.2023.08.11.15.19.48; Fri, 11 Aug 2023 15:20:01 -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; dkim=pass header.i=@linaro.org header.s=google header.b=kOivY6A7; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234632AbjHKUvW (ORCPT + 99 others); Fri, 11 Aug 2023 16:51:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49204 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236346AbjHKUvI (ORCPT ); Fri, 11 Aug 2023 16:51:08 -0400 Received: from mail-lf1-x12c.google.com (mail-lf1-x12c.google.com [IPv6:2a00:1450:4864:20::12c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4B4BE2D61 for ; Fri, 11 Aug 2023 13:51:07 -0700 (PDT) Received: by mail-lf1-x12c.google.com with SMTP id 2adb3069b0e04-4fe7e1ef45dso3823744e87.1 for ; Fri, 11 Aug 2023 13:51:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1691787065; x=1692391865; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=Z7dwX7d2dU/+Fcf4YUfoOQ8dtmFpWA9dQl9ljKJ8KV8=; b=kOivY6A78wD3tWHGor9Cb6KP6jgrIb7TqJ+AjqJaGYfU2vA+LInbZR9s1mfmRUwA/h iyuRxlM1WFZseiNI3SW1FMdj5MdtBxsC1Dl1UzjMb0X4AyjOnT9OQsjOWUfLhgiOMw6m H9qEcL2q6KDjH6Xxj6wBx3MqqDQD3ST+0IBVkXIGif0GsgpTK3q5g3IBBXdLY2M+39Mb ZaX5tM+gDyqK+52Zcfv4aw40+wek0TXQHrGVfaSExFktQAq+GTDsIWLvL5hNOmuXQu04 D1ijZdcgllbE4tAaz95z5tbea3/nJJfhtptxbfcg/a7TXDU6FiZikzWv+KpFa7kd72Co Q4ZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691787065; x=1692391865; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Z7dwX7d2dU/+Fcf4YUfoOQ8dtmFpWA9dQl9ljKJ8KV8=; b=a6mpjRrpsdcqtzrG8DnFzRAtX7MPvcpp2x48h//ztwWJ9yFX6Q7E9bB8+fhkf8S8tK FbsrEiSwD1lwDHjsRQ2+08fW7aqxqmgPVESNRhcPhs6JH+wFW9IquaQT+phk/E6FGRaG gHtvhfUpeDdFe79hV6QUhwFiC9yfUm85F/pFJpekmcS/BaeRMST9tJ0JFnSEIgzBE0Ct mgwHmfjrswwz59jWYMv/d74DjoaF2r3+KYxPtjDWSyjgkmLf3Pcht/WggfhR7zaX4Va0 pOm6nCuscAPP3z9BJS4LZY2FxpAnhWwPo0dZvwpxOipnwysE6CK3cqkb+aOEIyf/B+ou 43ug== X-Gm-Message-State: AOJu0Yz/3hgPWqP6rbqobxaqyqWDxUHFacURszkmysY3yiwZKgyq2EDu brDyzgqw8z/KesW0LK9q50Q2GQ== X-Received: by 2002:ac2:465a:0:b0:4f9:5404:af5 with SMTP id s26-20020ac2465a000000b004f954040af5mr2325253lfo.46.1691787065714; Fri, 11 Aug 2023 13:51:05 -0700 (PDT) Received: from [192.168.1.101] (abyj188.neoplus.adsl.tpnet.pl. [83.9.29.188]) by smtp.gmail.com with ESMTPSA id w26-20020a19c51a000000b004fb964d48e6sm858285lfe.95.2023.08.11.13.51.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Aug 2023 13:51:05 -0700 (PDT) From: Konrad Dybcio Date: Fri, 11 Aug 2023 22:50:58 +0200 Subject: [PATCH 3/3] arm64: dts: qcom: sm8450: Add PRNG MIME-Version: 1.0 Message-Id: <20230811-topic-8450_prng-v1-3-01becceeb1ee@linaro.org> References: <20230811-topic-8450_prng-v1-0-01becceeb1ee@linaro.org> In-Reply-To: <20230811-topic-8450_prng-v1-0-01becceeb1ee@linaro.org> To: Andy Gross , Bjorn Andersson , Herbert Xu , "David S. Miller" , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Vinod Koul Cc: Marijn Suijten , linux-arm-msm@vger.kernel.org, linux-crypto@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Konrad Dybcio X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1691787056; l=726; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=DAjiq74UUefJdsfOInU2jHQz0HV2BK7biar8Njrb1Tw=; b=+8cN3Nbx0tNivhACQMoC05m52yue+77h5opat4b8o/IbMvK06IRdMl0t0wPmP1UQpkMU/RcXg tnG4E4qQsXICNSa1PVVsHI4XzKoktqX9Paoa3cRrpgDRNQxE3JytCS3 X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable 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: 1773972909646535824 X-GMAIL-MSGID: 1773972909646535824 Add the Qualcomm Pseudo-Random Number Generator. Signed-off-by: Konrad Dybcio --- arch/arm64/boot/dts/qcom/sm8450.dtsi | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sm8450.dtsi b/arch/arm64/boot/dts/qcom/sm8450.dtsi index 4bc1c46a5f44..48618e88a273 100644 --- a/arch/arm64/boot/dts/qcom/sm8450.dtsi +++ b/arch/arm64/boot/dts/qcom/sm8450.dtsi @@ -1738,6 +1738,11 @@ spi14: spi@a98000 { }; }; + rng: rng@10c3000 { + compatible = "qcom,sm8450-prng-ee", "qcom,prng-ee"; + reg = <0 0x010c3000 0 0x1000>; + }; + pcie0: pci@1c00000 { compatible = "qcom,pcie-sm8450-pcie0"; reg = <0 0x01c00000 0 0x3000>,