Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1139304imm; Fri, 27 Jul 2018 11:48:03 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfroDEf8cUyLvLXMVyLWmcJS3X9qY8ljJ3pgVBxpQ/TEBKLBpVAEJKWRhQX5kMbrR819GC0 X-Received: by 2002:a17:902:7202:: with SMTP id ba2-v6mr6967351plb.179.1532717283683; Fri, 27 Jul 2018 11:48:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532717283; cv=none; d=google.com; s=arc-20160816; b=XsofhIXTYZf8JYRhMslMaDxCb344xamng2y/3hDpQJIDlk99lwKpcgFM7Vi9allOpD z8LTkZxkiUHmm+eWvvoAysSbsl80TD6hH6hNQb2mtRX+wvUOIIBndSys/U8Rg+RBHZ/L y6tTgkN6Fsf/5X2x+Gg/Y6XBKMskSko/38B2CLWg2sF/Zyw+e5bDvurfSjRLkEkbbaLd 9NsjvoeNkTyI5PjRh7UVQFAKPnK97+86WIuKur8Inz7Q6aZADHwrLftsBUy9eQrwaHLr DDaiYGCTWxsYKzgh/9Qh3U9rxtM+o/1oNmnEbq5ME7jt04/rQVw/bvXtPiZ+2U5XFEis MH1g== 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=u4IJJPpAgL/mmPcWRAs0Djt5PXiWxpHgGzRIk6J2bs2Z8PSHpxIa/eQgWQ9B3A1FP/ t8ChxnDml3vhJ4eHGLdGEsordpA3TY2TbyPzBrJRGfI9YFQy2Vyvg9ugV1GWSQzm55ar x+oESjsYzxyYB/DqTuURkQouub4wkHXy719Lykgp2FAqjFp1ImRoNGIQUi/jVScphbx9 /LJcu19h5kbyWGP5IgwIvGfcMk05sxHp8TX3lEQ747fleMrqOgIEkgg6BQw+eYQ2gaeE ttSbLdUmnK1l2RHlDfCvw9V1Fb6i2eJNb+ddcSgfZ8AROfaLhn6E5ZEPoR/jgpNFjKdf oknw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=S5YhsDnv; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 f26-v6si4198015pgm.428.2018.07.27.11.47.49; Fri, 27 Jul 2018 11:48:03 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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=S5YhsDnv; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S2389138AbeG0UKB (ORCPT + 99 others); Fri, 27 Jul 2018 16:10:01 -0400 Received: from mail-pf1-f194.google.com ([209.85.210.194]:45698 "EHLO mail-pf1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389106AbeG0UKB (ORCPT ); Fri, 27 Jul 2018 16:10:01 -0400 Received: by mail-pf1-f194.google.com with SMTP id i26-v6so2019470pfo.12 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=j2qeJrLdGI9M6W/IaWcdkoScDVbblz5cqABFJzvQ9x1lI19WQ0PEXLlFrdpe9EXak0 ZB3ukIwuZpMjNR7ndhfmFBtUu1awtm0QHotZWqKOenO/EO/yTi2cXNkEkRRskqaVBBzB EBK34/Pq4gwZ15hPgUYydd5JKStZoCTK1DvZH9RYjKc951sNbarmThA5CLK5fQBIC15K J5HjU5LNsJscoU+h+gmYFKZpnr962Dzl5Iqriw49McFajYj3BT0wpBvqI90Jwa/OFqvO Dkd7jksvDGes4TR757XH19aMiRxhbOD5PRj6Aw9exm6AeGVTIuGK++62ApSOvLDZSS4v AVFQ== X-Gm-Message-State: AOUpUlE6/saTUmRszK1Bi4FAxfg4zAgaZxDX4YcH4w+F3jndg8WXhfo6 IHV0K770LBgIdOaYa9LiEftf 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: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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(-) 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); -- 2.17.1