Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp1265118pxu; Fri, 16 Oct 2020 07:57:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzoV7rnR4B4QPbE+UcXDlWqbNr8l7s/IducR6K8HC0jDKIBedicFrOgajTAOi2u6ioZzMiD X-Received: by 2002:a17:906:3541:: with SMTP id s1mr4201438eja.413.1602860237885; Fri, 16 Oct 2020 07:57:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602860237; cv=none; d=google.com; s=arc-20160816; b=ZHzCpt4BRKoCLR3MtPPh3QYYazeIC5LNOpaw9cU40cjh7OmlKoXwWOi1Ug4dbvpgKP /vM6JJvafitsA8+9mbdKrigfEDGeaUSgUoHuhynPc9g4vZ+2HNB0A4x4RC9qfVZI4wDO Lk5VL5M2u+kW3UDHj/Gkchi5Up6vUIpnwFLig8oZi1TZJzCnHbeQvHPv6DNkx4eecUik u7Mo8/HWx3MJrKWAtOKpAox2c9njm2b0ZTjQgHYQw4YZMdV5UlD2kseF0Y+UlKfQsKxm bacJGBTASiMfeqmkzWYyXE2xQ5h5bQ0y6NvKvx1Cs7Keb8Yt0M3rKx/VDkrHTWpK9wWQ DxBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from; bh=vFb0hnsdpTntZaPI4aYKUEPRx9D9NFpe1dIltUY9J2U=; b=z5LcEkoGUE1Ll13lZrNmpwrmpHzcjFgw+s9rfWBmRKRBOgmz7SubgXxTJBspbLKVa3 B8sJnFO7C7ezXfv6puovkOzcbD1bisnvpbV0AzhidKkOPWuXCTBw5bdKJq2YieBcGvZY p9rRiVolKACRcN2gB5EJSpWPOd+YT5T3EF8m4Ik3BbG6k668F/IgR4g9BLInu9dY46b+ poCgcZgV+WTJ2c/kKOv/BPlfntKc+FLjCuzq2JEg4+BIPolzV/wtdgnFebQRwBVKhpKE hhxfg61+7hsnjo1Uifns+v1bnN2zkYqGhxfMq/jadCElwRjhXm8+HnJ0APxZXd9abBPA pz3Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ck10si1936745ejb.707.2020.10.16.07.56.55; Fri, 16 Oct 2020 07:57:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2407340AbgJPMRW (ORCPT + 99 others); Fri, 16 Oct 2020 08:17:22 -0400 Received: from relmlor1.renesas.com ([210.160.252.171]:52101 "EHLO relmlie5.idc.renesas.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2407333AbgJPMRV (ORCPT ); Fri, 16 Oct 2020 08:17:21 -0400 X-IronPort-AV: E=Sophos;i="5.77,382,1596466800"; d="scan'208";a="59986363" Received: from unknown (HELO relmlir6.idc.renesas.com) ([10.200.68.152]) by relmlie5.idc.renesas.com with ESMTP; 16 Oct 2020 21:17:20 +0900 Received: from localhost.localdomain (unknown [10.226.36.204]) by relmlir6.idc.renesas.com (Postfix) with ESMTP id 7E1A443871A4; Fri, 16 Oct 2020 21:17:18 +0900 (JST) From: Lad Prabhakar To: Geert Uytterhoeven , Michael Turquette , Stephen Boyd , linux-renesas-soc@vger.kernel.org, linux-clk@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Biju Das , Prabhakar , Lad Prabhakar Subject: [PATCH 1/4] clk: renesas: rcar-gen3: Add support to pass custom RPCSRC div table Date: Fri, 16 Oct 2020 13:17:06 +0100 Message-Id: <20201016121709.8447-2-prabhakar.mahadev-lad.rj@bp.renesas.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201016121709.8447-1-prabhakar.mahadev-lad.rj@bp.renesas.com> References: <20201016121709.8447-1-prabhakar.mahadev-lad.rj@bp.renesas.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org RPCSRC div table is SoC specific and is not common for all R-Car Gen3 devices, with the current implementation in rcar-gen3-cpg not all the SoC's are covered. To handle such case introduce a new member cpg_rpcsrc_div_table in priv structure so that we pass SoC specific div table for RPCSRC. Signed-off-by: Lad Prabhakar Reviewed-by: Biju Das --- drivers/clk/renesas/rcar-gen3-cpg.c | 2 ++ drivers/clk/renesas/renesas-cpg-mssr.h | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/drivers/clk/renesas/rcar-gen3-cpg.c b/drivers/clk/renesas/rcar-gen3-cpg.c index 488f8b3980c5..cdfcd108d1a3 100644 --- a/drivers/clk/renesas/rcar-gen3-cpg.c +++ b/drivers/clk/renesas/rcar-gen3-cpg.c @@ -693,6 +693,8 @@ struct clk * __init rcar_gen3_cpg_clk_register(struct device *dev, return clk_register_divider_table(NULL, core->name, __clk_get_name(parent), 0, base + CPG_RPCCKCR, 3, 2, 0, + info->cpg_rpcsrc_div_table ? + info->cpg_rpcsrc_div_table : cpg_rpcsrc_div_table, &cpg_lock); diff --git a/drivers/clk/renesas/renesas-cpg-mssr.h b/drivers/clk/renesas/renesas-cpg-mssr.h index f369b06c903b..3b0a70c59e04 100644 --- a/drivers/clk/renesas/renesas-cpg-mssr.h +++ b/drivers/clk/renesas/renesas-cpg-mssr.h @@ -8,6 +8,8 @@ #ifndef __CLK_RENESAS_CPG_MSSR_H__ #define __CLK_RENESAS_CPG_MSSR_H__ +#include + /* * Definitions of CPG Core Clocks * @@ -116,6 +118,8 @@ enum clk_reg_layout { * Management, in addition to Module Clocks * @num_core_pm_clks: Number of entries in core_pm_clks[] * + * @cpg_rpcsrc_div_table: DIV table for RPCSRC + * * @init: Optional callback to perform SoC-specific initialization * @cpg_clk_register: Optional callback to handle special Core Clock types */ @@ -147,6 +151,8 @@ struct cpg_mssr_info { const unsigned int *core_pm_clks; unsigned int num_core_pm_clks; + const struct clk_div_table *cpg_rpcsrc_div_table; + /* Callbacks */ int (*init)(struct device *dev); struct clk *(*cpg_clk_register)(struct device *dev, -- 2.17.1