From patchwork Mon Jan 28 18:04:20 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Brunet X-Patchwork-Id: 156816 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp3719551jaa; Mon, 28 Jan 2019 10:04:54 -0800 (PST) X-Google-Smtp-Source: ALg8bN4O17I+x1kWjX8MN3j26GfeD212qdnrAWsgiBHqcg6X/7O4saAIEZneCmwY02fJQqmHSPFu X-Received: by 2002:a63:ea15:: with SMTP id c21mr19646533pgi.361.1548698694548; Mon, 28 Jan 2019 10:04:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548698694; cv=none; d=google.com; s=arc-20160816; b=glDq2bSkTEhFL7vT22bKNApummudPJ3yU5NInafwmVTdAeSAyl3FkbxgZGoAZBGBLW 4pHs6TlODSoyEI9IUTu5sb6Wa82w/SBA6sMGpJ3Fq3m+YVG5tgiRTI3nmUg1eGe+59N3 QufENk61x/g7xUGglVmmpnYgXYSCoCug8aKZXd1s93Rzui4EbVeYj/oiKo+ATPY85qYE Ga4GbH8kPuX5scpeOl3fsox+WfUd2hgK4oYUxoL+gEFPKN2+5ASgRbk6DwZx0s1WLAGZ EKv7K994z9rHnN2akf8pMG38ZdwSpR5Ij4+AYYjPbmWnCrgZiWgDG+4chKAb3NvKurwp XmkQ== 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=r+WHTSkzlCo1wnAPo/2Tpux+aNiN2OcVk0MvXqGi20w=; b=vhlECo93Pz9oWJmw2OJmlRpHduI21BZDOVYvzii1VutOH6plSpJyRn2HT8a3In6Ama GLSSidy2JU95aOiZra6m+7bIVmPDGxq+X5mBibmhvgacMy9xPQNk97xI6DGRh4IBhdvB MViCBVyPtEbRMvaXuMT6S4RV/PQhz8K0GUxbYPQGKScFoSxz4Esy34YBVjHatLGN/ny+ XxMmLX3p9zyWFQTl5Tp8rFOalZ7V4BaV03NKh9K5LIs330Rdop369hYhn/RfWhMEpYsN 0YXCCENF+ADjzEfWHT94OEUQBGIMVo8hkAhLPx3o4NUPS46aqQnTPuXOUJOkXY33wojn mPRw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=C1GUr4pi; 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 b18si32684244plz.105.2019.01.28.10.04.54; Mon, 28 Jan 2019 10:04:54 -0800 (PST) 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=C1GUr4pi; 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 S1727154AbfA1SEw (ORCPT + 31 others); Mon, 28 Jan 2019 13:04:52 -0500 Received: from mail-wr1-f68.google.com ([209.85.221.68]:32993 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726971AbfA1SEt (ORCPT ); Mon, 28 Jan 2019 13:04:49 -0500 Received: by mail-wr1-f68.google.com with SMTP id p7so19190103wru.0 for ; Mon, 28 Jan 2019 10:04:48 -0800 (PST) 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=r+WHTSkzlCo1wnAPo/2Tpux+aNiN2OcVk0MvXqGi20w=; b=C1GUr4pieutpMKwI39/1w6pXhducYBNjduMWnqHc/+8ykx99zy2bSZ83672NJsrZ3S OlynYzQNFkiHHftuCE7WoeyJGnadG2hxM9P38PpPEOcdIGf+zxpJNXFhzNpHe7OKsuTG H/n5tJ52pvXmHf4zbcTyjbiG55/y6AC5Jnm1u4bSCJcdtUkvC5NrGwK2OxEEfP55DBRf 93Ma9F4YVhwKSlh/m8SJBtWf1CYtpgnHUNkrFxNaiwgy9Di+hIH/GbJSJGsno1lh7YuZ 0TDzN0g5J4BJ284OKXhY40SZK3qLtrV1aXRpivNSRK5JOC8//d7fzRwb2BWxXkw1+t6g +csQ== 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=r+WHTSkzlCo1wnAPo/2Tpux+aNiN2OcVk0MvXqGi20w=; b=qpuBh6cSs7i0OUtyezbfoUJMuIFWJH5WvBU2wpsHnxAxydrPUXatfAiY/v5HpIsgJz 088ZyNzVJYF5h5Z8Gil6q/yaQBpMJHtZCztlOrPTDjj7uGVuFM0jg6o8bvKDZ4GDnr0d bhj1kG/vn2DfEkhQATp2eDmd92x9q7QZkiypcq47n+sXabwhlN3sIuYI/2GjdoiPX8LF 2aEOZxPxRobdUUxjLLGOjapi6a8m694DQl5OpEA6Npcq33tzh4Dwbwzj6f3wDfMfnIEw gtTqVVVfGHrazL5RCKyW0blktSxrfHOEIKK+C+tV3WCOFuF30rJlRzmzglFo5k0sw9bv codA== X-Gm-Message-State: AJcUukef5icIQxxsuYMkniqUnkXKCQHR0GJhqwlvkrNF3iCcUeBzeMr5 A3Xv1AAhN2tsJ6bG85P8D1jFfQ== X-Received: by 2002:a05:6000:12c4:: with SMTP id l4mr22393190wrx.134.1548698687963; Mon, 28 Jan 2019 10:04:47 -0800 (PST) Received: from boomer.local ([2a01:e34:eeb6:4690:106b:bae3:31ed:7561]) by smtp.googlemail.com with ESMTPSA id p6sm145548193wrx.50.2019.01.28.10.04.46 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 28 Jan 2019 10:04:47 -0800 (PST) From: Jerome Brunet To: Neil Armstrong , Stephen Boyd , Michael Turquette Cc: Jerome Brunet , Kevin Hilman , linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, linux-amlogic@lists.infradead.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 04/14] clk: meson: move MESON_GATE to clk-regmap.h Date: Mon, 28 Jan 2019 19:04:20 +0100 Message-Id: <20190128180430.28689-5-jbrunet@baylibre.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190128180430.28689-1-jbrunet@baylibre.com> References: <20190128180430.28689-1-jbrunet@baylibre.com> MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Signed-off-by: Jerome Brunet --- drivers/clk/meson/axg.c | 1 + drivers/clk/meson/clk-regmap.c | 5 +++++ drivers/clk/meson/clk-regmap.h | 15 +++++++++++++++ drivers/clk/meson/clkc.h | 15 --------------- 4 files changed, 21 insertions(+), 15 deletions(-) -- 2.20.1 diff --git a/drivers/clk/meson/axg.c b/drivers/clk/meson/axg.c index 1c6539eeee7c..474412234633 100644 --- a/drivers/clk/meson/axg.c +++ b/drivers/clk/meson/axg.c @@ -18,6 +18,7 @@ #include #include "clkc.h" +#include "clk-regmap.h" #include "axg.h" #define IN_PREFIX "ee-in-" diff --git a/drivers/clk/meson/clk-regmap.c b/drivers/clk/meson/clk-regmap.c index c515f67322a3..dcd1757cc5df 100644 --- a/drivers/clk/meson/clk-regmap.c +++ b/drivers/clk/meson/clk-regmap.c @@ -4,6 +4,7 @@ * Author: Jerome Brunet */ +#include #include "clk-regmap.h" static int clk_regmap_gate_endisable(struct clk_hw *hw, int enable) @@ -180,3 +181,7 @@ const struct clk_ops clk_regmap_mux_ro_ops = { .get_parent = clk_regmap_mux_get_parent, }; EXPORT_SYMBOL_GPL(clk_regmap_mux_ro_ops); + +MODULE_DESCRIPTION("Amlogic regmap backed clock driver"); +MODULE_AUTHOR("Jerome Brunet "); +MODULE_LICENSE("GPL v2"); diff --git a/drivers/clk/meson/clk-regmap.h b/drivers/clk/meson/clk-regmap.h index e9c5728d40eb..b7a085bbf072 100644 --- a/drivers/clk/meson/clk-regmap.h +++ b/drivers/clk/meson/clk-regmap.h @@ -111,4 +111,19 @@ clk_get_regmap_mux_data(struct clk_regmap *clk) extern const struct clk_ops clk_regmap_mux_ops; extern const struct clk_ops clk_regmap_mux_ro_ops; +#define MESON_GATE(_name, _reg, _bit) \ +struct clk_regmap _name = { \ + .data = &(struct clk_regmap_gate_data){ \ + .offset = (_reg), \ + .bit_idx = (_bit), \ + }, \ + .hw.init = &(struct clk_init_data) { \ + .name = #_name, \ + .ops = &clk_regmap_gate_ops, \ + .parent_names = (const char *[]){ "clk81" }, \ + .num_parents = 1, \ + .flags = (CLK_SET_RATE_PARENT | CLK_IGNORE_UNUSED), \ + }, \ +} + #endif /* __CLK_REGMAP_H */ diff --git a/drivers/clk/meson/clkc.h b/drivers/clk/meson/clkc.h index e3cd442db739..35768c2327ba 100644 --- a/drivers/clk/meson/clkc.h +++ b/drivers/clk/meson/clkc.h @@ -95,21 +95,6 @@ struct meson_vid_pll_div_data { struct parm sel; }; -#define MESON_GATE(_name, _reg, _bit) \ -struct clk_regmap _name = { \ - .data = &(struct clk_regmap_gate_data){ \ - .offset = (_reg), \ - .bit_idx = (_bit), \ - }, \ - .hw.init = &(struct clk_init_data) { \ - .name = #_name, \ - .ops = &clk_regmap_gate_ops, \ - .parent_names = (const char *[]){ "clk81" }, \ - .num_parents = 1, \ - .flags = (CLK_SET_RATE_PARENT | CLK_IGNORE_UNUSED), \ - }, \ -}; - struct meson_clk_dualdiv_param { unsigned int n1; unsigned int n2;