From patchwork Fri Aug 10 09:51:05 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Manivannan Sadhasivam X-Patchwork-Id: 143903 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp3142171ljj; Fri, 10 Aug 2018 02:52:28 -0700 (PDT) X-Google-Smtp-Source: AA+uWPwVpWBMK1D6eZPBLe3x8yVhdDjYGuU83Y7VEqR0qp/m5Rfc1axJuJFJQkaK5Huz0LMW10rI X-Received: by 2002:a17:902:599b:: with SMTP id p27-v6mr5434515pli.191.1533894748614; Fri, 10 Aug 2018 02:52:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533894748; cv=none; d=google.com; s=arc-20160816; b=DkK+0q0MAZbHVdoAruDd3tXHF87tvmvWt4JIhNZBweeqsqmBHac+gf3rHnwLeZZShU mLgvFIu1UtRvBrRZDJnpfuc3iOK+vMQVQrHNxn0U/Yl2kt8wriyIlijFAU6/l0VSApqz Zz64qMxHeZnaWkFRKFivQBumZDe+eCBGRUzmXdsO250p+jp63uyaRU2r7t6Yeu4YFqcY adSlD7S9Bzq9ycI1qn36WE+5ogmJTMEEUzVrmyOTq+MURiT+xlCw+E9q3flCIXOuXxhW hJfsvZ0Tlmb2UD7CPVlJ+ZW0ShlW1AIwTrGLwOnUKTQD+Z3TAu3dDZLTOeKVgzmohlc0 FJgQ== 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=za5CxvSp2kq8k58A6b/SgPjjdl8NPy5NiTzG8pBNcTw=; b=uZyI3lKAzztFhcvIAiB62+Lk1R8ngeHlKE/eZIAj2wjHNFyFMKlD4pSH9JPRUZLZKG Is1R2wL3PbZg+vnYwYskdYaR0BvsHflxdu0Vbdnp9+TVciCTUNHA+xxzljfgx3CBwsdz dPB//4Du2aN2d3rzM7euLuyiQEBmSxaPVs8w9tp7N930BLXROcea9n6E5s+U2PQfOAty ioTdZOcQMZf5a79o1MbX7oqFWygh2rP3m8bWvmTKasFiduE0G3pW4LG/lC6dxOPS907P bisX89J3TaEuuqKoo4M+2JWB0gd9NCoJRGX1wIQflVvCtoYJoLUnzT5+khmQLRMIYBi8 xS1w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="MDR/wORi"; 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=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 u189-v6si8618620pgb.635.2018.08.10.02.52.28; Fri, 10 Aug 2018 02:52:28 -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=pass header.i=@linaro.org header.s=google header.b="MDR/wORi"; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727639AbeHJMVf (ORCPT + 5 others); Fri, 10 Aug 2018 08:21:35 -0400 Received: from mail-pl0-f66.google.com ([209.85.160.66]:45555 "EHLO mail-pl0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727637AbeHJMVf (ORCPT ); Fri, 10 Aug 2018 08:21:35 -0400 Received: by mail-pl0-f66.google.com with SMTP id j8-v6so3832447pll.12 for ; Fri, 10 Aug 2018 02:52:27 -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=MDR/wORiIicegXE/lZK20080EUGevP30xgio1IZYAVaXU2kPY3gAwlFD4CdURu1UML 1ebLkImhU/zXnpZFmZh++SLYUh/OxZgxVHmF9Y6q2pNlZP5HUzqVgCClLtKcoPPTxqOx 32SUt2A8BEYeyxhRF4qqu8kVeRa4Jt7g4w4Us= 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=HbsJRhhOuNADBslzyZu3ZNb4MrI+Gs1VAloYmLaijGKhw4nTwPn8psCWqksu7sKjos fbMU5ZpDVofRD1jWSL9GPttpOw2ccHbOtF66GLawOPxkmdO5bS4LLMvwdr19Q/kWJ4kP TX3LKoyTlosSrSdXXnsMsysp0DQMyNXiiVJ3GiSiryadBqxESoJ5MEVuyPHsLXRMPAr5 WWH9QGpOhd3HwVtSxeTRLM4S2WqZ7Fq51vhCIjRBMe9JmH6Za9Ygk1NrUk0fxfCLtc0M 9MdUtruLNs6380LuMH41buv8YY4Gl8hx3CwBcZUxiS6IjktKfRdmGOIfC/9+YYqxUJq3 mD7Q== X-Gm-Message-State: AOUpUlG3o0pG64uVsg0MdMc+FsG5DdH618wpb1rtRi4ZWrWIaKo7gAe3 OF4kbzoKhGMuHYzR45VHWzhp X-Received: by 2002:a17:902:6f02:: with SMTP id w2-v6mr5450151plk.216.1533894747003; Fri, 10 Aug 2018 02:52:27 -0700 (PDT) Received: from localhost.localdomain ([2409:4072:6391:e983:9562:f5f7:1a60:4363]) by smtp.gmail.com with ESMTPSA id n83-v6sm25315120pfk.19.2018.08.10.02.52.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 10 Aug 2018 02:52:26 -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 v3 1/9] clk: actions: Cache regmap info in private clock descriptor Date: Fri, 10 Aug 2018 15:21:05 +0530 Message-Id: <20180810095113.25292-2-manivannan.sadhasivam@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180810095113.25292-1-manivannan.sadhasivam@linaro.org> References: <20180810095113.25292-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 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);