Received: by 2002:a05:7412:6592:b0:d7:7d3a:4fe2 with SMTP id m18csp1226637rdg; Fri, 11 Aug 2023 14:12:42 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFy9F7/1LjW+1YfJAGeAoalHS5Q2ppSiSkSxr+ov8zyK67jChXAnvsrvr1Qvz2a4KZFYhRk X-Received: by 2002:a17:90a:e38f:b0:261:2824:6b8c with SMTP id b15-20020a17090ae38f00b0026128246b8cmr8158465pjz.13.1691788361949; Fri, 11 Aug 2023 14:12:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691788361; cv=none; d=google.com; s=arc-20160816; b=UXEUAF79eWJJjGm8eKSWp8/Qaox+RnKwIwUGhf6XlwOyM06G1myI0Lt4TK0PvV7pRM TL4kG17Hww1NAJvKLiR+B6sgrOIMkztR3dKmfAVTUI6InYiUBsB2tEJrTjyVlJ23K0dP rMJ/SmKjDP8N0HP2UCN6pItGLYZNDIkVmqRbUGHkBImnfwVHtnp4XUdidZ9+rxCNTWNa /A5ayX7hDoO0P24fY0dNyUJq9a6tMtz9ite7u0Rq6tC//6a3bz2mfG4s+B9X/KOLBDJ7 utvq1pCXM2Tsihh5HGhxrWfp2jNP3YtBwy3046M9Y6lCcz3pGsQCf+XACFwNfncp8IDN Z2Uw== 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=c9y70O5v9RxaOA7hbmD8KoUb0ysnATNFqQ36Df+QsMq9BTY72d0H3ivZS4NkQV8KfB x4loTPc7b1NCtoCR7UGwvuqrJ0L0o2qzM6jWJmAcIwgLwcF2qahj2CXb1Y/1xKi4d7n1 s+2MShoYxncGLrRESadc1AyPzXuGqbxz/sGDgdFBJAgeLnL53CPnw0M8KPj8Uq4eEhNA Qjlte2GNC8vliwVm9IJO6emAvAcDs3gKij4AFDUfc3xUHXJuNtC99ZbDjbtU0u3OAXMs 3E2c/22rUgEmVDCFxQozmJKPxaj+xwnAMc38r3wt0cXsE6kEbndcp+hdJ+JlsiHNtLIm wOoA== 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-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a17-20020a63e411000000b00564d6ad2746si3804364pgi.452.2023.08.11.14.12.18; Fri, 11 Aug 2023 14:12:41 -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; dkim=pass header.i=@linaro.org header.s=google header.b=fBmCkYdD; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236789AbjHKUvI (ORCPT + 99 others); Fri, 11 Aug 2023 16:51:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49152 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236768AbjHKUvG (ORCPT ); Fri, 11 Aug 2023 16:51:06 -0400 Received: from mail-lf1-x132.google.com (mail-lf1-x132.google.com [IPv6:2a00:1450:4864:20::132]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4225130F9 for ; Fri, 11 Aug 2023 13:51:05 -0700 (PDT) Received: by mail-lf1-x132.google.com with SMTP id 2adb3069b0e04-4fe457ec6e7so3854549e87.3 for ; Fri, 11 Aug 2023 13:51:05 -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=WUbRw6q60Y5t3xhOj973hRDeGErsNP92tImj6zJ8AqtPJjEe2+61Kqc9qz7wYjhWmj paB0av/yYmb3aY3eYz+0u6DvEjPcLZ8TxwsV6Af+57DX9nOd947858cj7E+PAZ9wPI6t TLKpAmJ7q0z1yWazmZDLWW6VuC5a3YQlL5smH0OwCZocCB27qhG74PaNaxnF12Vh8Wrv B0m4jbh+VXM68F//axkcVSkLyNLlIJTNqDnTrbXnSlts1C3RUDKdC3dzzNCj+OVS5x8X vl+bmZc//IQJePMa8edYWjl/TWN3GNyjWumNDZ40XZNYmcZoTCDLbbCuInFSS4NgVseL o7sg== X-Gm-Message-State: AOJu0YxB08Qs90MuPe5kNXn1d1XmsgTeB/wDQ6O0fRbAWS+6ACgKH5U1 xKogN1ogfAz+T13sdqqDa5s7gA== 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 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit 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-crypto@vger.kernel.org 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 --- 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); -- 2.41.0