From patchwork Fri Jul 27 18:45:19 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manivannan Sadhasivam X-Patchwork-Id: 143087 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp1166732ljj; Fri, 27 Jul 2018 11:46:53 -0700 (PDT) X-Google-Smtp-Source: AAOMgpe5Jc+tH8XXPw4ahxVEwSy4LCdr2eB/FmXLXNpYBcxqc2RjpMxeugj5ZzyA3pPYMx4viHAQ X-Received: by 2002:a62:1b07:: with SMTP id b7-v6mr7836617pfb.70.1532717213419; Fri, 27 Jul 2018 11:46:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532717213; cv=none; d=google.com; s=arc-20160816; b=m+wCEdpB+9p69h30bA7s2JjSwe15kJA1xIHGeHT+eoA/Zla1WVhYG3BQRwmqHD6Rw9 bysn0kP9zQUKp508Y7dpqvDFh+w6sN1FChCC0cUX73YwbqH8R7bkJlizPM01FskNW8T1 UvE5lqzU054WUQD5mo4HLEN/fRCu/U0JY54rFgmZ5Y9i6y+iVfKYBUnLvqbH2DAL9arc RL2oHS/e12LX3hkW1fKiL9/QK66O2pvMZd+/2Mf+Qsvx5rjQ+T2hhBdmAkidApb0yI7u ceRCu2mYyaIxJX8AWTUyh5fbu+ghHvEoEhD+jRAThONw+mq0KhqfmMSv1sPyccYPK/oF +P7A== 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:arc-authentication-results; bh=uwH/FJ6RyRn6uzHMGxley1eSnT8ttyKoOMhP9wtoTAw=; b=lV4YXRIcEKKbtZ+geFJU956j2ye6ar3sHGpSNauIWN0UjjHOw5rH0U1WhYDGETp4DU lxOioHgwCVlROk7OjYOb9sLh30J1pr/MJ2viSffQT9OM9m4pijglJZFdofujOOTQm/Ef QgkVEBrKtAj46X4UewdocY3YlFOdD8Rl89IamRZckcrPqX5QJapWdhYM3xlANtSKAC75 GusCL01+/9VPR8sJANRGamZnWmV769M65L2ZGsN/EkZo9/C9GhrbaZL7uuA0rSVvB/41 RWhaIlMKWieNhCZOKt/ofswy07ZbMYkEra1QSaLu3pL6noNUnsAU0VBtzcBQk9c3H75e 3v7w== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=S5YhsDnv; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=fail (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 z21-v6si3774902pgu.163.2018.07.27.11.46.53; Fri, 27 Jul 2018 11:46:53 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=S5YhsDnv; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389107AbeG0UKB (ORCPT + 5 others); Fri, 27 Jul 2018 16:10:01 -0400 Received: from mail-pf1-f193.google.com ([209.85.210.193]:37809 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389105AbeG0UKB (ORCPT ); Fri, 27 Jul 2018 16:10:01 -0400 Received: by mail-pf1-f193.google.com with SMTP id a26-v6so2023726pfo.4 for ; Fri, 27 Jul 2018 11:46:52 -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=za5CxvSp2kq8k58A6b/SgPjjdl8NPy5NiTzG8pBNcTw=; b=S5YhsDnvPwYlTmWw5SqxawobmMygCj2QnCiUByZuUKTI4O0Wgx8/S/NiCa2CWG9jHJ yAFcDMESmDqsFIToOlRTxXha4H9sL4sst+c54yuYtKJZtgYgMVNFyuddsKUrsPHgkTKo gxOwahyKMNujxaBeqyb5iP6o8v7h0P/y0EsyU= 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=za5CxvSp2kq8k58A6b/SgPjjdl8NPy5NiTzG8pBNcTw=; b=hO4bLotglPKCietEKAGCFqWCkMRNPsTpQAfmUV08iN0QUzeF4ZOSnx8rM0ceTA2wfL kFRaK9oA2E8dkUeO55TCyp72QytMrvAbs/LOMa1Kzl+6PTcdCdfKtbsT0TuTtSleuJBw T3F6aofI5vck3hAsvxLzcQEQ1WsX+VoVTCsmoTseAA6B8PNK9S6m3dmBoIzhDDRZjvBp y+EDIUuONxk8J530LV1QgR2P+F9jAF/tvfmfv32oIZuxLxfysz1QWXJ+mPWFMR+8dmc0 If8BKvSGqwcP3mcOE865BZPAn+XpGRdKNdP1UBeyNdXBZAK/m8nLy3mp5EyGOuVYQBXd 1VJA== X-Gm-Message-State: AOUpUlGdIrAVOckiw/Uu9sav+drvFdAa98lNHIkXjLaYdIG+3IktkOSZ kor61uE6i6v7eea2N6I8wtBm X-Received: by 2002:a62:225d:: with SMTP id i90-v6mr7705770pfi.246.1532717211620; Fri, 27 Jul 2018 11:46:51 -0700 (PDT) Received: from localhost.localdomain ([2405:204:7308:c330:41b:cc59:b463:ec7b]) by smtp.gmail.com with ESMTPSA id t69-v6sm13817959pfj.7.2018.07.27.11.46.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 27 Jul 2018 11:46:51 -0700 (PDT) From: Manivannan Sadhasivam To: p.zabel@pengutronix.de, mturquette@baylibre.com, sboyd@kernel.org, afaerber@suse.de, robh+dt@kernel.org Cc: linux-clk@vger.kernel.org, liuwei@actions-semi.com, mp-cs@actions-semi.com, 96boards@ucrobotics.com, devicetree@vger.kernel.org, daniel.thompson@linaro.org, amit.kucheria@linaro.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, hzhang@ucrobotics.com, bdong@ucrobotics.com, manivannanece23@gmail.com, thomas.liau@actions-semi.com, jeff.chen@actions-semi.com, pn@denx.de, edgar.righi@lsitec.org.br, sravanhome@gmail.com, Manivannan Sadhasivam Subject: [PATCH 1/9] clk: actions: Cache regmap info in private clock descriptor Date: Sat, 28 Jul 2018 00:15:19 +0530 Message-Id: <20180727184527.13287-2-manivannan.sadhasivam@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180727184527.13287-1-manivannan.sadhasivam@linaro.org> References: <20180727184527.13287-1-manivannan.sadhasivam@linaro.org> Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org In order to support the reset controller, regmap info needs to be cached in the private clock descriptor, owl_clk_desc. Hence, save that and also make the clock descriptor struct non const. Signed-off-by: Manivannan Sadhasivam --- drivers/clk/actions/owl-common.c | 3 ++- drivers/clk/actions/owl-common.h | 3 ++- drivers/clk/actions/owl-s700.c | 4 ++-- drivers/clk/actions/owl-s900.c | 4 ++-- 4 files changed, 8 insertions(+), 6 deletions(-) -- 2.17.1 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/clk/actions/owl-common.c b/drivers/clk/actions/owl-common.c index 61c1071b5180..32dd29e0a37e 100644 --- a/drivers/clk/actions/owl-common.c +++ b/drivers/clk/actions/owl-common.c @@ -39,7 +39,7 @@ static void owl_clk_set_regmap(const struct owl_clk_desc *desc, } int owl_clk_regmap_init(struct platform_device *pdev, - const struct owl_clk_desc *desc) + struct owl_clk_desc *desc) { void __iomem *base; struct regmap *regmap; @@ -57,6 +57,7 @@ int owl_clk_regmap_init(struct platform_device *pdev, } owl_clk_set_regmap(desc, regmap); + desc->regmap = regmap; return 0; } diff --git a/drivers/clk/actions/owl-common.h b/drivers/clk/actions/owl-common.h index 4fd726ec54a6..56f01f7774aa 100644 --- a/drivers/clk/actions/owl-common.h +++ b/drivers/clk/actions/owl-common.h @@ -26,6 +26,7 @@ struct owl_clk_desc { struct owl_clk_common **clks; unsigned long num_clks; struct clk_hw_onecell_data *hw_clks; + struct regmap *regmap; }; static inline struct owl_clk_common * @@ -35,7 +36,7 @@ static inline struct owl_clk_common * } int owl_clk_regmap_init(struct platform_device *pdev, - const struct owl_clk_desc *desc); + struct owl_clk_desc *desc); int owl_clk_probe(struct device *dev, struct clk_hw_onecell_data *hw_clks); #endif /* _OWL_COMMON_H_ */ diff --git a/drivers/clk/actions/owl-s700.c b/drivers/clk/actions/owl-s700.c index 5e9531392ee5..e7cacd677275 100644 --- a/drivers/clk/actions/owl-s700.c +++ b/drivers/clk/actions/owl-s700.c @@ -569,7 +569,7 @@ static struct clk_hw_onecell_data s700_hw_clks = { .num = CLK_NR_CLKS, }; -static const struct owl_clk_desc s700_clk_desc = { +static struct owl_clk_desc s700_clk_desc = { .clks = s700_clks, .num_clks = ARRAY_SIZE(s700_clks), @@ -578,7 +578,7 @@ static const struct owl_clk_desc s700_clk_desc = { static int s700_clk_probe(struct platform_device *pdev) { - const struct owl_clk_desc *desc; + struct owl_clk_desc *desc; desc = &s700_clk_desc; owl_clk_regmap_init(pdev, desc); diff --git a/drivers/clk/actions/owl-s900.c b/drivers/clk/actions/owl-s900.c index 7f60ed6afe63..bb7ee872d316 100644 --- a/drivers/clk/actions/owl-s900.c +++ b/drivers/clk/actions/owl-s900.c @@ -684,7 +684,7 @@ static struct clk_hw_onecell_data s900_hw_clks = { .num = CLK_NR_CLKS, }; -static const struct owl_clk_desc s900_clk_desc = { +static struct owl_clk_desc s900_clk_desc = { .clks = s900_clks, .num_clks = ARRAY_SIZE(s900_clks), @@ -693,7 +693,7 @@ static const struct owl_clk_desc s900_clk_desc = { static int s900_clk_probe(struct platform_device *pdev) { - const struct owl_clk_desc *desc; + struct owl_clk_desc *desc; desc = &s900_clk_desc; owl_clk_regmap_init(pdev, desc);