From patchwork Mon Jan 28 18:04:17 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Brunet X-Patchwork-Id: 156815 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp3719478jaa; Mon, 28 Jan 2019 10:04:50 -0800 (PST) X-Google-Smtp-Source: ALg8bN6gypfHZ9IAJSxEkYYrRaQGPLS4mocM2LkYB8PAPxnGABq145ymua/X8CFgnMG2kYM6ZtRL X-Received: by 2002:a63:104d:: with SMTP id 13mr20803389pgq.303.1548698690509; Mon, 28 Jan 2019 10:04:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548698690; cv=none; d=google.com; s=arc-20160816; b=Z/cgzl1vPsXiWaoLV29JT9fXleYIfyIbbbcZMULOPuClOlpZ77IJzCPiixl5/ZRB3a RmkJMlRBU0bA1bNa5iMSm0tmtIZFQAziwH4dslclFrImjJfKBZa0qPjTi0aYfrj5LkYl OkR2j0IdafmDMSkEPS+XoFfyJBTr2wO/czgx4npHoRMq2zQxmK/Z5NTn/ITeETt2+QcY U1YUIUxzBA7FhG8zkBSshwyyGYAa4V32npdGdME1eCwLEcION6MnoC401qnBP/ZqR9sB ay3DOr4Fr3Hw2q03mZkIgS9fTts+1AgoOh470EQL6epxv+wP/6RU+e/H4CrH5PpoWlUX nCMg== 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=qpNi8npcEuB1/go2Tg3AdjTVG+V6jYSlzX7BwF0GsfM=; b=QHE2i+fGk/FPxzVyiw1N2rpT7tMeALZlKlGTeSP5sial8Agwg/H3FH0B15LRNKhri+ o99v7w7A1veKdDHUxSsUMqJPerD5La3oNI0NmB5q52VsxlWR7/x0OwkEFNm8VdGJUbr2 ssP4qk+xY1en/ZEXnZXVWE9qxsOluf7pnWjM7RFGlEw1Pvsxtu0076yYN33Jz4/DwQOc xroq5+KqS/zCqYE2RvqTfloPwISEhvgK4QOyLJ1Em36TYINlS1nwmGLihz5wUCS6LS8C k3/3KpqbSy2AhmqA7RIfyZ+Tdu95zBavKRfDDdt2gOgqZIfUnuYj4E37/IQsKWUkmsiM 7bkg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b="Yf/kYh5B"; 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 v11si14430125pgo.11.2019.01.28.10.04.50; Mon, 28 Jan 2019 10:04:50 -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="Yf/kYh5B"; 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 S1727068AbfA1SEr (ORCPT + 31 others); Mon, 28 Jan 2019 13:04:47 -0500 Received: from mail-wr1-f67.google.com ([209.85.221.67]:39301 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726971AbfA1SEp (ORCPT ); Mon, 28 Jan 2019 13:04:45 -0500 Received: by mail-wr1-f67.google.com with SMTP id t27so19125983wra.6 for ; Mon, 28 Jan 2019 10:04:43 -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=qpNi8npcEuB1/go2Tg3AdjTVG+V6jYSlzX7BwF0GsfM=; b=Yf/kYh5BzodGUwm1cbrUVBA1KqVdS2kGmvsYG6gRA4Se+GVQx8zHtil+snbPXEvzNT AeovQMbgjPdfEoBVaZmz3//mXG0o4zf8FWrufwnP0F2slTgaS4qz3gnSzd/yLcOASQQU kQ1a1EvsZWa8w7ayuI23vIftKyAkSE/QSNAbNYOAE1cWaBB5RNGPYpLJThSuhy+o8eib GcDOhT+lu4X9A/jie8xBQGzseO3DPhA1+vgJ7vz5PVnhs4/M9HFVHeX1+SQ81vol2kjP YZ6sPvdNjfXHruCJLZFZ/KbTSGT4OxtV33ulJlfGz/hcnu6trg+bQ2aGPisvcO6Jw2fU yySQ== 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=qpNi8npcEuB1/go2Tg3AdjTVG+V6jYSlzX7BwF0GsfM=; b=PrCNm9CzIqFVfWibXT7YfQFWu/IVzIstjrxMXbVCdrAHwR/Xc153M0t2LnYpo9xdTF 1cnmc9tKvJHQmmxl2FovxW462ALK+ar6cdwB+CotmgNjskHFkTtrWzvuxA4kDBMXg6Kd Rs1sjwVr6dMhAgfHjOHLTRiYquJZIKmfJBqLIokEZH4VSQMF1BNpEhodivaGqJ5nZTgG I11tm0vHiHCdioPMXjNRVm1OZ6cakpn9XQCDrxZRkYMJvtoFXDrteyFGAaGSA0E0R4fF T7iXCWxuvzH1ljgVfbYewXHGj+EnyX9ArbLevevzXb57IDlXdoJOagQyBrkH8wKzeA0i waXw== X-Gm-Message-State: AJcUukfU6Ur0pfJ/UQ2E0TwTPM7xGfvZzlyNPEY8IuvCI1uwgIl4vj4y atR1L/1ach3jp4bDUe6z4BOw0A== X-Received: by 2002:adf:ca13:: with SMTP id o19mr22509938wrh.148.1548698683205; Mon, 28 Jan 2019 10:04:43 -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.41 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 28 Jan 2019 10:04:42 -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 01/14] clk: export some clk_hw function symbols for module drivers Date: Mon, 28 Jan 2019 19:04:17 +0100 Message-Id: <20190128180430.28689-2-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 clk-provider.h provides clk_hw_is_prepared(), clk_hw_is_enabled() and clk_hw_is_prepared() but these symbols are not exported for the modules which prevents a clock driver using them to be compiled as a module. Export them to fix the problem. Signed-off-by: Jerome Brunet --- drivers/clk/clk.c | 3 +++ 1 file changed, 3 insertions(+) -- 2.20.1 Acked-by: Stephen Boyd diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c index 5a0551aba09e..91ae0e6e76e7 100644 --- a/drivers/clk/clk.c +++ b/drivers/clk/clk.c @@ -394,16 +394,19 @@ bool clk_hw_is_prepared(const struct clk_hw *hw) { return clk_core_is_prepared(hw->core); } +EXPORT_SYMBOL_GPL(clk_hw_is_prepared); bool clk_hw_rate_is_protected(const struct clk_hw *hw) { return clk_core_rate_is_protected(hw->core); } +EXPORT_SYMBOL_GPL(clk_hw_rate_is_protected); bool clk_hw_is_enabled(const struct clk_hw *hw) { return clk_core_is_enabled(hw->core); } +EXPORT_SYMBOL_GPL(clk_hw_is_enabled); bool __clk_is_enabled(struct clk *clk) { From patchwork Mon Jan 28 18:04:18 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Brunet X-Patchwork-Id: 156831 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp3721024jaa; Mon, 28 Jan 2019 10:06:12 -0800 (PST) X-Google-Smtp-Source: ALg8bN4hUJnBu503HlmMxQHA89eFnFR1+HTIKEURtkacc6qBmyvNNhfoOtRUjQzxuHAJNZwxQ3bD X-Received: by 2002:a62:e201:: with SMTP id a1mr22374869pfi.75.1548698772827; Mon, 28 Jan 2019 10:06:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548698772; cv=none; d=google.com; s=arc-20160816; b=Ci6abD6v7IB/Vf4zhfV/bpx7GZt13gqNqmbRSbxu6w8+FXhUqhMFCe/+ohyu/hD3xE QgVHhIYgalZdMyUt5elZZhG/b0IHBy0Em3IXRHjMHwUsjfIXIZitVaCdHnhhI+BJQTBO LJ8mV+GQ69UjrCE0kdZkLu9u+8cSTSkFxwxuPllAe0q3lF1wAD/zDAWcbcfVA3XAyvBz 5oqy6IH7Cw+U+xwwmbiRS9+Z5RlDcv4X+nrx6T8s3GdpNyLOxcUAs3hZQ3GxXWh+xbEq kB8+Vl6TE5+eFWFV4JoqCNWgsxS46zi58062WFC7/kFxI5koh7XhN1vt4EsTtyCBwbbd +bGQ== 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=SyqJ1ZNijojoTR5cd+qdscOqYrp/PnKLGRUwKnFmRlM=; b=eOIAJ/jzc3sdbssmfMBlYuSd4i8lqGiqbLXXdTl2UapeMoB/yvla9NmsM3tSlujVu3 o81wnRhkh8jblh8xmTWFibO+pgS7VRddIowMNRRnL/5047WWhwguajJ/dv2JQH+aikfQ wDKFqajVbkFB5HoON7NsHvYP+AAK78bL4yQMDfm2ctzCH+x4itFqagnuc/O6/yp3k8Ti FVpbGMq7URR26hLT4IOJo1+ZR2CBzSn94OlQgSSE9u1KrGAB606jOSFlNoir+GIXmbkN jk/qrdQ8BdxtzTN+GqT9vo7/Nw8ZYShkA207VPIHDjJLpor+R3X3u/+XsgWJ0dz6UBpZ 3wxQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=Zsbih5A0; 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 j10si25938640pgn.365.2019.01.28.10.06.12; Mon, 28 Jan 2019 10:06:12 -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=Zsbih5A0; 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 S1727630AbfA1SGK (ORCPT + 31 others); Mon, 28 Jan 2019 13:06:10 -0500 Received: from mail-wr1-f68.google.com ([209.85.221.68]:45164 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727030AbfA1SEq (ORCPT ); Mon, 28 Jan 2019 13:04:46 -0500 Received: by mail-wr1-f68.google.com with SMTP id t6so19091554wrr.12 for ; Mon, 28 Jan 2019 10:04:45 -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=SyqJ1ZNijojoTR5cd+qdscOqYrp/PnKLGRUwKnFmRlM=; b=Zsbih5A0XT1436LqD455eX3TwHSJgdMOs5dTyer3kSmE68pxW9N/15q6Wve7hhuO58 4kNON7i+OYW7ZThzqCZtg8TaDJMY/Ytrp/CBCPR5GdEnv1gAsbPqnVVt7cHfFkXTST68 3WB5Ol7LCzQeZeLHAZ2dksmfHJu9u75BOxP4I60de9Db00O7aiJVJmQNzthFYco4EAZR cM/fkxyoDEKmaLBOHxRCtoCxOk1WCUgkHdfgMh26S0iMES+syQ8ZMfjACKGGJytfg0TV tzuEE0kAv/jjkY7HQHcn4pJzuRQmlpH2mmuKf1BGaFIu9dUp/Xqh8QYDgW+wfOwJfpCn HUPw== 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=SyqJ1ZNijojoTR5cd+qdscOqYrp/PnKLGRUwKnFmRlM=; b=Gski64gTDqOkXxFlN7hLEpFDpGeg5StomdYpe1zuUtSAiqXWLF6SVAhuduxiwptTcW wjOTe3NipwJhwMYAAHCCeN+KDTs+G2LqQOU/CW3Y4vLnWIEu/c5X4KNKVjbuwewygO7Y Jn2SkGFaylNrCbK+qXfL0Dsrm81zqv/HYleINF6kUJkQ1MeABvSrMMKiDa3KAwAWs3RS s2Qx8hJ1acwyn1Sg2YkpX2/aJM0UXbuVwzwauB22M8bT+qL0ZjYCLdd+FQks6mVu+vSw Ujm0qFiiL+rsB7fSAayAT5DtwXS5gju1RvW7trSUjx/sq2glELF4YcMkhNveNkgOXw+L XGpQ== X-Gm-Message-State: AJcUukcO9SPi8uQ68LzVJzMV+9smOkuymIVug7kLtDXof2mdCCaECZ1l LLMCaq+b3kuEqwFVQqPpESh4Vg== X-Received: by 2002:a5d:40c1:: with SMTP id b1mr23743080wrq.133.1548698684743; Mon, 28 Jan 2019 10:04:44 -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.43 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 28 Jan 2019 10:04:44 -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 02/14] clk: meson: use CONFIG_ARCH_MESON to enter meson clk directory Date: Mon, 28 Jan 2019 19:04:18 +0100 Message-Id: <20190128180430.28689-3-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 Use CONFIG_ARCH_MESON to let make enter the meson clock directory. As part of a rework, CONFIG_COMMON_CLK_AMLOGIC is about to be removed. Signed-off-by: Jerome Brunet --- drivers/clk/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.20.1 Acked-by: Stephen Boyd diff --git a/drivers/clk/Makefile b/drivers/clk/Makefile index 8a9440a97500..8d780c4390f1 100644 --- a/drivers/clk/Makefile +++ b/drivers/clk/Makefile @@ -78,7 +78,7 @@ obj-$(CONFIG_ARCH_K3) += keystone/ obj-$(CONFIG_ARCH_KEYSTONE) += keystone/ obj-$(CONFIG_MACH_LOONGSON32) += loongson1/ obj-y += mediatek/ -obj-$(CONFIG_COMMON_CLK_AMLOGIC) += meson/ +obj-$(CONFIG_ARCH_MESON) += meson/ obj-$(CONFIG_MACH_PIC32) += microchip/ ifeq ($(CONFIG_COMMON_CLK), y) obj-$(CONFIG_ARCH_MMP) += mmp/ From patchwork Mon Jan 28 18:04:19 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Brunet X-Patchwork-Id: 156829 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp3720748jaa; Mon, 28 Jan 2019 10:05:59 -0800 (PST) X-Google-Smtp-Source: ALg8bN6vLSVZ18kMeovJ9wpmqkmaUGmL7lBIwg5sqkLZ6GdSfgZ6tvFHeY6+FNoC1t3Dba7wd9ru X-Received: by 2002:a17:902:bd0a:: with SMTP id p10mr22013911pls.322.1548698759388; Mon, 28 Jan 2019 10:05:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548698759; cv=none; d=google.com; s=arc-20160816; b=Qkbj48QLt7IIPn2DD55i4AhGf7MHRxAXIO8Klj00pl1eEO2PlOz7NnAbz2sJSrSYqY UccJenJK+ZTiF0a5Xo6qTeDM5h9m3IOH3HlfCO0EC9Ku2YZnneGcS2LvTq8t6XkRAfA6 a89zgaO/SAyNpWO2av86vk1LbuwgDSayD9lOjVZ2E9Q5p/rPHmV84Ue/d4HPPPPTpJVM jbIVg8ZpsIVM78Vr+XBoL12G9pOlUUO2rL15ZSGhRAa8yjxwYbwr8Oa+4Ph6GxNYiRxU kotXm10zZaIOx9yNSTaWheYVr9j7LMh9ww1mjtU1LULifwrJEAIaZ6xWA92KGWsyqnwL r7hQ== 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=jxiL0ybfHeOFIjwNJisaDSjhHM5fwBbvxrHh17glkpo=; b=J/DPFWeLiIlYZu8HKWK7U7pgYhqA2hzqXaPqicMHM8d7DZ88dDO9ZMiNK8ew21cY3c ka2YRBiCmzu42TUjsf/5mKDF7TpImedFw5CwPcaYixDInClpGg6gTUZDzwVoqsDNjWke Ct8CTayX+V3P0DjHe1rfUuydKfcdLliRNFdT2LRy5N4UycP24w0IOWZDtmWDHFTQgqHZ T1NVF5B1LqD2oDRk8mQCFJVwl/O+PAO3/SWFh0cPcTiJ8DaVT3LWujdXuJDyVmlZ2+q4 i6Y43AMaTtPW9LEhZDTIiYEaXLoP1BUMgn7nf5mexyRw9+YoI7Oqnv8FpY/LafLfhn2x z7UA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=zokui+Tl; 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 b89si31851947pfj.207.2019.01.28.10.05.59; Mon, 28 Jan 2019 10:05:59 -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=zokui+Tl; 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 S1727113AbfA1SEu (ORCPT + 31 others); Mon, 28 Jan 2019 13:04:50 -0500 Received: from mail-wm1-f68.google.com ([209.85.128.68]:39556 "EHLO mail-wm1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727057AbfA1SEs (ORCPT ); Mon, 28 Jan 2019 13:04:48 -0500 Received: by mail-wm1-f68.google.com with SMTP id y8so14901809wmi.4 for ; Mon, 28 Jan 2019 10:04:47 -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=jxiL0ybfHeOFIjwNJisaDSjhHM5fwBbvxrHh17glkpo=; b=zokui+Tl7nAaqnJAKhYpH4JjWiX/OfsRcgUjR3xJeQw8lYVobavil06hUxjJuBEnDm KAMD2RXczMKyM39dSfM7U2ehwwYomCWvGyxJE5YyuCZlZ+N8bHDtdcrkmLfYf8lJLl3N MY7ybdbq1BqImrwNPAASlT4e+D/rbtd9GyRn/4bAxtwJHKWGIFb9PIlMXIshamcCScru kC2lVQHd4vLOlvsOAGwB+5tz1CBNaok5ayecQgQ2OMCPy3RsxoJJq0fMMO6HmJM8ihR1 XnpuXvMEmxLuGLZ5ibkKP8Sol4+JckazGsGbWTLxFo8Ao9lS/RJeNfOtRLehQ1+SNXrw /ElA== 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=jxiL0ybfHeOFIjwNJisaDSjhHM5fwBbvxrHh17glkpo=; b=nqZ6ArP+zPwk/3Zj4OfFd+b2QhWSjXv2oVYZL0DY2fFR/ITWucuTwcfHy5bYsyFqrc JsT3/KInb3Ir+82suoCHs3SdGgp9B8iYMTcQcnsVuMW4QEb3qIX7rs+0bHwQ33qdj8MF AfcgjqqN6PK+VWl4kDGw4TkiqOZKBfP0oeBeeqV2z8hK1dGVm9EAcTEvX1YyminmTG9a A5HfjvRyv5lQSZWz+xcZ/+MvU1jg12JeOxQDKoomRVZY+I5wHw41yng2T4c36HxTPIFR 8kQsRTHwMpOTQPW/vZ2Jw3xHjaBr2tNzunuuivWsi4oq6kEh0ymUnus6pVPbu2t9JiJJ Gw0w== X-Gm-Message-State: AJcUukfqXtc3mQG2nIn3ljTUYDw3v1AEE+JZFqpxc8k5rV5c5/pVYuV7 4MJfb9+6m+4nYsBjp9DxUMd1Ow== X-Received: by 2002:a1c:488b:: with SMTP id v133mr8620594wma.31.1548698686336; Mon, 28 Jan 2019 10:04:46 -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.44 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 28 Jan 2019 10:04:45 -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 03/14] clk: meson: axg-audio does not require syscon Date: Mon, 28 Jan 2019 19:04:19 +0100 Message-Id: <20190128180430.28689-4-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 The axg audio clock controller uses regmap mmio, not syscon. Fixes: 1cd50181750f ("clk: meson: axg: add the audio clock controller driver") Signed-off-by: Jerome Brunet --- drivers/clk/meson/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.20.1 diff --git a/drivers/clk/meson/Kconfig b/drivers/clk/meson/Kconfig index efaa70f682b4..2479dab09d70 100644 --- a/drivers/clk/meson/Kconfig +++ b/drivers/clk/meson/Kconfig @@ -50,7 +50,7 @@ config COMMON_CLK_AXG_AUDIO tristate "Meson AXG Audio Clock Controller Driver" depends on COMMON_CLK_AXG select COMMON_CLK_AMLOGIC_AUDIO - select MFD_SYSCON + select REGMAP_MMIO help Support for the audio clock controller on AmLogic A113D devices, aka axg, Say Y if you want audio subsystem to work. 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; From patchwork Mon Jan 28 18:04:21 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Brunet X-Patchwork-Id: 156827 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp3720569jaa; Mon, 28 Jan 2019 10:05:49 -0800 (PST) X-Google-Smtp-Source: ALg8bN432IxauLt80Szpo9ws4nzpAY+Qkpqp/BNMqF+2B1Me5ONO1GyV1PTZI7+rt1CEhUZqx0Ew X-Received: by 2002:a17:902:f20d:: with SMTP id gn13mr21847129plb.11.1548698749617; Mon, 28 Jan 2019 10:05:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548698749; cv=none; d=google.com; s=arc-20160816; b=SNYs5qRFDYM5K09pJ1g43tqmMiKW5wmfc6sFjPKJ6SvIQ4+gdbF3vyX+FgXHs6qZn0 d7aCVSpkiFbqwu/qbiBcIl1Gjl/awCLjCuUjbHA83BYL/5U0LfLh8wCWmtvofGqaIqCT 2bGRvOt4moYq3XeuXBp0pr7NaZISmroyCJHD2eZtfjAu+Gfn19UufvVISIYjraj6TMm1 tNgqY6yYedYb5ScTJGQP1NTrULW2J0LPWwuDkC/HSGIp2KRB+5VvMT9IIQi9ApUDQ/Cb rc1ARHY97IcNQr0SS2iDMrItYLxkL1JO6WqITkHBgQpPOiTDbUpY1nMPtZ216Cl7hl15 4PbA== 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=tFsiSEWNipF5j/nl4GiByTeXt6gTIo/QNa1h8WqspDA=; b=UZ/QvmZbz5vsLNKQvOQUSBbF6TPM3pqdFib9eJMS/JqJvnkny2eH5QDLy2Sq1PQJiT wjf5YagoCTGswGiTyEmr6CcPH5A+1rlvH+RvmBKQcOLQ8yFEwu+6HTnzu8GzDPc09UC8 VGHrdng5hp8IqZTXo9M11CbD6e/u5ic5EKoStSA8ddBZf8hzXqDNv+k8swwUeJAsplga 9R0/tbXAka9RpTCRkHYg646HUQGloF/alM7mG+eQiAwQ3YIuDGeLAIt+DtfYLQh9mEqG KkkdQEkx2pL1/5miH5z8PI8JnoFoE+dBnoQQJhyQWZmKmqaTqmr3QaqwcDy0Zq+1b3GU 34dw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=s9fk6aav; 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 193si17520857pfa.256.2019.01.28.10.05.49; Mon, 28 Jan 2019 10:05:49 -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=s9fk6aav; 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 S1727201AbfA1SE6 (ORCPT + 31 others); Mon, 28 Jan 2019 13:04:58 -0500 Received: from mail-wr1-f65.google.com ([209.85.221.65]:43532 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727110AbfA1SEv (ORCPT ); Mon, 28 Jan 2019 13:04:51 -0500 Received: by mail-wr1-f65.google.com with SMTP id r10so19098266wrs.10 for ; Mon, 28 Jan 2019 10:04:50 -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=tFsiSEWNipF5j/nl4GiByTeXt6gTIo/QNa1h8WqspDA=; b=s9fk6aav/smNqwREMwe6B+H4p5UdpW7nkEjbAL+Fcun3b3/M+kxgDzUZDHB3ffeOrx SFY8xMWPuBg5lUGBFx2dw3beHsXwoLCQiEGgHMFCiTluBkwSDbD9qn0oSb4B05vWuvXH jerhvW/yMoT7ft++LPY2mGXSfES2aqAYXgxqD7zoZK3P+/ChKfDFXwdm1uEG/dE9Trgp 3nclpK6SIjyYBqOCwJNiRPtPrbaVe1lnGN9a5YZHm9kxBkGKa0zZTUpPBCrdGTsbMxx0 xW7MlWlrFCM7kRZxRiwfvRWNiznZSEGDAjU7hWP52YunjJPKBx3kDY51aXIjP4JGKkt9 eAmA== 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=tFsiSEWNipF5j/nl4GiByTeXt6gTIo/QNa1h8WqspDA=; b=e2pteOSe6V7MQQT0PJ7xbhaIZO73wG7EGMn7XmbZDDx3lSltXBxgSIlPke9vm2DbQX xaWiJBMaalQqtt3forSYAhnPDt3aK8ygR1I37pjNbE+RdbUkn3VXfXBE2zxkRI5lbliX IwA8Fc//ONNqivyg81MV6LvOqmsIwGXnj4/u7o7uG1d9/Pz8ub5bhnyftDBCbcRvPTrn QHeRon9na/VUdcrvjviC14Y1IF+jP+Li5nU4HIf/L5s6plbru+cWwlcGO1IAneTjV0hc 4bJ2SRvCdghehd69E6c2W5Ib5Ni/Nsut8KjgDyz/hM0j4OlOPu9EHEOHIIqAyij9XYp6 AmPg== X-Gm-Message-State: AJcUukc2Yfk52FPbWL+3GkoQri5KbBlDr7m/9UKP68NEh75huthim4V/ s1te5naRhWHKtn4EUNyuYwXkdA== X-Received: by 2002:a5d:6647:: with SMTP id f7mr22600942wrw.225.1548698689917; Mon, 28 Jan 2019 10:04:49 -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.48 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 28 Jan 2019 10:04:49 -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 05/14] clk: meson: move parm out of clkc Date: Mon, 28 Jan 2019 19:04:21 +0100 Message-Id: <20190128180430.28689-6-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/clkc.h | 34 +---------------------------- drivers/clk/meson/parm.h | 46 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+), 33 deletions(-) create mode 100644 drivers/clk/meson/parm.h -- 2.20.1 diff --git a/drivers/clk/meson/clkc.h b/drivers/clk/meson/clkc.h index 35768c2327ba..58a343fa94e6 100644 --- a/drivers/clk/meson/clkc.h +++ b/drivers/clk/meson/clkc.h @@ -9,39 +9,7 @@ #include #include "clk-regmap.h" - -#define PMASK(width) GENMASK(width - 1, 0) -#define SETPMASK(width, shift) GENMASK(shift + width - 1, shift) -#define CLRPMASK(width, shift) (~SETPMASK(width, shift)) - -#define PARM_GET(width, shift, reg) \ - (((reg) & SETPMASK(width, shift)) >> (shift)) -#define PARM_SET(width, shift, reg, val) \ - (((reg) & CLRPMASK(width, shift)) | ((val) << (shift))) - -#define MESON_PARM_APPLICABLE(p) (!!((p)->width)) - -struct parm { - u16 reg_off; - u8 shift; - u8 width; -}; - -static inline unsigned int meson_parm_read(struct regmap *map, struct parm *p) -{ - unsigned int val; - - regmap_read(map, p->reg_off, &val); - return PARM_GET(p->width, p->shift, val); -} - -static inline void meson_parm_write(struct regmap *map, struct parm *p, - unsigned int val) -{ - regmap_update_bits(map, p->reg_off, SETPMASK(p->width, p->shift), - val << p->shift); -} - +#include "parm.h" struct pll_params_table { u16 m; diff --git a/drivers/clk/meson/parm.h b/drivers/clk/meson/parm.h new file mode 100644 index 000000000000..3c9ef1b505ce --- /dev/null +++ b/drivers/clk/meson/parm.h @@ -0,0 +1,46 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Copyright (c) 2015 Endless Mobile, Inc. + * Author: Carlo Caione + */ + +#ifndef __MESON_PARM_H +#define __MESON_PARM_H + +#include +#include + +#define PMASK(width) GENMASK(width - 1, 0) +#define SETPMASK(width, shift) GENMASK(shift + width - 1, shift) +#define CLRPMASK(width, shift) (~SETPMASK(width, shift)) + +#define PARM_GET(width, shift, reg) \ + (((reg) & SETPMASK(width, shift)) >> (shift)) +#define PARM_SET(width, shift, reg, val) \ + (((reg) & CLRPMASK(width, shift)) | ((val) << (shift))) + +#define MESON_PARM_APPLICABLE(p) (!!((p)->width)) + +struct parm { + u16 reg_off; + u8 shift; + u8 width; +}; + +static inline unsigned int meson_parm_read(struct regmap *map, struct parm *p) +{ + unsigned int val; + + regmap_read(map, p->reg_off, &val); + return PARM_GET(p->width, p->shift, val); +} + +static inline void meson_parm_write(struct regmap *map, struct parm *p, + unsigned int val) +{ + regmap_update_bits(map, p->reg_off, SETPMASK(p->width, p->shift), + val << p->shift); +} + +#endif /* __MESON_PARM_H */ + From patchwork Mon Jan 28 18:04:22 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Brunet X-Patchwork-Id: 156830 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp3720822jaa; Mon, 28 Jan 2019 10:06:03 -0800 (PST) X-Google-Smtp-Source: ALg8bN4Y+iGzRwfhXQ9EApZ45maSymlfq+WFY9OOr4db9/+8eGnQ/isCvfOOx2R+EeNOabhyKD7I X-Received: by 2002:a63:a553:: with SMTP id r19mr20572704pgu.53.1548698763293; Mon, 28 Jan 2019 10:06:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548698763; cv=none; d=google.com; s=arc-20160816; b=H40ifuUK0SUu6sIJm8PlPha2/z3bREMqlXJkb5Wx5FeyDH976fOx1vITsfr8wmRez/ 0K8hoK5TLxtz20xBLJbU377NmXnncVswK4vptNUzk8qpSW7hdpXTc/gsol9Stxoi6CcP 6Shf+UTpwtnJbmaw/OWBAe7JR7DfnLe4eJCmBDIIL0i4AJ47R4rOPngaYfqrG9OxQ5Pn Z26OWKYTS82yV14RR+rUEzZZPdQkILxWm7Dq1xNR4hdzdwL+SwaZ3Cw5ONBwzpzwitqr KR91ovxQRCUuUGVdDnGyK07f31dPNw2CI5tnJKDN4MhNBQbILXd9szyc39NCa4H5ssEQ d4ig== 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=QOU9VANN01oYzixQ2SqSDGpNeAWTMaXr29IPiC4ltR8=; b=Hj/+fq2ftw2N8Oh075UnDYdlhZthRAnRK/Y/eGQ6z/7Kt9MBSslKaEO6D6SZFM7+bu e6KG66qj/149yBj6tGSIIIE9F8GGXuNX7O+gIropvDubVtqqIMS8hoCsZCqllbASBKwM PbTCVYMoW8RxySbnkhlqkJGiKbODc4/wb6jXv9sYfXifjV1+lFYd9pTwq6DSLji2vUNh 0x6Fd9UrNUTn1WJvA9nV0SFDDwzpM3nw4ESFD8WPSN49iFNbJSImB2tt/uzdimOsn6xH 8ScV2vaB6o2XDsW9ljLBxSK/tOTo2L07R+pX+S6E+/1GXCx+utAhVp48izuDXEqNf1ox cUhg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=UNS3dypv; 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 r14si30696917pfh.229.2019.01.28.10.06.02; Mon, 28 Jan 2019 10:06:03 -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=UNS3dypv; 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 S1727598AbfA1SGA (ORCPT + 31 others); Mon, 28 Jan 2019 13:06:00 -0500 Received: from mail-wm1-f68.google.com ([209.85.128.68]:52309 "EHLO mail-wm1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727139AbfA1SEy (ORCPT ); Mon, 28 Jan 2019 13:04:54 -0500 Received: by mail-wm1-f68.google.com with SMTP id m1so15022699wml.2 for ; Mon, 28 Jan 2019 10:04:52 -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=QOU9VANN01oYzixQ2SqSDGpNeAWTMaXr29IPiC4ltR8=; b=UNS3dypviQhzKGAyIux4UBVegpH8d7NnTH48r9ub3dKe9mRrUo+mRzH4sNRPwL6uK4 6DSUHtr+GsMJymI6ZORqhsVF9P1vbBgdqSCge4pF+ucLmwH2YPlv5/z4TtVPXc5mDeGa iz1m6RQaZblm5tpS0L6syaeQ9TwMpNVNQUyWPVKdHv5LHfp33X3Y8z8AA4OcMZHID5Vl zDiJK2qKneL+X/wsE6ecETzast5Su5MvCi9kuBxgvQaSTlznO9TvcLpNT4cExn9iMa85 9+nHj3JEHn9U31H3kkjbc+FEFbyhIS7Q0nuNf/eaZMIUA8ajQLF3NbJjOmbxbk2/t5KH ZxAg== 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=QOU9VANN01oYzixQ2SqSDGpNeAWTMaXr29IPiC4ltR8=; b=Qo7OHVADQBq9WgZGkLIS2Td8inBFb0DQOSaXgK6B0wl5kAX1KBmuQwqCA3PwyEt4np adcvqiBhPC6Be/G5tHv1qjM839t966kp88jh18IvfM0/1LVHnt7FBT2NBbo2Hd+bdBMw UqeZBzwyjPyu80nwdwQtdN1Kc1xWDx6N7Dh5S9QjbTIRYTrgtH7Gj+61uMX7soBGIB9B OqY67MRmPHMWNKOeLMpYnXgguvnMYvwwAq7zoVHBGXBM1Cy7YWn74tjnofjs6bCn1o3W saqLYJbSkhwaZ9frrD+805AbL0hgRW9PnRhfPe3fBYTxnUL6CNDsyQq4nlNKX85owCzt xOMg== X-Gm-Message-State: AJcUukfYmuEsqlYw5QkjlaOyzlHVlYGNN/s3x2AdmesqrSL4Kq9mBgTt T9zntYeMuiIgnsV2MFADJfHhFw== X-Received: by 2002:a1c:ce0e:: with SMTP id e14mr18991607wmg.53.1548698691559; Mon, 28 Jan 2019 10:04:51 -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.50 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 28 Jan 2019 10:04:50 -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 06/14] clk: meson: take the pll driver out of clkc Date: Mon, 28 Jan 2019 19:04:22 +0100 Message-Id: <20190128180430.28689-7-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-pll.c | 13 +++++++---- drivers/clk/meson/clk-pll.h | 43 +++++++++++++++++++++++++++++++++++++ drivers/clk/meson/clkc.h | 30 -------------------------- drivers/clk/meson/gxbb.c | 1 + drivers/clk/meson/meson8b.c | 1 + 6 files changed, 55 insertions(+), 34 deletions(-) create mode 100644 drivers/clk/meson/clk-pll.h -- 2.20.1 diff --git a/drivers/clk/meson/axg.c b/drivers/clk/meson/axg.c index 474412234633..8a3896fa343f 100644 --- a/drivers/clk/meson/axg.c +++ b/drivers/clk/meson/axg.c @@ -19,6 +19,7 @@ #include "clkc.h" #include "clk-regmap.h" +#include "clk-pll.h" #include "axg.h" #define IN_PREFIX "ee-in-" diff --git a/drivers/clk/meson/clk-pll.c b/drivers/clk/meson/clk-pll.c index afffc1547e20..4a8c68ae8801 100644 --- a/drivers/clk/meson/clk-pll.c +++ b/drivers/clk/meson/clk-pll.c @@ -32,11 +32,9 @@ #include #include #include -#include -#include -#include -#include "clkc.h" +#include "clk-regmap.h" +#include "clk-pll.h" static inline struct meson_clk_pll_data * meson_clk_pll_data(struct clk_regmap *clk) @@ -309,8 +307,15 @@ const struct clk_ops meson_clk_pll_ops = { .enable = meson_clk_pll_enable, .disable = meson_clk_pll_disable }; +EXPORT_SYMBOL_GPL(meson_clk_pll_ops); const struct clk_ops meson_clk_pll_ro_ops = { .recalc_rate = meson_clk_pll_recalc_rate, .is_enabled = meson_clk_pll_is_enabled, }; +EXPORT_SYMBOL_GPL(meson_clk_pll_ro_ops); + +MODULE_DESCRIPTION("Amlogic PLL driver"); +MODULE_AUTHOR("Carlo Caione "); +MODULE_AUTHOR("Jerome Brunet "); +MODULE_LICENSE("GPL v2"); diff --git a/drivers/clk/meson/clk-pll.h b/drivers/clk/meson/clk-pll.h new file mode 100644 index 000000000000..5ccf0854d932 --- /dev/null +++ b/drivers/clk/meson/clk-pll.h @@ -0,0 +1,43 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Copyright (c) 2019 BayLibre, SAS. + * Author: Jerome Brunet + */ + +#ifndef __MESON_CLK_PLL_H +#define __MESON_CLK_PLL_H + +#include +#include +#include "parm.h" + +struct pll_params_table { + u16 m; + u16 n; +}; + +#define PLL_PARAMS(_m, _n) \ + { \ + .m = (_m), \ + .n = (_n), \ + } + +#define CLK_MESON_PLL_ROUND_CLOSEST BIT(0) + +struct meson_clk_pll_data { + struct parm en; + struct parm m; + struct parm n; + struct parm frac; + struct parm l; + struct parm rst; + const struct reg_sequence *init_regs; + unsigned int init_count; + const struct pll_params_table *table; + u8 flags; +}; + +extern const struct clk_ops meson_clk_pll_ro_ops; +extern const struct clk_ops meson_clk_pll_ops; + +#endif /* __MESON_CLK_PLL_H */ diff --git a/drivers/clk/meson/clkc.h b/drivers/clk/meson/clkc.h index 58a343fa94e6..4857c8fa1ac4 100644 --- a/drivers/clk/meson/clkc.h +++ b/drivers/clk/meson/clkc.h @@ -11,34 +11,6 @@ #include "clk-regmap.h" #include "parm.h" -struct pll_params_table { - u16 m; - u16 n; -}; - -#define PLL_PARAMS(_m, _n) \ - { \ - .m = (_m), \ - .n = (_n), \ - } - -#define CLK_MESON_PLL_ROUND_CLOSEST BIT(0) - -struct meson_clk_pll_data { - struct parm en; - struct parm m; - struct parm n; - struct parm frac; - struct parm l; - struct parm rst; - const struct reg_sequence *init_regs; - unsigned int init_count; - const struct pll_params_table *table; - u8 flags; -}; - -#define to_meson_clk_pll(_hw) container_of(_hw, struct meson_clk_pll, hw) - struct meson_clk_mpll_data { struct parm sdm; struct parm sdm_en; @@ -81,8 +53,6 @@ struct meson_clk_dualdiv_data { }; /* clk_ops */ -extern const struct clk_ops meson_clk_pll_ro_ops; -extern const struct clk_ops meson_clk_pll_ops; extern const struct clk_ops meson_clk_cpu_ops; extern const struct clk_ops meson_clk_mpll_ro_ops; extern const struct clk_ops meson_clk_mpll_ops; diff --git a/drivers/clk/meson/gxbb.c b/drivers/clk/meson/gxbb.c index ecf9a8f6281c..813822ec5f57 100644 --- a/drivers/clk/meson/gxbb.c +++ b/drivers/clk/meson/gxbb.c @@ -15,6 +15,7 @@ #include "clkc.h" #include "gxbb.h" #include "clk-regmap.h" +#include "clk-pll.h" #define IN_PREFIX "ee-in-" diff --git a/drivers/clk/meson/meson8b.c b/drivers/clk/meson/meson8b.c index 748552c5f6c8..9b35d5e08378 100644 --- a/drivers/clk/meson/meson8b.c +++ b/drivers/clk/meson/meson8b.c @@ -19,6 +19,7 @@ #include "clkc.h" #include "meson8b.h" #include "clk-regmap.h" +#include "clk-pll.h" static DEFINE_SPINLOCK(meson_clk_lock); From patchwork Mon Jan 28 18:04:23 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Brunet X-Patchwork-Id: 156817 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp3719674jaa; Mon, 28 Jan 2019 10:05:01 -0800 (PST) X-Google-Smtp-Source: ALg8bN7tV398UoS8WbYg0JV9O0o3YinFY/c31woN7SFYrVHUthaj/6uV9KKWJptMNrCdJNhBJh7r X-Received: by 2002:a65:6094:: with SMTP id t20mr20520916pgu.285.1548698701022; Mon, 28 Jan 2019 10:05:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548698701; cv=none; d=google.com; s=arc-20160816; b=gB0hPO35LPjcHx9XhKCVyeK2ES1fPDRG7uJnOnFl8cyaqPkFXdW9pMR+4H3kFWYuK4 M33WYLbZ2I7ZI705lPrUUdEIKlv3k+zsMHhX1Cm6N5v4ymG4xKr8eGVKixpQnJqZPaV+ sTWcTshVPohAppmNAcVkwd3ocXjn0nsJNSkp18cIf7eeP5y/K/AZkId0KT6kCkONnaE9 PHsDPqWDpAurTFma4ZEgC1sDKLTOfn3ZK6Qya6nV4UMFlSVmZ5GdS5cIdK/J8TG8ZT3Y ssWCnO7ARO54uvPSEN/NcNfAnezt5IyMOSS8b3Nvr1HYqYHvqg6ZrT5qFx32vsOWhIvp zcDw== 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=nbXfyjfqzqGpHsSm+wGVBTSI4vzKOQ2CLwSheFxJ0pY=; b=MIsHpigNSNlg2A4cJ9kCqUuj08JrCtbsTttA5wO0yiFKYs0DLqjIFgUPIp/yrEAW5N 1Nwnfml/ADJ3WWc10nxImFfPXeTi3nBkN+xI69NpsZSbTmzGdnYiE7QXHVue1K4jd4Gp Kvk7Jjllxr+iIgf5TjznBchTUaSDks8emLFIpJe1nEjEOAWBMj9YUH45TbHGRlNGt7Nn ZthHkJzeRzCjFAtczoDr1q2mUcmCP+qTUIhrpLTsVZZEL3QYDshBXMZf6i5OTfwDtxUM RP6YcezElvp3U8/qMviMiQ1seC7VbbDwaYvxRMRJp631nw6R1D1UQSW6+ekBjIw5BOZy MZGA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=bLJpQmG4; 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 m28si34638210pgn.273.2019.01.28.10.05.00; Mon, 28 Jan 2019 10:05:01 -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=bLJpQmG4; 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 S1727233AbfA1SE7 (ORCPT + 31 others); Mon, 28 Jan 2019 13:04:59 -0500 Received: from mail-wr1-f66.google.com ([209.85.221.66]:33002 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726971AbfA1SE4 (ORCPT ); Mon, 28 Jan 2019 13:04:56 -0500 Received: by mail-wr1-f66.google.com with SMTP id p7so19190403wru.0 for ; Mon, 28 Jan 2019 10:04:54 -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=nbXfyjfqzqGpHsSm+wGVBTSI4vzKOQ2CLwSheFxJ0pY=; b=bLJpQmG4xEa3nqZqf2uYPgGgvShCScNAnZJS/q4tIDJxY5DwMpFJZ6mdtcbmCk/HP1 3O/hdz5zfiulKkSzwA5TFEOFbS7E+gG4O4V0aVFaxQg/TUWTmnOlX+Gk8CHQN4dvuaRr SUbrk8P8HqMB2t2froBrbHPnoLt1VOso5vywumJuWHFv5OSv6pGEekrC2TMP0zm1O6P/ WPJTLq4oZmGIVhUNkKJt7UpP3pANfvFrUzdYdUc9qMG+gqsEvzdeQmmyqzLIZbgtkihu 4OZ7gqRALpFPdLOzxOIDtLt0efq3sYAqMUIjBg0lMHrIzz0iuXII0gHXWKJU+YuGPbBS 7jmw== 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=nbXfyjfqzqGpHsSm+wGVBTSI4vzKOQ2CLwSheFxJ0pY=; b=ILqS+gy4sQ7O+6uTtHAkZnB/VlgcCx+665eD1Es6IGXVIPseozKUXnYREUi/vacPQ3 6QO1mSqaivDwzha54ZqKb7s4CpVhmO2me/2XUAWfld34ul0z0heZE4YeetQJChy838CL NMQB0sPsF+miHrRiCvMmBMqesOrOhYES2CLXWNLJbtUZId7B5Zl2SSBO90VrTLZsXcA4 bS77j6SIPYcZcRaUTKJiCKnip8ddJAYSE3eK5Px9lB/M6Fb6DIm4n1m4VfX43t1QY+cz q9q2mf9Mo6mWwiemDB2MG0gBuj82VAD8l74KzBFsmbT0jAKdRJd8mBYKurZcUbI4k+G9 x+ZQ== X-Gm-Message-State: AHQUAubGmkgOBIvjkpgNk+Hst0d5nZ4kRsD9OohBNGxExcXsw5YVwJhK QmWOh6vkScYgmNC6tmzWSBjweA== X-Received: by 2002:adf:fd81:: with SMTP id d1mr15171607wrr.105.1548698693294; Mon, 28 Jan 2019 10:04:53 -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.51 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 28 Jan 2019 10:04:52 -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 07/14] clk: meson: take the mpll driver out of clkc Date: Mon, 28 Jan 2019 19:04:23 +0100 Message-Id: <20190128180430.28689-8-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-mpll.c | 12 +++++++++++- drivers/clk/meson/clk-mpll.h | 30 ++++++++++++++++++++++++++++++ drivers/clk/meson/clkc.h | 14 -------------- drivers/clk/meson/gxbb.c | 1 + drivers/clk/meson/meson8b.c | 1 + 6 files changed, 44 insertions(+), 15 deletions(-) create mode 100644 drivers/clk/meson/clk-mpll.h -- 2.20.1 diff --git a/drivers/clk/meson/axg.c b/drivers/clk/meson/axg.c index 8a3896fa343f..dc973b4324f3 100644 --- a/drivers/clk/meson/axg.c +++ b/drivers/clk/meson/axg.c @@ -20,6 +20,7 @@ #include "clkc.h" #include "clk-regmap.h" #include "clk-pll.h" +#include "clk-mpll.h" #include "axg.h" #define IN_PREFIX "ee-in-" diff --git a/drivers/clk/meson/clk-mpll.c b/drivers/clk/meson/clk-mpll.c index 650f75cc15a9..f76850d99e59 100644 --- a/drivers/clk/meson/clk-mpll.c +++ b/drivers/clk/meson/clk-mpll.c @@ -12,7 +12,11 @@ */ #include -#include "clkc.h" +#include +#include + +#include "clk-regmap.h" +#include "clk-mpll.h" #define SDM_DEN 16384 #define N2_MIN 4 @@ -138,9 +142,15 @@ const struct clk_ops meson_clk_mpll_ro_ops = { .recalc_rate = mpll_recalc_rate, .round_rate = mpll_round_rate, }; +EXPORT_SYMBOL_GPL(meson_clk_mpll_ro_ops); const struct clk_ops meson_clk_mpll_ops = { .recalc_rate = mpll_recalc_rate, .round_rate = mpll_round_rate, .set_rate = mpll_set_rate, }; +EXPORT_SYMBOL_GPL(meson_clk_mpll_ops); + +MODULE_DESCRIPTION("Amlogic MPLL driver"); +MODULE_AUTHOR("Michael Turquette "); +MODULE_LICENSE("GPL v2"); diff --git a/drivers/clk/meson/clk-mpll.h b/drivers/clk/meson/clk-mpll.h new file mode 100644 index 000000000000..cf79340006dd --- /dev/null +++ b/drivers/clk/meson/clk-mpll.h @@ -0,0 +1,30 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Copyright (c) 2019 BayLibre, SAS. + * Author: Jerome Brunet + */ + +#ifndef __MESON_CLK_MPLL_H +#define __MESON_CLK_MPLL_H + +#include +#include + +#include "parm.h" + +struct meson_clk_mpll_data { + struct parm sdm; + struct parm sdm_en; + struct parm n2; + struct parm ssen; + struct parm misc; + spinlock_t *lock; + u8 flags; +}; + +#define CLK_MESON_MPLL_ROUND_CLOSEST BIT(0) + +extern const struct clk_ops meson_clk_mpll_ro_ops; +extern const struct clk_ops meson_clk_mpll_ops; + +#endif /* __MESON_CLK_MPLL_H */ diff --git a/drivers/clk/meson/clkc.h b/drivers/clk/meson/clkc.h index 4857c8fa1ac4..32947bd76bab 100644 --- a/drivers/clk/meson/clkc.h +++ b/drivers/clk/meson/clkc.h @@ -11,18 +11,6 @@ #include "clk-regmap.h" #include "parm.h" -struct meson_clk_mpll_data { - struct parm sdm; - struct parm sdm_en; - struct parm n2; - struct parm ssen; - struct parm misc; - spinlock_t *lock; - u8 flags; -}; - -#define CLK_MESON_MPLL_ROUND_CLOSEST BIT(0) - struct meson_clk_phase_data { struct parm ph; }; @@ -54,8 +42,6 @@ struct meson_clk_dualdiv_data { /* clk_ops */ extern const struct clk_ops meson_clk_cpu_ops; -extern const struct clk_ops meson_clk_mpll_ro_ops; -extern const struct clk_ops meson_clk_mpll_ops; extern const struct clk_ops meson_clk_phase_ops; extern const struct clk_ops meson_vid_pll_div_ro_ops; extern const struct clk_ops meson_clk_dualdiv_ops; diff --git a/drivers/clk/meson/gxbb.c b/drivers/clk/meson/gxbb.c index 813822ec5f57..6a8358f3e0ef 100644 --- a/drivers/clk/meson/gxbb.c +++ b/drivers/clk/meson/gxbb.c @@ -16,6 +16,7 @@ #include "gxbb.h" #include "clk-regmap.h" #include "clk-pll.h" +#include "clk-mpll.h" #define IN_PREFIX "ee-in-" diff --git a/drivers/clk/meson/meson8b.c b/drivers/clk/meson/meson8b.c index 9b35d5e08378..91a5306b13f6 100644 --- a/drivers/clk/meson/meson8b.c +++ b/drivers/clk/meson/meson8b.c @@ -20,6 +20,7 @@ #include "meson8b.h" #include "clk-regmap.h" #include "clk-pll.h" +#include "clk-mpll.h" static DEFINE_SPINLOCK(meson_clk_lock); From patchwork Mon Jan 28 18:04:24 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Brunet X-Patchwork-Id: 156818 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp3719738jaa; Mon, 28 Jan 2019 10:05:03 -0800 (PST) X-Google-Smtp-Source: ALg8bN7Yvlh2TwkbHuRzmpKiC7CJ2XLwc86750tzGwkkU5nYHPFp4/DQSotr5TTpSxSzR9jtq3xT X-Received: by 2002:a63:4246:: with SMTP id p67mr20533015pga.335.1548698703849; Mon, 28 Jan 2019 10:05:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548698703; cv=none; d=google.com; s=arc-20160816; b=Yqt8qIVKbc7fm2SxZX1KbQO7cKfg/w8MpbiW7S7UggUcCQM35Zz/cx8Uhfx7cu+XH9 xzKEriQUTJ6DzINS84S/TpM+8QCqgMFhGBwhWQBwDDN8RUpBDk8d3hTeEJ6oaKUySqHk jAuT8vXRC262RklrEdh8PVKmNnEzxmWOY+bMn+xH3JHA5s7WTn0R614qi+oxak/5L1K7 owar/Yei3ViI64vVsi7VZjIWedg4GkjBacnYDl4NE+B84Idkxu1JfX6b1A5u4ea9WTiu S9EGdcLweoqqwrt6kCxtKOlhovKiDojFXxYgoss7Mwv8QQ8Gr43xSo1mdRk1e5dTcar2 Ck2Q== 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=JUR8W8hKsfFkxJFYM1wEeTrBndL0qQzv53iIlKiqwe0=; b=cWGFHGllHnwk8+l/tAowLTHrBAzYxy/j+Jzq9qhanTjnRzQgfZuQ21+h+CxFDxv7D+ zjYo9eUHZkOMpt8P/Ez55lQ97hlhIEhFOoQOGgV4BCaa6q7I637GAS/1q6QwwOTW0WXr RUuGCxs0W9/m5e29RlZf9DQn/6u4CbL52RULr3WW6PYVC0f13SC5jHDwVtDdjbC5QCpR 38Nd1ql9iKv79WD9STk/u1+ToN1Hz06cE19nfPQzxoc53LvKFQcL8vvv/wbzQ9bOb6lM gu115x7E7qDc0KrkdNEKKr/iiNOTvARTiiRskqWuRM6ZlsxeMJyyE737xzFqaZNjht0/ 9C8w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=VQQPTmVe; 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 12si1790332pfx.102.2019.01.28.10.05.03; Mon, 28 Jan 2019 10:05:03 -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=VQQPTmVe; 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 S1727275AbfA1SFB (ORCPT + 31 others); Mon, 28 Jan 2019 13:05:01 -0500 Received: from mail-wr1-f65.google.com ([209.85.221.65]:35465 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727172AbfA1SE6 (ORCPT ); Mon, 28 Jan 2019 13:04:58 -0500 Received: by mail-wr1-f65.google.com with SMTP id 96so19171449wrb.2 for ; Mon, 28 Jan 2019 10:04:56 -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=JUR8W8hKsfFkxJFYM1wEeTrBndL0qQzv53iIlKiqwe0=; b=VQQPTmVe5xTKWPiEPhHSpasmWoYJyMDUs+89vqVX4AjmltGYVkZJTL8gTSPkWAPZhS SJlOjoSk9PFeYXgJEJNd4+QnzUUaVOE/U9gy4okz2styboVxC7L+TZtbD2k/KeRab+ti dRHq9LLTXjdFYyfcLZVpPufVGNRELuh4F61pafspgoxUv9lUYQvCJSDrEvEUOhPhCEWS 713fCqs6RF54TKqvkQrjC8pUS/6K26hnvEkFa6wdBubMNIbFagGJiEAUXpWHXOyemY37 U9vIfwSGNwUwrnrBOruUFKIKgJz7bK55VpnvU2P6bAHlKY9ZHMtZqpvRvMyTs9D1acAZ 8Pcg== 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=JUR8W8hKsfFkxJFYM1wEeTrBndL0qQzv53iIlKiqwe0=; b=DjkQ9qf/xx30WUjeQSDnEUt/Bq/hOJuXJ82CzkRp6cQrC54ajOnimqRHRrlWoKViMK YqpDzjE7Apq9pgiiX+TVwwhvXtvqe29w7X9UmbLOaXo1R11DXi+bcH+shMZLGimi1wzf 0EXCXKWEjNCA1flJLyGSevvQ36XayOy69vzldy7AzJAy4Rb5VOpVLw/2fi+wxeVL85gs B8v6/yU66r0trkw89+aB+DDzMmLLnP83/EInMuJ0iYCM93OhnhNHbKJETR16TvawbKbo ZO2Kp7gt6CSf1g679yXHa48DTya2bX/wtEf0tnQaPkQnRwzjWxqCexI2248cPb0yyGKe 9/bA== X-Gm-Message-State: AJcUukeLRJuKKPqDrN0OcWx8dNeQyqPC2py57qvuBdbdBzcuS3gwj7D0 2a8uDc3XDddpCrO2Zs4GAy/9SA== X-Received: by 2002:adf:ff09:: with SMTP id k9mr21749520wrr.97.1548698695264; Mon, 28 Jan 2019 10:04:55 -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.53 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 28 Jan 2019 10:04:54 -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 08/14] clk: meson: merge phase driver and remove from clkc Date: Mon, 28 Jan 2019 19:04:24 +0100 Message-Id: <20190128180430.28689-9-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/Makefile | 2 +- drivers/clk/meson/axg-audio.c | 2 + drivers/clk/meson/clk-phase.c | 75 +++++++++++++++++++++++++++++--- drivers/clk/meson/clk-phase.h | 26 +++++++++++ drivers/clk/meson/clk-triphase.c | 68 ----------------------------- drivers/clk/meson/clkc-audio.h | 7 --- drivers/clk/meson/clkc.h | 8 ---- 7 files changed, 99 insertions(+), 89 deletions(-) create mode 100644 drivers/clk/meson/clk-phase.h delete mode 100644 drivers/clk/meson/clk-triphase.c -- 2.20.1 diff --git a/drivers/clk/meson/Makefile b/drivers/clk/meson/Makefile index 8234e92eea38..2b9490dd9878 100644 --- a/drivers/clk/meson/Makefile +++ b/drivers/clk/meson/Makefile @@ -4,7 +4,7 @@ obj-$(CONFIG_COMMON_CLK_AMLOGIC) += clk-pll.o clk-mpll.o clk-phase.o vid-pll-div.o obj-$(CONFIG_COMMON_CLK_AMLOGIC) += clk-input.o clk-dualdiv.o -obj-$(CONFIG_COMMON_CLK_AMLOGIC_AUDIO) += clk-triphase.o sclk-div.o +obj-$(CONFIG_COMMON_CLK_AMLOGIC_AUDIO) += sclk-div.o obj-$(CONFIG_COMMON_CLK_MESON_AO) += meson-aoclk.o obj-$(CONFIG_COMMON_CLK_MESON8B) += meson8b.o obj-$(CONFIG_COMMON_CLK_GXBB) += gxbb.o gxbb-aoclk.o diff --git a/drivers/clk/meson/axg-audio.c b/drivers/clk/meson/axg-audio.c index 8ac3a2295473..45d2abc3351f 100644 --- a/drivers/clk/meson/axg-audio.c +++ b/drivers/clk/meson/axg-audio.c @@ -16,6 +16,8 @@ #include "clkc-audio.h" #include "axg-audio.h" +#include "clk-regmap.h" +#include "clk-phase.h" #define AXG_MST_IN_COUNT 8 #define AXG_SLV_SCLK_COUNT 10 diff --git a/drivers/clk/meson/clk-phase.c b/drivers/clk/meson/clk-phase.c index cba43748ce3d..80c3ada193a4 100644 --- a/drivers/clk/meson/clk-phase.c +++ b/drivers/clk/meson/clk-phase.c @@ -5,7 +5,10 @@ */ #include -#include "clkc.h" +#include + +#include "clk-regmap.h" +#include "clk-phase.h" #define phase_step(_width) (360 / (1 << (_width))) @@ -15,13 +18,12 @@ meson_clk_phase_data(struct clk_regmap *clk) return (struct meson_clk_phase_data *)clk->data; } -int meson_clk_degrees_from_val(unsigned int val, unsigned int width) +static int meson_clk_degrees_from_val(unsigned int val, unsigned int width) { return phase_step(width) * val; } -EXPORT_SYMBOL_GPL(meson_clk_degrees_from_val); -unsigned int meson_clk_degrees_to_val(int degrees, unsigned int width) +static unsigned int meson_clk_degrees_to_val(int degrees, unsigned int width) { unsigned int val = DIV_ROUND_CLOSEST(degrees, phase_step(width)); @@ -31,7 +33,6 @@ unsigned int meson_clk_degrees_to_val(int degrees, unsigned int width) */ return val % (1 << width); } -EXPORT_SYMBOL_GPL(meson_clk_degrees_to_val); static int meson_clk_phase_get_phase(struct clk_hw *hw) { @@ -61,3 +62,67 @@ const struct clk_ops meson_clk_phase_ops = { .set_phase = meson_clk_phase_set_phase, }; EXPORT_SYMBOL_GPL(meson_clk_phase_ops); + +/* + * This is a special clock for the audio controller. + * The phase of mst_sclk clock output can be controlled independently + * for the outside world (ph0), the tdmout (ph1) and tdmin (ph2). + * Controlling these 3 phases as just one makes things simpler and + * give the same clock view to all the element on the i2s bus. + * If necessary, we can still control the phase in the tdm block + * which makes these independent control redundant. + */ +static inline struct meson_clk_triphase_data * +meson_clk_triphase_data(struct clk_regmap *clk) +{ + return (struct meson_clk_triphase_data *)clk->data; +} + +static void meson_clk_triphase_sync(struct clk_hw *hw) +{ + struct clk_regmap *clk = to_clk_regmap(hw); + struct meson_clk_triphase_data *tph = meson_clk_triphase_data(clk); + unsigned int val; + + /* Get phase 0 and sync it to phase 1 and 2 */ + val = meson_parm_read(clk->map, &tph->ph0); + meson_parm_write(clk->map, &tph->ph1, val); + meson_parm_write(clk->map, &tph->ph2, val); +} + +static int meson_clk_triphase_get_phase(struct clk_hw *hw) +{ + struct clk_regmap *clk = to_clk_regmap(hw); + struct meson_clk_triphase_data *tph = meson_clk_triphase_data(clk); + unsigned int val; + + /* Phase are in sync, reading phase 0 is enough */ + val = meson_parm_read(clk->map, &tph->ph0); + + return meson_clk_degrees_from_val(val, tph->ph0.width); +} + +static int meson_clk_triphase_set_phase(struct clk_hw *hw, int degrees) +{ + struct clk_regmap *clk = to_clk_regmap(hw); + struct meson_clk_triphase_data *tph = meson_clk_triphase_data(clk); + unsigned int val; + + val = meson_clk_degrees_to_val(degrees, tph->ph0.width); + meson_parm_write(clk->map, &tph->ph0, val); + meson_parm_write(clk->map, &tph->ph1, val); + meson_parm_write(clk->map, &tph->ph2, val); + + return 0; +} + +const struct clk_ops meson_clk_triphase_ops = { + .init = meson_clk_triphase_sync, + .get_phase = meson_clk_triphase_get_phase, + .set_phase = meson_clk_triphase_set_phase, +}; +EXPORT_SYMBOL_GPL(meson_clk_triphase_ops); + +MODULE_DESCRIPTION("Amlogic phase driver"); +MODULE_AUTHOR("Jerome Brunet "); +MODULE_LICENSE("GPL v2"); diff --git a/drivers/clk/meson/clk-phase.h b/drivers/clk/meson/clk-phase.h new file mode 100644 index 000000000000..5579f9ced142 --- /dev/null +++ b/drivers/clk/meson/clk-phase.h @@ -0,0 +1,26 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Copyright (c) 2019 BayLibre, SAS. + * Author: Jerome Brunet + */ + +#ifndef __MESON_CLK_PHASE_H +#define __MESON_CLK_PHASE_H + +#include +#include "parm.h" + +struct meson_clk_phase_data { + struct parm ph; +}; + +struct meson_clk_triphase_data { + struct parm ph0; + struct parm ph1; + struct parm ph2; +}; + +extern const struct clk_ops meson_clk_phase_ops; +extern const struct clk_ops meson_clk_triphase_ops; + +#endif /* __MESON_CLK_PHASE_H */ diff --git a/drivers/clk/meson/clk-triphase.c b/drivers/clk/meson/clk-triphase.c deleted file mode 100644 index 4a59936251e5..000000000000 --- a/drivers/clk/meson/clk-triphase.c +++ /dev/null @@ -1,68 +0,0 @@ -// SPDX-License-Identifier: (GPL-2.0 OR MIT) -/* - * Copyright (c) 2018 BayLibre, SAS. - * Author: Jerome Brunet - */ - -#include -#include "clkc-audio.h" - -/* - * This is a special clock for the audio controller. - * The phase of mst_sclk clock output can be controlled independently - * for the outside world (ph0), the tdmout (ph1) and tdmin (ph2). - * Controlling these 3 phases as just one makes things simpler and - * give the same clock view to all the element on the i2s bus. - * If necessary, we can still control the phase in the tdm block - * which makes these independent control redundant. - */ -static inline struct meson_clk_triphase_data * -meson_clk_triphase_data(struct clk_regmap *clk) -{ - return (struct meson_clk_triphase_data *)clk->data; -} - -static void meson_clk_triphase_sync(struct clk_hw *hw) -{ - struct clk_regmap *clk = to_clk_regmap(hw); - struct meson_clk_triphase_data *tph = meson_clk_triphase_data(clk); - unsigned int val; - - /* Get phase 0 and sync it to phase 1 and 2 */ - val = meson_parm_read(clk->map, &tph->ph0); - meson_parm_write(clk->map, &tph->ph1, val); - meson_parm_write(clk->map, &tph->ph2, val); -} - -static int meson_clk_triphase_get_phase(struct clk_hw *hw) -{ - struct clk_regmap *clk = to_clk_regmap(hw); - struct meson_clk_triphase_data *tph = meson_clk_triphase_data(clk); - unsigned int val; - - /* Phase are in sync, reading phase 0 is enough */ - val = meson_parm_read(clk->map, &tph->ph0); - - return meson_clk_degrees_from_val(val, tph->ph0.width); -} - -static int meson_clk_triphase_set_phase(struct clk_hw *hw, int degrees) -{ - struct clk_regmap *clk = to_clk_regmap(hw); - struct meson_clk_triphase_data *tph = meson_clk_triphase_data(clk); - unsigned int val; - - val = meson_clk_degrees_to_val(degrees, tph->ph0.width); - meson_parm_write(clk->map, &tph->ph0, val); - meson_parm_write(clk->map, &tph->ph1, val); - meson_parm_write(clk->map, &tph->ph2, val); - - return 0; -} - -const struct clk_ops meson_clk_triphase_ops = { - .init = meson_clk_triphase_sync, - .get_phase = meson_clk_triphase_get_phase, - .set_phase = meson_clk_triphase_set_phase, -}; -EXPORT_SYMBOL_GPL(meson_clk_triphase_ops); diff --git a/drivers/clk/meson/clkc-audio.h b/drivers/clk/meson/clkc-audio.h index 0a7c157ebf81..8e1de2a72610 100644 --- a/drivers/clk/meson/clkc-audio.h +++ b/drivers/clk/meson/clkc-audio.h @@ -9,12 +9,6 @@ #include "clkc.h" -struct meson_clk_triphase_data { - struct parm ph0; - struct parm ph1; - struct parm ph2; -}; - struct meson_sclk_div_data { struct parm div; struct parm hi; @@ -22,7 +16,6 @@ struct meson_sclk_div_data { struct clk_duty cached_duty; }; -extern const struct clk_ops meson_clk_triphase_ops; extern const struct clk_ops meson_sclk_div_ops; #endif /* __MESON_CLKC_AUDIO_H */ diff --git a/drivers/clk/meson/clkc.h b/drivers/clk/meson/clkc.h index 32947bd76bab..e8e4067bfcd5 100644 --- a/drivers/clk/meson/clkc.h +++ b/drivers/clk/meson/clkc.h @@ -11,13 +11,6 @@ #include "clk-regmap.h" #include "parm.h" -struct meson_clk_phase_data { - struct parm ph; -}; - -int meson_clk_degrees_from_val(unsigned int val, unsigned int width); -unsigned int meson_clk_degrees_to_val(int degrees, unsigned int width); - struct meson_vid_pll_div_data { struct parm val; struct parm sel; @@ -42,7 +35,6 @@ struct meson_clk_dualdiv_data { /* clk_ops */ extern const struct clk_ops meson_clk_cpu_ops; -extern const struct clk_ops meson_clk_phase_ops; extern const struct clk_ops meson_vid_pll_div_ro_ops; extern const struct clk_ops meson_clk_dualdiv_ops; extern const struct clk_ops meson_clk_dualdiv_ro_ops; From patchwork Mon Jan 28 18:04:25 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Brunet X-Patchwork-Id: 156826 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp3720469jaa; Mon, 28 Jan 2019 10:05:43 -0800 (PST) X-Google-Smtp-Source: ALg8bN5wyCvxlEvD55S/g0Dh++WF8284aYFWCytaz01vfEhThSJnT8rMYHmoapi9lZC44no+TowR X-Received: by 2002:a65:4ccb:: with SMTP id n11mr21016245pgt.257.1548698743402; Mon, 28 Jan 2019 10:05:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548698743; cv=none; d=google.com; s=arc-20160816; b=rvJzIOV7UMWKob1zgp2VpJ3OLhA+DywvR80jlWk4i4I4jF1D/MU2ka80exY4skSoVZ W7PciQ+7J2G2tqNtZN/dMBtzuidYknkkLxM6fVx+v5+FC7OGGXIXLXKGnkexv4+4MJr9 NvpMJtbpta/I+MYNTIiUu9/yBBw8vRRBIubxR/SCngPLI77uvTyMW1R14M11WqLKx5Xo D0wDCKi7AWmwitA2IVYHrXKCHgRaFnGSdWkikeNd6i5W7yfUXefFRcCKl+UML+2zBTMF MkkCpJfvtM/zrbVK40iu/lohi5bPUmxoIrVrH/1Bkq28Lw8s99JEE9jXsYOtUnC6Kgen CPzg== 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=Ik8ppvqBDIku5U1/4NdGEUHXc0XKiuzjPuvabcpfASs=; b=v6KEOCA+0lWxzmRGLrjy+ZhZMc+3SUA0HCzQnvTMJx6pqEa9wLB264xuHTAT+PPucU 49+zc/f9EYNB40rX0Oh5wax+KovOclWhx2uphjc6mn/nJ7Hq0fx51Oyo+OUj60IE1UXC 01FfoZNOh63mpgIGd4HMoSh+FsU5iY7HvGBrAwpzd6Q4FIz7FgNyK2wbnk7h+tC67r+B hcGu4Wxy+G28tPEi+6dukbOKP2BtA7nYkwh3jyy6mcoAQif0Ewf8LiMQ8RK3iiXt4FBl KW8Nz+8sE42chyi5cR9F7ffRADt3VRcMWpv3MFuMYDEFRmGlporI1JlCTTJeQgnUU7Rm SiJA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=TSESYOlV; 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 s11si33800373pgi.324.2019.01.28.10.05.43; Mon, 28 Jan 2019 10:05:43 -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=TSESYOlV; 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 S1727515AbfA1SFm (ORCPT + 31 others); Mon, 28 Jan 2019 13:05:42 -0500 Received: from mail-wr1-f65.google.com ([209.85.221.65]:40922 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727192AbfA1SE6 (ORCPT ); Mon, 28 Jan 2019 13:04:58 -0500 Received: by mail-wr1-f65.google.com with SMTP id p4so19138920wrt.7 for ; Mon, 28 Jan 2019 10:04:57 -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=Ik8ppvqBDIku5U1/4NdGEUHXc0XKiuzjPuvabcpfASs=; b=TSESYOlVltS3TW6AL91xMggjsnr5KhNJCYPFdj017FXAfGforpMTOAXph1J92EPzki xs4ntVNrdVJcFsl7hjkLu8Yeo6w9hz8hCvgociDbGwJVozJ55hQ+FMftywCPEQRJvc4t vcErwcJbk7O7czHIBtGPj+xweLgLFcbRb8CtHGIVLsH+a8mhM9RxCZnyTxIfcUXklOLw T3XX+MNfmrjf3DseHtw+Vz/We92XN7Wq9xD9/351X1AxlMVflMVo1y5nxI5GFllEq8jq +HSSA83soF/P1I3CofQQb0HeXiTVFIFgOfDNlaHgwdqs4FY6FEoxjkC893m0teZaHqAz /74g== 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=Ik8ppvqBDIku5U1/4NdGEUHXc0XKiuzjPuvabcpfASs=; b=PcIUv9Ou73deILM3NcqZbRu1taYN800eIHITFR2PtPJzmF9d5Wnm2FwmsODxVKu8D1 6WlciDvO5D+aL36LbahJqXFSZKEc5DP9MbT9PD2i4Ya4kVH8ZTj5VXgRrbSSl6oSnr2s v//EZhC5qLB0CtdFnKYtofV23xg9u1y8DraFCkxdOItSEWoKAkuyys+2iE0MBsxLtve6 apQLzTE3A04WAzv4pzsAWVxTkEC0rylt9J9SP57jT/QRIKafsIJ+xmFF9jSYm71kqXrx L4SOWWEr9WeE4R61SI6D7oPVwIiPkPCXP6NeMP6zfBw2jTxN+DClJzTBOf2xYbfLzBR8 kZAw== X-Gm-Message-State: AJcUukdfvD6Jg1GAMa4dZ1wGi18U4a6jBfxIhDkzX1n2AEwOArSKS8jb QDN95aQQp06mUwpO/x30z1aObQ== X-Received: by 2002:a5d:6152:: with SMTP id y18mr23913249wrt.141.1548698696939; Mon, 28 Jan 2019 10:04:56 -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.55 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 28 Jan 2019 10:04:56 -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 09/14] clk: meson: take vid-pll-div out of clkc Date: Mon, 28 Jan 2019 19:04:25 +0100 Message-Id: <20190128180430.28689-10-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/clkc.h | 6 ------ drivers/clk/meson/gxbb.c | 1 + drivers/clk/meson/vid-pll-div.c | 10 +++++++++- drivers/clk/meson/vid-pll-div.h | 20 ++++++++++++++++++++ 4 files changed, 30 insertions(+), 7 deletions(-) create mode 100644 drivers/clk/meson/vid-pll-div.h -- 2.20.1 diff --git a/drivers/clk/meson/clkc.h b/drivers/clk/meson/clkc.h index e8e4067bfcd5..ece8ed82b11c 100644 --- a/drivers/clk/meson/clkc.h +++ b/drivers/clk/meson/clkc.h @@ -11,11 +11,6 @@ #include "clk-regmap.h" #include "parm.h" -struct meson_vid_pll_div_data { - struct parm val; - struct parm sel; -}; - struct meson_clk_dualdiv_param { unsigned int n1; unsigned int n2; @@ -35,7 +30,6 @@ struct meson_clk_dualdiv_data { /* clk_ops */ extern const struct clk_ops meson_clk_cpu_ops; -extern const struct clk_ops meson_vid_pll_div_ro_ops; extern const struct clk_ops meson_clk_dualdiv_ops; extern const struct clk_ops meson_clk_dualdiv_ro_ops; diff --git a/drivers/clk/meson/gxbb.c b/drivers/clk/meson/gxbb.c index 6a8358f3e0ef..f7b919b035ee 100644 --- a/drivers/clk/meson/gxbb.c +++ b/drivers/clk/meson/gxbb.c @@ -17,6 +17,7 @@ #include "clk-regmap.h" #include "clk-pll.h" #include "clk-mpll.h" +#include "vid-pll-div.h" #define IN_PREFIX "ee-in-" diff --git a/drivers/clk/meson/vid-pll-div.c b/drivers/clk/meson/vid-pll-div.c index 88af0e282ea0..08bcc01c0923 100644 --- a/drivers/clk/meson/vid-pll-div.c +++ b/drivers/clk/meson/vid-pll-div.c @@ -5,7 +5,10 @@ */ #include -#include "clkc.h" +#include + +#include "clk-regmap.h" +#include "vid-pll-div.h" static inline struct meson_vid_pll_div_data * meson_vid_pll_div_data(struct clk_regmap *clk) @@ -89,3 +92,8 @@ static unsigned long meson_vid_pll_div_recalc_rate(struct clk_hw *hw, const struct clk_ops meson_vid_pll_div_ro_ops = { .recalc_rate = meson_vid_pll_div_recalc_rate, }; +EXPORT_SYMBOL_GPL(meson_vid_pll_div_ro_ops); + +MODULE_DESCRIPTION("Amlogic video pll divider driver"); +MODULE_AUTHOR("Neil Armstrong "); +MODULE_LICENSE("GPL v2"); diff --git a/drivers/clk/meson/vid-pll-div.h b/drivers/clk/meson/vid-pll-div.h new file mode 100644 index 000000000000..c0128e33ccf9 --- /dev/null +++ b/drivers/clk/meson/vid-pll-div.h @@ -0,0 +1,20 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Copyright (c) 2019 BayLibre, SAS. + * Author: Jerome Brunet + */ + +#ifndef __MESON_VID_PLL_DIV_H +#define __MESON_VID_PLL_DIV_H + +#include +#include "parm.h" + +struct meson_vid_pll_div_data { + struct parm val; + struct parm sel; +}; + +extern const struct clk_ops meson_vid_pll_div_ro_ops; + +#endif /* __MESON_VID_PLL_DIV_H */ 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 */ From patchwork Mon Jan 28 18:04:27 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Brunet X-Patchwork-Id: 156823 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp3720210jaa; Mon, 28 Jan 2019 10:05:29 -0800 (PST) X-Google-Smtp-Source: ALg8bN6Vx4EkROIxJrLcnKWmE3r989ntM3KnTL2LQPqqt1PsL7HHeot/ogkZcfEQ04kpTeixhXqS X-Received: by 2002:a62:190e:: with SMTP id 14mr22704691pfz.70.1548698729076; Mon, 28 Jan 2019 10:05:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548698729; cv=none; d=google.com; s=arc-20160816; b=vsYByuykRLh9djoTi2JbOzA3sGZQLd92LT7Jxt2UbygAHPcaItcSXhZ9cKMYUC4k4J S/l8tmNrnHf8sYtMZfBDM6TfwoWQRB3GBxDnniCfC47/xOtA0A8CIuwaVisJnJO7H6JR xbBZ5chGXMnTzj/nhjzP3ygGRp3fVqGA/L09p1b0fi/0oAvVuSmWf1n0scaYjPhBCqQ0 76vwQYwltK0iuT0LGWC8LQWFRdbQYJbnKew7OmasiEFRYrkFPmTF4id2qoGbl5cwx08P QNS4xCELTzeMj2vrK0YFcku61zx1E2TomZIAG+rNrzKC8ddK0BTtJaIu0PXQ8tCWlKuD pHWA== 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=VkwufZcrwl7jyrctvpIoTg1IoA+jLQzVJTmSzvfdyN8=; b=RCUkwAxvkDOSmHgNDZWulPlojxnwjpJ0N8d0dekmD0Sn/Q51CfSfKaaYJM2TYD9Har UDzenB7WggYa1zUCA6n1lAIqXe9nA+lKe61B1UXb57N1qgCkW/zJbvX2gOK0Oy8f2Wha PbU5vZKQeRnJ/SJZO6zveyGy1nMnk5MDA22RXxv+3wlBPjFpN56fXUds7zTepV3VcGyZ /gkwwu7ebQvzf/Hh3OM7LA/S+LDEAW9ehL78ctakTB6VyczTAtATZ/whh0pK/XAAc63f Ms/axWLWvNkqJLu3zsBEHMnnK+ggz+ZU+vVsKYxdk/2wpYiCjqTdKPu75tKY0WheJZHk lWpg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=zp4ze6kl; 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 t6si2294569pgn.258.2019.01.28.10.05.28; Mon, 28 Jan 2019 10:05:29 -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=zp4ze6kl; 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 S1727349AbfA1SFG (ORCPT + 31 others); Mon, 28 Jan 2019 13:05:06 -0500 Received: from mail-wm1-f68.google.com ([209.85.128.68]:40284 "EHLO mail-wm1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727266AbfA1SFC (ORCPT ); Mon, 28 Jan 2019 13:05:02 -0500 Received: by mail-wm1-f68.google.com with SMTP id f188so14883131wmf.5 for ; Mon, 28 Jan 2019 10:05:01 -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=VkwufZcrwl7jyrctvpIoTg1IoA+jLQzVJTmSzvfdyN8=; b=zp4ze6kl5ABKQwbD1marsQTaJoFsgttuzAuCcJVnUbvLscGGu+539rgBHigh/t80Fh xWAQ917EaMz6pfs46W3LCESY+bRi7RTyAohps6UPcrSKzTMshY9sEGrV4sWBYpdI2bU0 K49SVIkry2gJw3zPYUOV5UzjCx+FQGLNWYLBZEsaG7+0SSdEWIJWDjReM9YguGIdX3/z BlQdUbj7mui99Gzr7Y9sl97jEkRB1G5KeE6IxMjmY99lXMtLTe51B6hgtDtTbknOrBq+ bZ05o7ijBsGwcCwPFjKsjzXXKrjYuTiyjHDhwPOB1nTb6thLVmpTCSTIGGRZS2PSGgpA +Imw== 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=VkwufZcrwl7jyrctvpIoTg1IoA+jLQzVJTmSzvfdyN8=; b=iShjEA7ziif7SNmDviIUzNtpj5E/2FiSxAVmhfLSYutwNabatcXTgc4+VtDWP8wM7N ESoYGpDOrKQQYLLXGVOYQwq5tqZjUwCceDuxSRfQRWA10CVMsgGPgVNGE0m7uM4Qopvp 9HdWMCJRW1AC5q4a8mZqWvdxpVNN5PCrxYZsrQozlBJoT/SZtj3x1b5PX8dcA8HZ6TlQ mEWcOXK5lvHCJ8fih37iuTOd8LE3yDdbO3GLyAcwNprscG3AmWtEkIVnlYrzVCdEz9Xs 9e2to+SoNxVpOpEv5qIgdhrsIETqqmVBx5RDnwUuwm8CNDz+/w7b/lyGOO6YShDrXNWh fScg== X-Gm-Message-State: AJcUukfRUVjlLKoI8/aIY34RTUQer8fle13REXTgXUzl6Jrp/iapSOWC yWYAMfFQqNraOH9amnklF0yopw== X-Received: by 2002:a1c:8484:: with SMTP id g126mr18853205wmd.117.1548698700348; Mon, 28 Jan 2019 10:05:00 -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.58 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 28 Jan 2019 10:04:59 -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 11/14] clk: meson: take clk-input out of clkc Date: Mon, 28 Jan 2019 19:04:27 +0100 Message-Id: <20190128180430.28689-12-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-audio.c | 1 + drivers/clk/meson/axg.c | 1 + drivers/clk/meson/clk-input.c | 7 ++++++- drivers/clk/meson/clk-input.h | 19 +++++++++++++++++++ drivers/clk/meson/clkc.h | 5 ----- drivers/clk/meson/gxbb.c | 1 + drivers/clk/meson/meson-aoclk.c | 2 ++ 7 files changed, 30 insertions(+), 6 deletions(-) create mode 100644 drivers/clk/meson/clk-input.h -- 2.20.1 diff --git a/drivers/clk/meson/axg-audio.c b/drivers/clk/meson/axg-audio.c index 45d2abc3351f..8db0508ec6ab 100644 --- a/drivers/clk/meson/axg-audio.c +++ b/drivers/clk/meson/axg-audio.c @@ -16,6 +16,7 @@ #include "clkc-audio.h" #include "axg-audio.h" +#include "clk-input.h" #include "clk-regmap.h" #include "clk-phase.h" diff --git a/drivers/clk/meson/axg.c b/drivers/clk/meson/axg.c index dc973b4324f3..12de206b82c2 100644 --- a/drivers/clk/meson/axg.c +++ b/drivers/clk/meson/axg.c @@ -18,6 +18,7 @@ #include #include "clkc.h" +#include "clk-input.h" #include "clk-regmap.h" #include "clk-pll.h" #include "clk-mpll.h" diff --git a/drivers/clk/meson/clk-input.c b/drivers/clk/meson/clk-input.c index 06b3e3bb6a66..086226e9dba6 100644 --- a/drivers/clk/meson/clk-input.c +++ b/drivers/clk/meson/clk-input.c @@ -7,7 +7,8 @@ #include #include #include -#include "clkc.h" +#include +#include "clk-input.h" static const struct clk_ops meson_clk_no_ops = {}; @@ -42,3 +43,7 @@ struct clk_hw *meson_clk_hw_register_input(struct device *dev, return ret ? ERR_PTR(ret) : hw; } EXPORT_SYMBOL_GPL(meson_clk_hw_register_input); + +MODULE_DESCRIPTION("Amlogic clock input helper"); +MODULE_AUTHOR("Jerome Brunet "); +MODULE_LICENSE("GPL v2"); diff --git a/drivers/clk/meson/clk-input.h b/drivers/clk/meson/clk-input.h new file mode 100644 index 000000000000..4a541b9685a6 --- /dev/null +++ b/drivers/clk/meson/clk-input.h @@ -0,0 +1,19 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Copyright (c) 2019 BayLibre, SAS. + * Author: Jerome Brunet + */ + +#ifndef __MESON_CLK_INPUT_H +#define __MESON_CLK_INPUT_H + +#include + +struct device; + +struct clk_hw *meson_clk_hw_register_input(struct device *dev, + const char *of_name, + const char *clk_name, + unsigned long flags); + +#endif /* __MESON_CLK_INPUT_H */ diff --git a/drivers/clk/meson/clkc.h b/drivers/clk/meson/clkc.h index 24918cc5fa58..3b167803a602 100644 --- a/drivers/clk/meson/clkc.h +++ b/drivers/clk/meson/clkc.h @@ -14,9 +14,4 @@ /* clk_ops */ extern const struct clk_ops meson_clk_cpu_ops; -struct clk_hw *meson_clk_hw_register_input(struct device *dev, - const char *of_name, - const char *clk_name, - unsigned long flags); - #endif /* __CLKC_H */ diff --git a/drivers/clk/meson/gxbb.c b/drivers/clk/meson/gxbb.c index f7b919b035ee..393472b5309b 100644 --- a/drivers/clk/meson/gxbb.c +++ b/drivers/clk/meson/gxbb.c @@ -14,6 +14,7 @@ #include "clkc.h" #include "gxbb.h" +#include "clk-input.h" #include "clk-regmap.h" #include "clk-pll.h" #include "clk-mpll.h" diff --git a/drivers/clk/meson/meson-aoclk.c b/drivers/clk/meson/meson-aoclk.c index 7b9d194ccc3b..b67951909e04 100644 --- a/drivers/clk/meson/meson-aoclk.c +++ b/drivers/clk/meson/meson-aoclk.c @@ -17,6 +17,8 @@ #include #include "meson-aoclk.h" +#include "clk-input.h" + static int meson_aoclk_do_reset(struct reset_controller_dev *rcdev, unsigned long id) { From patchwork Mon Jan 28 18:04:28 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Brunet X-Patchwork-Id: 156824 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp3720313jaa; Mon, 28 Jan 2019 10:05:34 -0800 (PST) X-Google-Smtp-Source: ALg8bN5foHBosDG1iJVkDdSzA6M4MHMlvhIWoNE9acAy0+VyFc8cj9gqDK8WdmI0LnPZO9OuwKhM X-Received: by 2002:a63:d547:: with SMTP id v7mr20378847pgi.339.1548698734333; Mon, 28 Jan 2019 10:05:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548698734; cv=none; d=google.com; s=arc-20160816; b=yd/a4+VYD8L8TTEeDijRUYMqMHhImXa3R4YLABxH+7LaAzMREoXqjTQsjzrvFj488V es6gnTgJ5jz9JLhUz2nWLTj0jW5oseCsBpfaX2+91pRJPHTlJ/WN98Ys4SPNDy726fZW Q4T8zrZGVew4aa/BPI5tST9wZhkrgIDvdRx1/yA6sEsoN8pLMkiSXd/RKLBwc10jVoVA KnJnh9zXEleZzd1OzHxhGkTujtej+TYnQsOVVKnAyT0WjZ8Fm5jaK4jGNYaZljwzdq02 h8CHkYro4LP75QyHWNPKbhnB5G5Y4AjAUvi8CDJJsen7LmcQX7cRo0HhkByJJDvl3OFP Ljtg== 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=loRq/ugG9YRm+V78WFAyEPfRVOulSUxZ0A2IJ042/eU=; b=1Kw52zaVJdyP/27rNkoYBonKxPWNmuOKdFYoN7wuNRGUv3QOq+aD/nm3JKuyAL2o/U CqWFRejCQDrRY0VO9IMXfYMmNdOwp2Wxjocoz/haJjLvB3ut3j/OsnSyZ85yf9uxVQay pVcRAkgB06X5apF08HDnA28BwsI0ilwigmCJi9fXo9uwz1O9XtHp/rEKmoeOw+Yos3ar YfVipcSrhbAPyEU0EROg/uomTU5N5d+zrDHvUhg+Mzdi8SCAtXgmbq2eyg/0IiPVhGyd dhTo9Mc+SiYzXODADQDM+xx53RyXh3Ul9OTUWFrdWpB9eUnPwQn1J0ZmWL8ghgrzo+bT XZEQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=FYN4Vmd1; 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 s11si33800373pgi.324.2019.01.28.10.05.33; Mon, 28 Jan 2019 10:05:34 -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=FYN4Vmd1; 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 S1727502AbfA1SFc (ORCPT + 31 others); Mon, 28 Jan 2019 13:05:32 -0500 Received: from mail-wm1-f66.google.com ([209.85.128.66]:35443 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727172AbfA1SFE (ORCPT ); Mon, 28 Jan 2019 13:05:04 -0500 Received: by mail-wm1-f66.google.com with SMTP id t200so15053003wmt.0 for ; Mon, 28 Jan 2019 10:05:02 -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=loRq/ugG9YRm+V78WFAyEPfRVOulSUxZ0A2IJ042/eU=; b=FYN4Vmd1J1SLV0C2c+jYXqaQutGnDX7QOmp0ydJ2RTWdb8OzNgQKEeEN8nb3K4bppC bVgMhgGcrcsSX2NEFcSCMSg4cFwr5tmzfl33bN51K5+Z8XPrTmor7cQIXGOJMMoC2YGC YX03OMa3wH8nPSferwwrLd+TYYrzO+U7uT+Pjcr+PiWGH9s9OvGfPXfUX1mkPeDY/cas nGyPC7QI0Wo8LbfpZeuD78VUjAlf9K3JuaBt2cpLiz04eVGGF/2uK80rwGT+04pBlh6E 9qVjxrpU24DLFb2s7fEenIi1YBRdN9Ff8vLsuztd+LQ6l0MLbdAtI1WK37m7CEA8V39u jfwA== 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=loRq/ugG9YRm+V78WFAyEPfRVOulSUxZ0A2IJ042/eU=; b=DGzeVAELWUskUaiR4onl0WNANyxKlrvFuK4AQL4i96swnMm9qPXW7ZQ88CpsXNTZIz 0lMATYITya+U+Yn2Spdj4TU+eQxP/HiYn+PsWNaqYK5O0T6wT1r5vDfz/7i1dgRDEkNk /9dxPmkGrj9+4IhNAxh3/NazjjmkWh31Q/zPx43Fb49ll7jRvQJIKrvBmeJDROQDzwH/ oJ+Tp5RJRH3dhPcfLw50gtuTR5AJubFuek2Z2RxWoKwDNsky8DXDCZY5bi+PsfJ0o0Zq 1GerXzv0EyvTmpQxPvACVEKR+PkU89b+txl70nWdJP9i5gwjm9SNIAUDCpdhjaThGwUV A82w== X-Gm-Message-State: AJcUukeRhjJFbxa0JEUPPuZMnPtGCih/rqpXfzBb5kmA5CVvmnOV5XkA NNElUxEu8Kpnz3JJ4xkoqSIreA== X-Received: by 2002:a1c:2382:: with SMTP id j124mr17936184wmj.14.1548698702239; Mon, 28 Jan 2019 10:05:02 -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.05.00 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 28 Jan 2019 10:05:01 -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 12/14] clk: meson: clkc must die Date: Mon, 28 Jan 2019 19:04:28 +0100 Message-Id: <20190128180430.28689-13-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 | 1 - drivers/clk/meson/axg.c | 1 - drivers/clk/meson/clkc-audio.h | 3 ++- drivers/clk/meson/clkc.h | 17 ----------------- drivers/clk/meson/gxbb-aoclk.c | 1 - drivers/clk/meson/gxbb.c | 1 - drivers/clk/meson/meson-aoclk.h | 5 ++++- drivers/clk/meson/meson8b.c | 1 - drivers/clk/meson/sclk-div.c | 1 + 9 files changed, 7 insertions(+), 24 deletions(-) delete mode 100644 drivers/clk/meson/clkc.h -- 2.20.1 diff --git a/drivers/clk/meson/axg-aoclk.c b/drivers/clk/meson/axg-aoclk.c index 6b408edb1608..0086f31288eb 100644 --- a/drivers/clk/meson/axg-aoclk.c +++ b/drivers/clk/meson/axg-aoclk.c @@ -12,7 +12,6 @@ #include #include #include -#include "clkc.h" #include "meson-aoclk.h" #include "axg-aoclk.h" diff --git a/drivers/clk/meson/axg.c b/drivers/clk/meson/axg.c index 12de206b82c2..cbbdd93b175d 100644 --- a/drivers/clk/meson/axg.c +++ b/drivers/clk/meson/axg.c @@ -17,7 +17,6 @@ #include #include -#include "clkc.h" #include "clk-input.h" #include "clk-regmap.h" #include "clk-pll.h" diff --git a/drivers/clk/meson/clkc-audio.h b/drivers/clk/meson/clkc-audio.h index 8e1de2a72610..1eaf4ecac4f7 100644 --- a/drivers/clk/meson/clkc-audio.h +++ b/drivers/clk/meson/clkc-audio.h @@ -7,7 +7,8 @@ #ifndef __MESON_CLKC_AUDIO_H #define __MESON_CLKC_AUDIO_H -#include "clkc.h" +#include +#include "parm.h" struct meson_sclk_div_data { struct parm div; diff --git a/drivers/clk/meson/clkc.h b/drivers/clk/meson/clkc.h deleted file mode 100644 index 3b167803a602..000000000000 --- a/drivers/clk/meson/clkc.h +++ /dev/null @@ -1,17 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 */ -/* - * Copyright (c) 2015 Endless Mobile, Inc. - * Author: Carlo Caione - */ - -#ifndef __CLKC_H -#define __CLKC_H - -#include -#include "clk-regmap.h" -#include "parm.h" - -/* clk_ops */ -extern const struct clk_ops meson_clk_cpu_ops; - -#endif /* __CLKC_H */ diff --git a/drivers/clk/meson/gxbb-aoclk.c b/drivers/clk/meson/gxbb-aoclk.c index 26578622fc91..449f6ac189d8 100644 --- a/drivers/clk/meson/gxbb-aoclk.c +++ b/drivers/clk/meson/gxbb-aoclk.c @@ -5,7 +5,6 @@ */ #include #include -#include "clkc.h" #include "meson-aoclk.h" #include "gxbb-aoclk.h" diff --git a/drivers/clk/meson/gxbb.c b/drivers/clk/meson/gxbb.c index 393472b5309b..3741db9a9fe1 100644 --- a/drivers/clk/meson/gxbb.c +++ b/drivers/clk/meson/gxbb.c @@ -12,7 +12,6 @@ #include #include -#include "clkc.h" #include "gxbb.h" #include "clk-input.h" #include "clk-regmap.h" diff --git a/drivers/clk/meson/meson-aoclk.h b/drivers/clk/meson/meson-aoclk.h index 0758b35d4427..999cde3868f7 100644 --- a/drivers/clk/meson/meson-aoclk.h +++ b/drivers/clk/meson/meson-aoclk.h @@ -11,9 +11,12 @@ #ifndef __MESON_AOCLK_H__ #define __MESON_AOCLK_H__ +#include #include +#include #include -#include "clkc.h" + +#include "clk-regmap.h" struct meson_aoclk_input { const char *name; diff --git a/drivers/clk/meson/meson8b.c b/drivers/clk/meson/meson8b.c index 91a5306b13f6..23b1e355a849 100644 --- a/drivers/clk/meson/meson8b.c +++ b/drivers/clk/meson/meson8b.c @@ -16,7 +16,6 @@ #include #include -#include "clkc.h" #include "meson8b.h" #include "clk-regmap.h" #include "clk-pll.h" diff --git a/drivers/clk/meson/sclk-div.c b/drivers/clk/meson/sclk-div.c index bc64019b8eeb..d3eea53945e9 100644 --- a/drivers/clk/meson/sclk-div.c +++ b/drivers/clk/meson/sclk-div.c @@ -17,6 +17,7 @@ */ #include "clkc-audio.h" +#include "clk-regmap.h" static inline struct meson_sclk_div_data * meson_sclk_div_data(struct clk_regmap *clk) From patchwork Mon Jan 28 18:04:29 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Brunet X-Patchwork-Id: 156821 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp3719981jaa; Mon, 28 Jan 2019 10:05:16 -0800 (PST) X-Google-Smtp-Source: ALg8bN4XZlZmSTbQSkG1QU+1UUHkZmMlTQWJAQQ+i0pNCorBxsM9oqQjtFNrubiIBffLlzCdosIa X-Received: by 2002:a62:4156:: with SMTP id o83mr22775933pfa.72.1548698716603; Mon, 28 Jan 2019 10:05:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548698716; cv=none; d=google.com; s=arc-20160816; b=oheCwcf9p12B53RSH9g/lsR52kH5noBH/Cx5/sqLcKio+ojfs4AVdev6T7qjXbpp6C KImWL+1ZjEnf8atju7XBmqDVYa6TUjQJjL8/Mspxjf3PsQrsFnYWq0cgiAVqHR6qSWKn aK7wobuIA2Lj23v/mHCufbBVenkWVvlpe5aWspWK5gVSSQ8h44MUEwBI1SB1OrNToShW W2OMoDFSQsXb5bDeIENbTjXoQDIi77QhQ+ctjOdyvHNIuE/63g5hWh+C1k+kAW4gJbJe 55XhhXukrnkhtMEpfB3NCvqE5ozM/BLTAigycSlut26ytmzbbqQgE4Ievi+4P9hMiKiG 0cxg== 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=4wf9FAXSPyYzzMogrRK8K8vMBiOAXKZiQZa3fRw2VeY=; b=fIU6+YJ0ontONGnU0B56/DmF8pCDnJV4U7D+jnNXSvhIpe9wOhg20CDXQ3NBYhTryN ShdpK30tpK6EzmjbRnNfh5jJaD05pqnvl+1z6AUv6PmdpHF/Lq3+OF5kXPnps0EL9Wwn cuH2r8Lg8X3lFh/YOeCOhzvMZxNA/TaLsKS3rHbC7EEWEzHb9SHlHDMGZxgBhnbL7qp/ 6SswaEhN0NnsqpbK54m9iHjxfcNKDMSojJp6BBVyfeUC6dQkf9wp+l6yrX/lAnJT5XQ9 wvIkFUKGmNknin/71CfRKuwExyEdGeHhL9X81X9KL6WUwQmCIPNfEVUVIgrmLMuizYln 6oiA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=pAVKDPg0; 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 n1si33226380pfh.96.2019.01.28.10.05.16; Mon, 28 Jan 2019 10:05:16 -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=pAVKDPg0; 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 S1727454AbfA1SFO (ORCPT + 31 others); Mon, 28 Jan 2019 13:05:14 -0500 Received: from mail-wm1-f67.google.com ([209.85.128.67]:55951 "EHLO mail-wm1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727322AbfA1SFF (ORCPT ); Mon, 28 Jan 2019 13:05:05 -0500 Received: by mail-wm1-f67.google.com with SMTP id y139so14893884wmc.5 for ; Mon, 28 Jan 2019 10:05:04 -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=4wf9FAXSPyYzzMogrRK8K8vMBiOAXKZiQZa3fRw2VeY=; b=pAVKDPg0Pm08cuC8o0hw5D/VrYpOKQ6CKzqXA6L/cQ6OzR7OMKDBtPu4Aghtl8Sx47 RoDoP4Yh/ydPBu2tTQGJll0VfUElhArZksnOZ7/SNkJjFsJ+QHBvI02iR//UIU/Zlj92 AijANg0jt6jMbZpvcNhTRF4fDcWlxphkLBVIFrA/fbCkM7DRbPLNnbLBqsPnvwqLOz4L W27uG/V+37FNXPyqp1HysQmNQXBPOFh7qkKPWCHIandCIvV5DoI87D1L/IprVTk7hkyp ZQY7s8ze0GnSpSPvsVjNcjIDYU3nwRXnxsXBu1EBBZQYuSnYRn+ejlquTub0LXhjfRoV yO0A== 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=4wf9FAXSPyYzzMogrRK8K8vMBiOAXKZiQZa3fRw2VeY=; b=ReAEy6w0EjgKacmPjjVRGy7D9h3Pe2PQPCeqHP7E8Vt3M1KOzxC5/w3+LVl7xipUwP zn++wZqYAvsKCvjH/7D+/S3okgHt0GE/s8Gyc+Gb2nRZ+VVz0UCdp6bm2Xtij/8lvyjo tEpSn1j+qUwtxq3uBZSlaeiJcGUs+gBzyC8WmsLXQtH0V6n53FmNmcKxADM8sPf0xH9N eMUSGUUzrOoqasKrApKkc8oreyIQ+qm6qp4YQPeOEREQjQYFszcrv7MWi90X/wbG2KcS DeV9kE2dgj2V/2cdKFLuHDQnH/rYjIZtQVxkDdUwEbzHpL7WpppsdN104cgbFHO169T3 meiQ== X-Gm-Message-State: AJcUuke16gv+XsDaAGrMPNoNNYmbmg+klsitE1YCjdLFHgIfMn2DYEOy V1Ng23ATdxue1l26p3dizPN8O47SnXI= X-Received: by 2002:a1c:a68f:: with SMTP id p137mr16745488wme.64.1548698703842; Mon, 28 Jan 2019 10:05:03 -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.05.02 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 28 Jan 2019 10:05:03 -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 13/14] clk: meson: move sclk-div out of clkc-audio Date: Mon, 28 Jan 2019 19:04:29 +0100 Message-Id: <20190128180430.28689-14-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-audio.c | 2 +- drivers/clk/meson/sclk-div.c | 9 ++++++++- drivers/clk/meson/{clkc-audio.h => sclk-div.h} | 6 +++--- 3 files changed, 12 insertions(+), 5 deletions(-) rename drivers/clk/meson/{clkc-audio.h => sclk-div.h} (79%) -- 2.20.1 diff --git a/drivers/clk/meson/axg-audio.c b/drivers/clk/meson/axg-audio.c index 8db0508ec6ab..7ab200b6c3bf 100644 --- a/drivers/clk/meson/axg-audio.c +++ b/drivers/clk/meson/axg-audio.c @@ -14,11 +14,11 @@ #include #include -#include "clkc-audio.h" #include "axg-audio.h" #include "clk-input.h" #include "clk-regmap.h" #include "clk-phase.h" +#include "sclk-div.h" #define AXG_MST_IN_COUNT 8 #define AXG_SLV_SCLK_COUNT 10 diff --git a/drivers/clk/meson/sclk-div.c b/drivers/clk/meson/sclk-div.c index d3eea53945e9..3acf03780221 100644 --- a/drivers/clk/meson/sclk-div.c +++ b/drivers/clk/meson/sclk-div.c @@ -16,8 +16,11 @@ * duty_cycle = (1 + hi) / (1 + val) */ -#include "clkc-audio.h" +#include +#include + #include "clk-regmap.h" +#include "sclk-div.h" static inline struct meson_sclk_div_data * meson_sclk_div_data(struct clk_regmap *clk) @@ -242,3 +245,7 @@ const struct clk_ops meson_sclk_div_ops = { .init = sclk_div_init, }; EXPORT_SYMBOL_GPL(meson_sclk_div_ops); + +MODULE_DESCRIPTION("Amlogic Sample divider driver"); +MODULE_AUTHOR("Jerome Brunet "); +MODULE_LICENSE("GPL v2"); diff --git a/drivers/clk/meson/clkc-audio.h b/drivers/clk/meson/sclk-div.h similarity index 79% rename from drivers/clk/meson/clkc-audio.h rename to drivers/clk/meson/sclk-div.h index 1eaf4ecac4f7..b64b2a32005f 100644 --- a/drivers/clk/meson/clkc-audio.h +++ b/drivers/clk/meson/sclk-div.h @@ -4,8 +4,8 @@ * Author: Jerome Brunet */ -#ifndef __MESON_CLKC_AUDIO_H -#define __MESON_CLKC_AUDIO_H +#ifndef __MESON_SCLK_DIV_H +#define __MESON_SCLK_DIV_H #include #include "parm.h" @@ -19,4 +19,4 @@ struct meson_sclk_div_data { extern const struct clk_ops meson_sclk_div_ops; -#endif /* __MESON_CLKC_AUDIO_H */ +#endif /* __MESON_SCLK_DIV_H */ From patchwork Mon Jan 28 18:04:30 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Brunet X-Patchwork-Id: 156822 Delivered-To: patch@linaro.org Received: by 2002:a02:48:0:0:0:0:0 with SMTP id 69csp3720139jaa; Mon, 28 Jan 2019 10:05:24 -0800 (PST) X-Google-Smtp-Source: ALg8bN4hrdhW3xghs0HD9zJ6T7dyp4RTFLnIClrEXteHWP30Atzn2oyln4VAsRyNnEAIiGzbfh8e X-Received: by 2002:a62:5fc4:: with SMTP id t187mr23077966pfb.66.1548698724075; Mon, 28 Jan 2019 10:05:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548698724; cv=none; d=google.com; s=arc-20160816; b=QK4lWo1rDg4uUjiUWdVjIIvC0+nU5QYKmKYzVMFfo/Q+vuRuhoVbswDGclQdf56Pdz 3fR8iY+bF6RNk6bUHugXQiTm1gTxb+rhHwXwSSeCWfhV0ndwh60lXqJvn+VlHf28vsNb WkYPXQ+HolL4BGqoeYPv9Scj4QE781dLhVQa7Xt/1CRCAx7xDFk5f4X9j2PRVgG/ClF8 uZ6m0tgYYB3vzbND4wNLUZUjieIokIDOh8XnqM6rViNh7Yxp0g+hlZwBoSJrVV6VKrWJ 3bmvvYHuhFQwF1ZlLP+eGIWEdZAJjn7UyDfHKR+XK5+sgrEbo6ogicyALYh1ZhwB/O9m b23g== 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=+5f9A0owJWTYd+3JvitHCSPw9imXDTHvj+3LfT3bYOk=; b=gs3xGt1O4KVF2yTYEDote3agwq7fqvYBprmJELCDDBOI9/A/AVTj3cBAkp32ZjJPzN mgxxEWvZNcHhQJq+FzhOWYESSl1fhPkiKHQi+vSOIBSzds3+S86DGCJe7hQQ9qbQ/VVB H4wDA6AdUe/GnUZ3Go6mOu7TnXNi0lq0BT311aWiTZh1tBQAntnUpBQJYDbJJ8K+rzWj 4gs3ywU2/pV+wCs7kEJPcqE6pJi/BYNfYwVoKXhDY0tvMEA0cmRL3JG4JvoZJLreeV0y jWCo7OO95xrOAJuk7OwAVGyUJHWNmD+DV7n8cK3Br44Yxb9NH+1Q9/LT6RJ8v3FEOdNR d+MA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=ETuq24SZ; 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 g187si31990926pfc.43.2019.01.28.10.05.23; Mon, 28 Jan 2019 10:05:24 -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=ETuq24SZ; 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 S1727477AbfA1SFV (ORCPT + 31 others); Mon, 28 Jan 2019 13:05:21 -0500 Received: from mail-wm1-f66.google.com ([209.85.128.66]:38232 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727344AbfA1SFH (ORCPT ); Mon, 28 Jan 2019 13:05:07 -0500 Received: by mail-wm1-f66.google.com with SMTP id m22so15016787wml.3 for ; Mon, 28 Jan 2019 10:05:06 -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=+5f9A0owJWTYd+3JvitHCSPw9imXDTHvj+3LfT3bYOk=; b=ETuq24SZivIvXbXZQMQiQzMYvQn/sT+AacURDekfgymKKkFu8yGWenSI4vUAtGbe+u cBjG+KHy7HrDl2qhC9Bsp/0ZINUCoJ3x7GP5EXS71l14/pgaX2lwZUun9mSTyw/koB9o sx8UxbLWuREoOXv/Srv6L1/kVio1yCy2+K/CXDy8r0NsgE5YA+V7l9qoR9Tz0ZjZUCz5 fE0/yN+RssTvAWizB5QRodcm5YL5lY5o2c0bwtF6XYJNO32LlVHz6WJmbQvqf/deB2Zp SpM6VxA8f9bIGFqneKoiba5GPTreRJP+NisVYvFF7V1LUOzVuMdc13tEpKP1WnyfWGIP a4kQ== 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=+5f9A0owJWTYd+3JvitHCSPw9imXDTHvj+3LfT3bYOk=; b=uE6YPVkYKiOi2BVimjXaA10LTo+ZwpTL01FFy/V4HuehGxlddWQ+AxfrJ/eGzhkfZS o9opSPjtkTwB+H0aAKpclJyHTRbAXLj0rw8kkQNEqDVJCeApA9w4pCntY0Lo2tptF6FN 6vXpO66UcOVY2sS50lrfLtwHvHk+lrhHZ/X4EUluyE0myGqB+Orzz5opjJ6EzilUXeNJ lM2hEARkmXsOcyvJfWomV7KU1dpCpzGHcO9DixcQW/BjjsNb9azYiqQFLlxwdT3xxRmL wnj5M2rFC4vv7S/UG1Sm9c40S2W/MS2R4Kqm5jjA1QZ5EZR3+DVh1xeCAY7YP/7U17Z3 phzw== X-Gm-Message-State: AJcUukeTlMOf7jo+r9ysiFu70de1H5KHKDbm8puVWeayosbrJV1aSMNF jSz2opPSFaZlm1tyz+Py97U+YQ== X-Received: by 2002:a1c:4346:: with SMTP id q67mr18947083wma.114.1548698705527; Mon, 28 Jan 2019 10:05:05 -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.05.03 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 28 Jan 2019 10:05:04 -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 14/14] clk: meson: rework and clean drivers dependencies Date: Mon, 28 Jan 2019 19:04:30 +0100 Message-Id: <20190128180430.28689-15-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 Initially, the meson clock directory only hosted 2 controllers drivers, for meson8 and gxbb. At the time, both used the same set of clock drivers so managing the dependencies was not a big concern. Since this ancient time, entropy did its job, controllers with different requirement and specific clock drivers have been added. Unfortunately, we did not do a great job at managing the dependencies between the controllers and the different clock drivers. Some drivers, such as clk-phase or vid-pll-div, are compiled even if they are useless on the target (meson8). As we are adding new controllers, we need to be able to pick a driver w/o pulling the whole thing. The patch aims to clean things up by: * providing a dedicated CONFIG_ for each clock drivers * allowing clock drivers to be compiled as a modules, if possible * stating explicitly which drivers are required by each controller. Signed-off-by: Jerome Brunet --- drivers/clk/meson/Kconfig | 82 +++++++++++++++++++++++++++----------- drivers/clk/meson/Makefile | 21 ++++++---- 2 files changed, 71 insertions(+), 32 deletions(-) -- 2.20.1 diff --git a/drivers/clk/meson/Kconfig b/drivers/clk/meson/Kconfig index 2479dab09d70..f2e757aea4f1 100644 --- a/drivers/clk/meson/Kconfig +++ b/drivers/clk/meson/Kconfig @@ -1,27 +1,47 @@ -config COMMON_CLK_AMLOGIC - bool - depends on ARCH_MESON || COMPILE_TEST - select COMMON_CLK_REGMAP_MESON +config COMMON_CLK_MESON_INPUT + tristate -config COMMON_CLK_AMLOGIC_AUDIO - bool - depends on ARCH_MESON || COMPILE_TEST - select COMMON_CLK_AMLOGIC +config COMMON_CLK_MESON_REGMAP + tristate + select REGMAP -config COMMON_CLK_MESON_AO - bool - depends on OF - depends on ARCH_MESON || COMPILE_TEST - select COMMON_CLK_REGMAP_MESON - select RESET_CONTROLLER +config COMMON_CLK_MESON_DUALDIV + tristate + select COMMON_CLK_MESON_REGMAP -config COMMON_CLK_REGMAP_MESON - bool - select REGMAP +config COMMON_CLK_MESON_MPLL + tristate + select COMMON_CLK_MESON_REGMAP + +config COMMON_CLK_MESON_PHASE + tristate + select COMMON_CLK_MESON_REGMAP + +config COMMON_CLK_MESON_PLL + tristate + select COMMON_CLK_MESON_REGMAP + +config COMMON_CLK_MESON_SCLK_DIV + tristate + select COMMON_CLK_MESON_REGMAP + +config COMMON_CLK_MESON_VID_PLL_DIV + tristate + select COMMON_CLK_MESON_REGMAP + +config COMMON_CLK_MESON_AO_CLKC + tristate + select COMMON_CLK_MESON_REGMAP + select COMMON_CLK_MESON_INPUT + select RESET_CONTROLLER config COMMON_CLK_MESON8B bool - select COMMON_CLK_AMLOGIC + depends on ARCH_MESON + select COMMON_CLK_MESON_REGMAP + select COMMON_CLK_MESON_MPLL + select COMMON_CLK_MESON_PLL + select MFD_SYSCON select RESET_CONTROLLER help Support for the clock controller on AmLogic S802 (Meson8), @@ -30,8 +50,14 @@ config COMMON_CLK_MESON8B config COMMON_CLK_GXBB bool - select COMMON_CLK_AMLOGIC - select COMMON_CLK_MESON_AO + depends on ARCH_MESON + select COMMON_CLK_MESON_INPUT + select COMMON_CLK_MESON_REGMAP + select COMMON_CLK_MESON_DUALDIV + select COMMON_CLK_MESON_VID_PLL_DIV + select COMMON_CLK_MESON_MPLL + select COMMON_CLK_MESON_PLL + select COMMON_CLK_MESON_AO_CLKC select MFD_SYSCON help Support for the clock controller on AmLogic S905 devices, aka gxbb. @@ -39,8 +65,13 @@ config COMMON_CLK_GXBB config COMMON_CLK_AXG bool - select COMMON_CLK_AMLOGIC - select COMMON_CLK_MESON_AO + depends on ARCH_MESON + select COMMON_CLK_MESON_INPUT + select COMMON_CLK_MESON_REGMAP + select COMMON_CLK_MESON_DUALDIV + select COMMON_CLK_MESON_MPLL + select COMMON_CLK_MESON_PLL + select COMMON_CLK_MESON_AO_CLKC select MFD_SYSCON help Support for the clock controller on AmLogic A113D devices, aka axg. @@ -48,8 +79,11 @@ config COMMON_CLK_AXG config COMMON_CLK_AXG_AUDIO tristate "Meson AXG Audio Clock Controller Driver" - depends on COMMON_CLK_AXG - select COMMON_CLK_AMLOGIC_AUDIO + depends on ARCH_MESON + select COMMON_CLK_MESON_INPUT + select COMMON_CLK_MESON_REGMAP + select COMMON_CLK_MESON_PHASE + select COMMON_CLK_MESON_SCLK_DIV select REGMAP_MMIO help Support for the audio clock controller on AmLogic A113D devices, diff --git a/drivers/clk/meson/Makefile b/drivers/clk/meson/Makefile index 2b9490dd9878..8baec10a49a1 100644 --- a/drivers/clk/meson/Makefile +++ b/drivers/clk/meson/Makefile @@ -2,12 +2,17 @@ # Makefile for Meson specific clk # -obj-$(CONFIG_COMMON_CLK_AMLOGIC) += clk-pll.o clk-mpll.o clk-phase.o vid-pll-div.o -obj-$(CONFIG_COMMON_CLK_AMLOGIC) += clk-input.o clk-dualdiv.o -obj-$(CONFIG_COMMON_CLK_AMLOGIC_AUDIO) += sclk-div.o -obj-$(CONFIG_COMMON_CLK_MESON_AO) += meson-aoclk.o +obj-$(CONFIG_COMMON_CLK_MESON_INPUT) += clk-input.o +obj-$(CONFIG_COMMON_CLK_MESON_REGMAP) += clk-regmap.o +obj-$(CONFIG_COMMON_CLK_MESON_DUALDIV) += clk-dualdiv.o +obj-$(CONFIG_COMMON_CLK_MESON_MPLL) += clk-mpll.o +obj-$(CONFIG_COMMON_CLK_MESON_PHASE) += clk-phase.o +obj-$(CONFIG_COMMON_CLK_MESON_PLL) += clk-pll.o +obj-$(CONFIG_COMMON_CLK_MESON_SCLK_DIV) += sclk-div.o +obj-$(CONFIG_COMMON_CLK_MESON_VID_PLL_DIV) += vid-pll-div.o +obj-$(CONFIG_COMMON_CLK_MESON_AO_CLKC) += meson-aoclk.o + obj-$(CONFIG_COMMON_CLK_MESON8B) += meson8b.o -obj-$(CONFIG_COMMON_CLK_GXBB) += gxbb.o gxbb-aoclk.o -obj-$(CONFIG_COMMON_CLK_AXG) += axg.o axg-aoclk.o -obj-$(CONFIG_COMMON_CLK_AXG_AUDIO) += axg-audio.o -obj-$(CONFIG_COMMON_CLK_REGMAP_MESON) += clk-regmap.o +obj-$(CONFIG_COMMON_CLK_GXBB) += gxbb.o gxbb-aoclk.o +obj-$(CONFIG_COMMON_CLK_AXG) += axg.o axg-aoclk.o +obj-$(CONFIG_COMMON_CLK_AXG_AUDIO) += axg-audio.o