Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3468495ybi; Mon, 29 Jul 2019 07:07:01 -0700 (PDT) X-Google-Smtp-Source: APXvYqwPql4MUCg/9pTrzINmiAbgQQ/kzDR+4UXilC0I9EgUz2zQl1YrZVLzX7xb4JYc86Oc+4bA X-Received: by 2002:a63:de07:: with SMTP id f7mr1891724pgg.213.1564409221169; Mon, 29 Jul 2019 07:07:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564409221; cv=none; d=google.com; s=arc-20160816; b=nmzyeyDwIQF0i+pXOnk9zSh2o1ZXr5/AObYCiPxc6A5BlVAM8bsPm7Nr5TNN1YUaFq 5io/QuZlsq7ycWS1zK6Kd9Xwe2nSMwXW07HKXkkLFHWEjdkI0JqVd45sHIvg/71l9Rq6 Gh2GPsI2VHROt+7TztfP8VxwcT/SUnZOb7mwDz52dU0xMpYIRMTXuBJMbIXoDFQcoEHn eOmb+sBeoxOC2PFFxJbKJjFvpVQJoJMRR2LZM2AI7QjLplccImJ+iwg2QGMNZGGpsNSC qnhIpft4WwNa8CgBx6pPea0DI/jz0bUxTLy/2FuV5p1edvPMC4D1cX2c0u2/8RSEFGpu EHcQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=ilNgiDVSmGak25pg9L0wagvtwRSAZxVDdm8Be33Ze3o=; b=lhKpl8ktZq/NygD+QI592ovKfL6oVwYuFmjp+TQ+PFxdsRqHWiCZDctYU9DlLSO+Ya to9GIH5nKsbR9DTbSQddy08GtRl3lZUXrG3SOUdBfmuhWEDNJeMj0QvvBMeuu/ZcfJY9 FlPPHgok1E9v8mJZxAocP7QbfqtXKujcbRwB1BwGM+cxM4EWVUrV6oFo5GYNuyKCHiRM Qrk4NfMSLpg4QVGocZmCMJARkUuVZCyIMx12ZX2OlELcq3/k8hDcn0MqwSjzUXxjEjSb r1bNyaio8GhMgnqhqBThURTDoBorMLbHwTfOOn7Uhxt/0H5BaQvWEbu/ROvtAxI8KYjR w9nQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=Wfz6C774; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e14si20476485pgg.442.2019.07.29.07.06.45; Mon, 29 Jul 2019 07:07:01 -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=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=Wfz6C774; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388011AbfG2NRF (ORCPT + 99 others); Mon, 29 Jul 2019 09:17:05 -0400 Received: from mail-wm1-f68.google.com ([209.85.128.68]:50833 "EHLO mail-wm1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728553AbfG2NRD (ORCPT ); Mon, 29 Jul 2019 09:17:03 -0400 Received: by mail-wm1-f68.google.com with SMTP id v15so53846270wml.0 for ; Mon, 29 Jul 2019 06:17:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ilNgiDVSmGak25pg9L0wagvtwRSAZxVDdm8Be33Ze3o=; b=Wfz6C774D3WcLjVSRjjQ9Lw6OAiML+fgZ8SRO9mkuLL3Gzg4MPG1wMAJOBhov2Q2BV PIgPQfA7tWuphF1Vx2YdRRrTQU+oZU6Ei2Mx+31nEU93c6KlukMw3bv6jtwjnA6WxOJd pxaG8IXHlrJjHAWA5Bv3mNNvJ36r8AgsfIgq2zKOOlZBj4yvhdEek/isUR/HhUxe1A6F 9Tua4I1IPVpvm1aq/GUu4dyAOpFcpxGBnEEg6oNcLhFWYR5I0KnP6jGS6Nc1DEZ0FcO4 SxDRZYkCUrrh2836Vcvs3RMfmZqivsJraN2vozaJk7mOJAlZpkendo8TlYJGAAa9tq0q chOQ== 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:mime-version:content-transfer-encoding; bh=ilNgiDVSmGak25pg9L0wagvtwRSAZxVDdm8Be33Ze3o=; b=ogi4w4DYP/LJ1CL7H7as2QXsJCMiXRQONASq2Jby0S209YT3pO3cbfVxYNrjl0zLL6 jZ9fqxQeK13RImRTaFRRXDE7J9OEAdIu2knEKRh0f9XFbrCgJXh+dOwJbUlnudYGxqKy L4fq6NkqD1fJhTBWkTSp3CY4E8ZzFh+azMjZgIPFkQKaeudBfXkwYBJryT1PgXCUrnt8 xm3E4hNU9SpVTShhsgX4jNbtXY4Nb9yJiH35PPlW64uth7zndVfQ4Uv6MtTFj0K4gbSO QSw59dt5I+G6SuRnf2CAx7fZqQ2hrjh5G4Fz/FqNVMDiIzXqNpYuWnvZCKq4pG4W/TSm Sg4w== X-Gm-Message-State: APjAAAUqZzb5MNT4cYM1BlwKWCBLSXLy+wPi3qFrbHby55KtlQWL45G+ 5x7XFO5Z+oHtAcjrxkNVAyqIHQ== X-Received: by 2002:a7b:c947:: with SMTP id i7mr102925593wml.77.1564406220768; Mon, 29 Jul 2019 06:17:00 -0700 (PDT) Received: from bender.baylibre.local (lmontsouris-657-1-212-31.w90-63.abo.wanadoo.fr. [90.63.244.31]) by smtp.gmail.com with ESMTPSA id b5sm52520490wru.69.2019.07.29.06.17.00 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Mon, 29 Jul 2019 06:17:00 -0700 (PDT) From: Neil Armstrong To: jbrunet@baylibre.com Cc: Neil Armstrong , linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, linux-amlogic@lists.infradead.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 2/4] clk: meson: regmap: export regmap_div ops functions Date: Mon, 29 Jul 2019 15:16:54 +0200 Message-Id: <20190729131656.7308-3-narmstrong@baylibre.com> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190729131656.7308-1-narmstrong@baylibre.com> References: <20190729131656.7308-1-narmstrong@baylibre.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The G12A CPU Clock Postmux divider needs a custom div_set_rate() call. Export the clk_regmap_div_round_rate() and clk_regmap_div_recalc_rate() to be able to override the default clk_regmap_div_set_rate() callback. --- drivers/clk/meson/clk-regmap.c | 10 ++++++---- drivers/clk/meson/clk-regmap.h | 5 +++++ 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/drivers/clk/meson/clk-regmap.c b/drivers/clk/meson/clk-regmap.c index dcd1757cc5df..26c8c74a8cf0 100644 --- a/drivers/clk/meson/clk-regmap.c +++ b/drivers/clk/meson/clk-regmap.c @@ -56,8 +56,8 @@ const struct clk_ops clk_regmap_gate_ro_ops = { }; EXPORT_SYMBOL_GPL(clk_regmap_gate_ro_ops); -static unsigned long clk_regmap_div_recalc_rate(struct clk_hw *hw, - unsigned long prate) +unsigned long clk_regmap_div_recalc_rate(struct clk_hw *hw, + unsigned long prate) { struct clk_regmap *clk = to_clk_regmap(hw); struct clk_regmap_div_data *div = clk_get_regmap_div_data(clk); @@ -74,9 +74,10 @@ static unsigned long clk_regmap_div_recalc_rate(struct clk_hw *hw, return divider_recalc_rate(hw, prate, val, div->table, div->flags, div->width); } +EXPORT_SYMBOL_GPL(clk_regmap_div_recalc_rate); -static long clk_regmap_div_round_rate(struct clk_hw *hw, unsigned long rate, - unsigned long *prate) +long clk_regmap_div_round_rate(struct clk_hw *hw, unsigned long rate, + unsigned long *prate) { struct clk_regmap *clk = to_clk_regmap(hw); struct clk_regmap_div_data *div = clk_get_regmap_div_data(clk); @@ -100,6 +101,7 @@ static long clk_regmap_div_round_rate(struct clk_hw *hw, unsigned long rate, return divider_round_rate(hw, rate, prate, div->table, div->width, div->flags); } +EXPORT_SYMBOL_GPL(clk_regmap_div_round_rate); static int clk_regmap_div_set_rate(struct clk_hw *hw, unsigned long rate, unsigned long parent_rate) diff --git a/drivers/clk/meson/clk-regmap.h b/drivers/clk/meson/clk-regmap.h index c4a39604cffd..ebf776a32ce3 100644 --- a/drivers/clk/meson/clk-regmap.h +++ b/drivers/clk/meson/clk-regmap.h @@ -78,6 +78,11 @@ clk_get_regmap_div_data(struct clk_regmap *clk) return (struct clk_regmap_div_data *)clk->data; } +unsigned long clk_regmap_div_recalc_rate(struct clk_hw *hw, + unsigned long prate); +long clk_regmap_div_round_rate(struct clk_hw *hw, unsigned long rate, + unsigned long *prate); + extern const struct clk_ops clk_regmap_divider_ops; extern const struct clk_ops clk_regmap_divider_ro_ops; -- 2.22.0