From patchwork Mon Jun 17 12:51:02 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 167015 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp2823499ilk; Mon, 17 Jun 2019 05:51:12 -0700 (PDT) X-Google-Smtp-Source: APXvYqwXR786vyzB/xZeBo/KRZjr6ZAkymNKuZw8LBGbajRzGleJJZgKATZbne9+lY3LR5g1fQpR X-Received: by 2002:aa7:8f24:: with SMTP id y4mr70081552pfr.36.1560775872706; Mon, 17 Jun 2019 05:51:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560775872; cv=none; d=google.com; s=arc-20160816; b=LbnXdYrS5PFoVfb+EoOIQgRKXySBSrw4by2XtOfl7m0xVP6td3g2PD4PQGQ+rHJfzB Il69fxRqtHnkKbdX12myyLdk9m84BpY4/M04gvBrELnYp7xJRZPN0kMBeRmKNHoBUBKn IepnVfvNYd8br4INuJIox8wbsI2RxNqw5daTTccvKVp5lmNuVuCgEJ2PlaCrIB5Ct+cU P89ZRWQ2D1lLiI4CiYvSB92S+P0GXJ8Q67ekWjFiuPI91OSErMNQ+wQM7VfjKkIpH8U3 p6VnKi8vZDyEYoLtA4cBLXUsOpIc/yrDD+vf63F73342HTJ2+QRMT9HYw8KjFwTRc4nN 4Wsw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=2zuxNNJ4iuFL5CUgXXBK/C8GK/Wfm+gcHDg2NkvAFB8=; b=d5mWlWGt4bMePeoq01rvj6slAepb6wMOZl8hUuMlToW8/Bhuyf+eSXU+/Xv0EiJG09 wx+wfawb1+iszER4b80D2mHzLR6UTJOqaNI/Pksea1J7FfB5wKin411CcQ2u83b8Obow cOuQTZP9+gBymBBlT/09AP1fxbRBBk0q3ya1tvhMU5wgEHQK0JGJWRXYIaS5b3sYkq49 mTZtmuE55GyxRVeek0rH2S2TtIcdosc+M4/lFx3Fg+FJkGwPs+NPK7OhYo0jSh+uTgjP LBXKItOQMjNs2V/AFhgtno/HAx+l7wZaVjdfhezKj0622CBlf3LtM43fNXblnEVJi5Jw +BUQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="q+s/96q0"; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f20si1163727pfn.166.2019.06.17.05.51.12; Mon, 17 Jun 2019 05:51:12 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="q+s/96q0"; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-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 S1727876AbfFQMvL (ORCPT + 15 others); Mon, 17 Jun 2019 08:51:11 -0400 Received: from mail-wr1-f66.google.com ([209.85.221.66]:32805 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727465AbfFQMvL (ORCPT ); Mon, 17 Jun 2019 08:51:11 -0400 Received: by mail-wr1-f66.google.com with SMTP id n9so9855448wru.0 for ; Mon, 17 Jun 2019 05:51:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=2zuxNNJ4iuFL5CUgXXBK/C8GK/Wfm+gcHDg2NkvAFB8=; b=q+s/96q0GvL81bpISKq1BYq2qgGMpiINLYY94rSfeJIBgtJ0JASEtiXtDPecNFmtZL IVM+FA8aky8PBmnMLL4+Kt0aJ3tCYdUb9UEdfNN6lMqZIm32xgDsGAGZEN75E5BGglZ5 O0qHpPxDxjps+O6mgY7ewWjzgrArHawuVqm5pgALhFmzbvj/vTigwdNoWTRq+QYjzbQW X4PP0kzs+r42vn1y/uQP2HCx+p4e6qaylctjsm4b3GGzN1UOWC+lSwN5UNNB59hZ9phn mt8/uuVdLmFh2bLj3JPXGKXcTYEITepZw7iCLKx8El0VEXOnDiwDYGwUZY8bVg2fGUtk a2Ig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=2zuxNNJ4iuFL5CUgXXBK/C8GK/Wfm+gcHDg2NkvAFB8=; b=W6RNzXq8dYr1twDLnrASagMF8jlqFbPYfc4B7urs9kNuy8T+yNAgX0EVsxbYiPRPrP /vpOknnUdEyIJKKdAsKi2YCOExblY5oB0YBaQssDfiAmfI5XygVGzfW1SPtfUKjHumez Bvuo7Mc0yGeR4OhqUm7cKplxw18AqHD7YHYHJypEV1jEJWEm1hMCiA77sYsr4CoBb2V8 bCxH2oa7SnJ5d9gc+lYg5acKxFusQaf/NR86/61aFZSLIF83Lc/cXt3V/Ffv3r02Kdbh LC0X1pJxpwee/H/55z5inDZOg04UtcXzdfnEztvOKBLLZQPyRD+nN8Pm5S+e/j9yaLAZ VOew== X-Gm-Message-State: APjAAAWQ0RoBN4OoaTGB8Stkigu2SClPY/YH20NNPN7Q/BizTU7UINPn 5IMtPQJBnVj7xvfcvktZEJAOWg== X-Received: by 2002:a5d:6050:: with SMTP id j16mr6799737wrt.20.1560775869586; Mon, 17 Jun 2019 05:51:09 -0700 (PDT) Received: from dell.watershed.co.uk ([2.27.35.243]) by smtp.gmail.com with ESMTPSA id o11sm10477852wmh.37.2019.06.17.05.51.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 17 Jun 2019 05:51:09 -0700 (PDT) From: Lee Jones To: alokc@codeaurora.org, agross@kernel.org, david.brown@linaro.org, bjorn.andersson@linaro.org, balbi@kernel.org, gregkh@linuxfoundation.org, ard.biesheuvel@linaro.org, jlhugo@gmail.com, linux-arm-msm@vger.kernel.org, linux-usb@vger.kernel.org, felipe.balbi@linux.intel.com Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Lee Jones Subject: [RESEND v4 1/4] soc: qcom: geni: Add support for ACPI Date: Mon, 17 Jun 2019 13:51:02 +0100 Message-Id: <20190617125105.6186-2-lee.jones@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190617125105.6186-1-lee.jones@linaro.org> References: <20190617125105.6186-1-lee.jones@linaro.org> Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org When booting with ACPI as the active set of configuration tables, all; clocks, regulators, pin functions ect are expected to be at their ideal values/levels/rates, thus the associated frameworks are unavailable. Ensure calls to these APIs are shielded when ACPI is enabled. Signed-off-by: Lee Jones Acked-by: Ard Biesheuvel --- drivers/soc/qcom/qcom-geni-se.c | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) -- 2.17.1 diff --git a/drivers/soc/qcom/qcom-geni-se.c b/drivers/soc/qcom/qcom-geni-se.c index 6b8ef01472e9..d5cf953b4337 100644 --- a/drivers/soc/qcom/qcom-geni-se.c +++ b/drivers/soc/qcom/qcom-geni-se.c @@ -1,6 +1,7 @@ // SPDX-License-Identifier: GPL-2.0 // Copyright (c) 2017-2018, The Linux Foundation. All rights reserved. +#include #include #include #include @@ -450,6 +451,9 @@ int geni_se_resources_off(struct geni_se *se) { int ret; + if (has_acpi_companion(se->dev)) + return 0; + ret = pinctrl_pm_select_sleep_state(se->dev); if (ret) return ret; @@ -487,6 +491,9 @@ int geni_se_resources_on(struct geni_se *se) { int ret; + if (has_acpi_companion(se->dev)) + return 0; + ret = geni_se_clks_on(se); if (ret) return ret; @@ -724,12 +731,14 @@ static int geni_se_probe(struct platform_device *pdev) if (IS_ERR(wrapper->base)) return PTR_ERR(wrapper->base); - wrapper->ahb_clks[0].id = "m-ahb"; - wrapper->ahb_clks[1].id = "s-ahb"; - ret = devm_clk_bulk_get(dev, NUM_AHB_CLKS, wrapper->ahb_clks); - if (ret) { - dev_err(dev, "Err getting AHB clks %d\n", ret); - return ret; + if (!has_acpi_companion(&pdev->dev)) { + wrapper->ahb_clks[0].id = "m-ahb"; + wrapper->ahb_clks[1].id = "s-ahb"; + ret = devm_clk_bulk_get(dev, NUM_AHB_CLKS, wrapper->ahb_clks); + if (ret) { + dev_err(dev, "Err getting AHB clks %d\n", ret); + return ret; + } } dev_set_drvdata(dev, wrapper);