From patchwork Mon Jan 28 18:04:26 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Brunet X-Patchwork-Id: 156819 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp3719892jaa; Mon, 28 Jan 2019 10:05:11 -0800 (PST) X-Google-Smtp-Source: ALg8bN4YCJri0JsHuOchvxVawVT2PTuDHQ2ER+WztDLfhs7EuKjkEeW+VtgisouZif8OOX2ius5Z X-Received: by 2002:a62:7042:: with SMTP id l63mr23746247pfc.89.1548698711377; Mon, 28 Jan 2019 10:05:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548698711; cv=none; d=google.com; s=arc-20160816; b=pBVC0vX0ueqobOuesU2Qqd2ve3ZRaExYoD5A99sUFVhQxuXKVc3oia7w1AelorF//X xKVC0q/InmtqKoGraKyPbtz8cKajyxeUwaNdO9o20+gH9EUFpxRl66I4GkchSVmPXK28 Qy2dWGO4uqs7T63at2pnXj4tQdIQmP33tBFbO2uXNihwrFByTkneHhb6cQrXQo2PSN3c vWztHEyG9RQsMEbHbABJHEA1+L43YZVh2kFjraCAjV9+c+Lu8bglZ027lm+tyQZI48Um anUu3nNU21QDsAzQDEC2AwzX+G8ldlVytbb/KQai+3lz0H0YAb+zuy5RjosvBXFqioNG n6OA== 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=EfZJrxviN2mrWGaw9zsAtuOhyPzZmaPcT+0QlJs+SzE=; b=D5a1uuJVOQPLJdytbnfMrK6DG2tBCQ7dpJlYTtBLmXH6w2Lp9NisCH0y8irDqF4jCH vRmco1KnwN01ATFx2b5HIMEQnkbB4S2bn1VClNNvjBCTHrMJS+3SVK6JqwycwoL+4Rvn 98ffOKVhHb6Ha/5BiR662muiW95JtygmZrbxNMB6V+kEa1hKeRX6J1eSDYU/tudkr7zO X/ssceOlStL8hhW2tstKu7iE7qwtrwCRodYxpOMWIk9uvxM5evB31k+1Adp1/aD7vDYb trU8ii9H+LhmpF1SYKoT4bnWmlHpHb/v2hd9frNxAlY9T1Sgcz2sydmVjRTe87r/G8L2 R7Ew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=DZRohqHn; 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 s17si3717683pgi.513.2019.01.28.10.05.10; Mon, 28 Jan 2019 10:05:11 -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=DZRohqHn; 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 S1727388AbfA1SFJ (ORCPT + 31 others); Mon, 28 Jan 2019 13:05:09 -0500 Received: from mail-wr1-f65.google.com ([209.85.221.65]:39329 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727244AbfA1SFB (ORCPT ); Mon, 28 Jan 2019 13:05:01 -0500 Received: by mail-wr1-f65.google.com with SMTP id t27so19127024wra.6 for ; Mon, 28 Jan 2019 10:04:59 -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=EfZJrxviN2mrWGaw9zsAtuOhyPzZmaPcT+0QlJs+SzE=; b=DZRohqHnFjCPLcPusvGC1vo/rl6Xg8ExudFyc7H3YniqegXwjGo/28v+UVpx4Ei0Zx i3bs5HwV0B1UzqcXKi5hrawEFXt7NOuzQjrQTnDK9sdblOCmNHzO4JzAIngRzE93vwg/ BYmzMhEzZkyC+o5b3YOdvkBGUU1gInfREiHApCmTUD8U0LBNwSr2QBxsxDFi3ysyZoV5 yGBW1mWypPPlWqPZ34RaI9Lm/OpEDfSbgfM24fpZmnU9HbxpbA6hdElxtfJ2qCgbinen zVOALcJQ7m0j1rxuZREhPVqE0a/Jqv+lb6GYqLUYSlwlBIrIoiYZJIUVgf29gNpPuvTS J+yw== 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=EfZJrxviN2mrWGaw9zsAtuOhyPzZmaPcT+0QlJs+SzE=; b=UtgsIaFp0wZnoF7oaMGx4JDyjgatEYZrodN90ssqbKs4bBIYcmSdIdeVd5NK94+P34 m/K2voEhWaFS7ka4AcqtIM/5GtVKmt520Ulce+IfqOaoXeBG/Vpos/qSeoKcLaWklWN9 tp8osRWpcKknNaJra48LCGdFSGfURhb9YqoC5qYq/gtT6UzkYq72JIUVOhwHngDzrz6v OmT9v34uedCtumGFnrqTkd40Ozd5g9+Kj6VluQ//btIkKxh2CEtqvtifMRXra3Dz6C3e jfKiS96vxe2G+CQnlwCiLaZikzJljVPE9tTdqv2JWFrSF6uWje73o1v+9/JUr1EcLCPk 3Kqw== X-Gm-Message-State: AJcUukcDYu70IMbhQVH/nt79rDNyBVKLrFK5GjQbkqLIWtIjsJpY0wmN oPAIU/QAjpvY6WrsaTAbmrOG9G9dIPA= X-Received: by 2002:a5d:6487:: with SMTP id r7mr23494046wru.263.1548698698767; Mon, 28 Jan 2019 10:04:58 -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.57 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 28 Jan 2019 10:04:57 -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 10/14] clk: meson: take dualdiv out of clkc Date: Mon, 28 Jan 2019 19:04:26 +0100 Message-Id: <20190128180430.28689-11-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-aoclk.c | 3 +++ drivers/clk/meson/clk-dualdiv.c | 10 +++++++++- drivers/clk/meson/clk-dualdiv.h | 33 +++++++++++++++++++++++++++++++++ drivers/clk/meson/clkc.h | 19 ------------------- drivers/clk/meson/gxbb-aoclk.c | 3 +++ 5 files changed, 48 insertions(+), 20 deletions(-) create mode 100644 drivers/clk/meson/clk-dualdiv.h -- 2.20.1 diff --git a/drivers/clk/meson/axg-aoclk.c b/drivers/clk/meson/axg-aoclk.c index 5701f5840b75..6b408edb1608 100644 --- a/drivers/clk/meson/axg-aoclk.c +++ b/drivers/clk/meson/axg-aoclk.c @@ -16,6 +16,9 @@ #include "meson-aoclk.h" #include "axg-aoclk.h" +#include "clk-regmap.h" +#include "clk-dualdiv.h" + #define IN_PREFIX "ao-in-" /* diff --git a/drivers/clk/meson/clk-dualdiv.c b/drivers/clk/meson/clk-dualdiv.c index 4d9e161de627..c5ca23a5e3e8 100644 --- a/drivers/clk/meson/clk-dualdiv.c +++ b/drivers/clk/meson/clk-dualdiv.c @@ -22,7 +22,10 @@ */ #include -#include "clkc.h" +#include + +#include "clk-regmap.h" +#include "clk-dualdiv.h" static inline struct meson_clk_dualdiv_data * meson_clk_dualdiv_data(struct clk_regmap *clk) @@ -128,3 +131,8 @@ const struct clk_ops meson_clk_dualdiv_ro_ops = { .recalc_rate = meson_clk_dualdiv_recalc_rate, }; EXPORT_SYMBOL_GPL(meson_clk_dualdiv_ro_ops); + +MODULE_DESCRIPTION("Amlogic dual divider driver"); +MODULE_AUTHOR("Neil Armstrong "); +MODULE_AUTHOR("Jerome Brunet "); +MODULE_LICENSE("GPL v2"); diff --git a/drivers/clk/meson/clk-dualdiv.h b/drivers/clk/meson/clk-dualdiv.h new file mode 100644 index 000000000000..4aa939018012 --- /dev/null +++ b/drivers/clk/meson/clk-dualdiv.h @@ -0,0 +1,33 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Copyright (c) 2019 BayLibre, SAS. + * Author: Jerome Brunet + */ + +#ifndef __MESON_CLK_DUALDIV_H +#define __MESON_CLK_DUALDIV_H + +#include +#include "parm.h" + +struct meson_clk_dualdiv_param { + unsigned int n1; + unsigned int n2; + unsigned int m1; + unsigned int m2; + unsigned int dual; +}; + +struct meson_clk_dualdiv_data { + struct parm n1; + struct parm n2; + struct parm m1; + struct parm m2; + struct parm dual; + const struct meson_clk_dualdiv_param *table; +}; + +extern const struct clk_ops meson_clk_dualdiv_ops; +extern const struct clk_ops meson_clk_dualdiv_ro_ops; + +#endif /* __MESON_CLK_DUALDIV_H */ diff --git a/drivers/clk/meson/clkc.h b/drivers/clk/meson/clkc.h index ece8ed82b11c..24918cc5fa58 100644 --- a/drivers/clk/meson/clkc.h +++ b/drivers/clk/meson/clkc.h @@ -11,27 +11,8 @@ #include "clk-regmap.h" #include "parm.h" -struct meson_clk_dualdiv_param { - unsigned int n1; - unsigned int n2; - unsigned int m1; - unsigned int m2; - unsigned int dual; -}; - -struct meson_clk_dualdiv_data { - struct parm n1; - struct parm n2; - struct parm m1; - struct parm m2; - struct parm dual; - const struct meson_clk_dualdiv_param *table; -}; - /* clk_ops */ extern const struct clk_ops meson_clk_cpu_ops; -extern const struct clk_ops meson_clk_dualdiv_ops; -extern const struct clk_ops meson_clk_dualdiv_ro_ops; struct clk_hw *meson_clk_hw_register_input(struct device *dev, const char *of_name, diff --git a/drivers/clk/meson/gxbb-aoclk.c b/drivers/clk/meson/gxbb-aoclk.c index 510b6a7d2f18..26578622fc91 100644 --- a/drivers/clk/meson/gxbb-aoclk.c +++ b/drivers/clk/meson/gxbb-aoclk.c @@ -9,6 +9,9 @@ #include "meson-aoclk.h" #include "gxbb-aoclk.h" +#include "clk-regmap.h" +#include "clk-dualdiv.h" + #define IN_PREFIX "ao-in-" /* AO Configuration Clock registers offsets */