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: 10784203 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A735D6C2 for ; Mon, 28 Jan 2019 18:05:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 973B62B56F for ; Mon, 28 Jan 2019 18:05:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8AF602B713; Mon, 28 Jan 2019 18:05:30 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 44D182B56F for ; Mon, 28 Jan 2019 18:05:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=75DjFlSzstmt2SQQHFyZbtdPiNRYes0Arobrhm75F90=; b=ihk6auhH/xwCXS 3SRDyBNl5hOK+84TVcFVcNridR3N53YduT6pI3HNPoOcRza+o0EfYRazZb+IQ7CLNdXDPguUTcQbz o74JeO4rBbZLYx4nNWx4JmHMMH1bSwglDKVqUM1JFf12oUALx6JvU23ZGJt72PT+3ouzQzq18BwFf B9MGJcKr4Om2GeuuiSYUIJ7Jca9JPOlbXv6f4fYFZJjlv+B/SdZmLep8/kS4qaI8aop1DyVaKUL++ Lp8K6YFeaNYmQ/g2x9ehTYn7dYwwQECWmZ/Y7OxOle29lKmJm6u6T3QEr8Fz4m+BalsntMRZOAftl 9qq5IwcxRXia7ClmyFAA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1goBHk-0005Od-HL; Mon, 28 Jan 2019 18:05:28 +0000 Received: from mail-wr1-x443.google.com ([2a00:1450:4864:20::443]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1goBH7-0003fo-0m for linux-arm-kernel@lists.infradead.org; Mon, 28 Jan 2019 18:04:56 +0000 Received: by mail-wr1-x443.google.com with SMTP id p4so19138109wrt.7 for ; Mon, 28 Jan 2019 10:04:44 -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=XkcxwT7kCvXfvCgcfkeZ/DcstIBjOSaxpeyavlLw7XYz/31jPXER9k4BTmMZcQAndu 9RLG4T6O+Iq1SK+qmb8MYqJDW9T5zjWPytdDniuhMEQciTlik4vTNHvaOFUO+wGKhNd2 UQrXDLHZqyuzA5OTfSxb+Rupj7iOfKXYC5OPIFlGBxl2LMPAzQho+HsSw0iEB7fnugRr +AA/04A/6U71afiMIuNXjrxM1us0cCp9SydbXFebNDHljPMSZbZThYKJnLDIbk+3UJl6 G55w4lPH0WHlaufSY8dv244jUhj90UvhQiFa6nOly82PjNI3ZV22CpAZnif+0/2QRRAS FluA== X-Gm-Message-State: AJcUukfsrPNbT29M6Yv4/6aBm+k0cpK4WFo078tghXoxDoWFx4w6Cb3R 0u/f9pn8fZ5iNdAS8fsdWnWhrw== X-Google-Smtp-Source: ALg8bN6R2RU/vwdb2lallgs6zrXDfvCKfKjNkwGfxMbyJV+hUE8OgxlmoMHX9A00qaFeyXiCvCWqrQ== 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 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190128_100449_087956_294FE34F X-CRM114-Status: GOOD ( 11.36 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Hilman , linux-kernel@vger.kernel.org, linux-amlogic@lists.infradead.org, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Jerome Brunet Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Acked-by: Stephen Boyd --- drivers/clk/clk.c | 3 +++ 1 file changed, 3 insertions(+) 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: 10784189 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 167726C2 for ; Mon, 28 Jan 2019 18:04:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0533C2B470 for ; Mon, 28 Jan 2019 18:04:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id ED2EC2B5E4; Mon, 28 Jan 2019 18:04:52 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id A15BD2B470 for ; Mon, 28 Jan 2019 18:04:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=UenwRNq0eok9p8hIAXiZb8CPMndYuSA8yoUAXJrhbLw=; b=R9uB8ambDmooXP LPcgFn04YpByZ5nm3juQioLmoJFc17JnjE5gzLdA9R+uvzj39gzabnO1aysTtOwG2ynElmL074cG1 p/qANRguo6Glxt4JbfJNGU0cq6K5B7XLrxhsn3vyS/zgOX0erbxwg6kf0Fn8yCcKKWg+GyDwhsmyk 9rwuJGfiKvNNoIemAHk3r16Tlo1a0dLzrcoWWLfZJn14TaQf5wLQZynV/8EimSGPVkK2V2XkXeeXr A3nCzjnX6UtDMLgE5u0d7iPON12eiqfwq9kP/xx9IQR8ZyZP2ntz7z+rIzMQc5ENEmt84y6MfRjui f5lQToqmfx+UeWRd4Tsw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1goBH8-0003j0-Bq; Mon, 28 Jan 2019 18:04:50 +0000 Received: from mail-wr1-x441.google.com ([2a00:1450:4864:20::441]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1goBH4-0003fr-KX for linux-arm-kernel@lists.infradead.org; Mon, 28 Jan 2019 18:04:48 +0000 Received: by mail-wr1-x441.google.com with SMTP id z5so19097434wrt.11 for ; Mon, 28 Jan 2019 10:04:46 -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=uCGlMlqjyBcLL/CSrAynm+eBSvlweSgGVJ1tgKp92Bxn4Hmcg35zhVlri4oA0bm+TQ S5KbV2fqmckZJyqE9Ejh572ktkix6VNqZXDOR/JkgGCvElIBPrit/n0gzFxF24OZo1kt Bg4mual7gfMUHnE8zTNtOZ24Cq/ZwXRKF6Roa2kcOrPIeHCRwLjZ+3P5yLQ7trxaZoJJ RecCifvgyxkHsLXka6QnLMNB9AAIMJA3NDpyex6T3tKJrusUGyMSaQqM7ozoNoFPUMNQ n5iA0P2A7XLptvEQ1lNbZg8ngPH0sdnYRK/gXzCJ2IGBnTaW5qLFOGyCJtq7ySG8v4nx Ng8w== X-Gm-Message-State: AJcUukdIDQka1vd2il6ZDZXrx4fUFtz99HsXfcho/Y9Lvlcf20owCcI5 QipznXEdA+OiWf8k7WuNjAZl0w== X-Google-Smtp-Source: ALg8bN70L5BosbEnf2iuiICAG9QvKNUPF80NJIk18dNZI4ftldt6y16V7XP2FO29oJ5/RvoO9VsXKg== 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 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190128_100446_726435_8205BDCC X-CRM114-Status: GOOD ( 11.02 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Hilman , linux-kernel@vger.kernel.org, linux-amlogic@lists.infradead.org, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Jerome Brunet Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Acked-by: Stephen Boyd --- drivers/clk/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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: 10784213 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E52CA1390 for ; Mon, 28 Jan 2019 18:05:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D3B302B777 for ; Mon, 28 Jan 2019 18:05:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C7BF12B8A8; Mon, 28 Jan 2019 18:05:46 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 6CDD62B777 for ; Mon, 28 Jan 2019 18:05:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Wl+fqbCc9USRFbNpZvb29hh66rDjYVyz1SqfQX9J9hI=; b=S5HywxLQGuMJyL EXKzMHnwXjuT3VLT4E+LJmKLSJfsxNaKX83bEuczU8h9W0s+tUtGlS8sOgEGSUe4nSSm+Gdl5Kqf6 9NAJnKTT1dlnKZipn+Q7aViZjhSdkZ+5Gu8mJVIUTSu9rIfNLZRTdawL6c20goZ0J22NqvWVnDzZs esT2NGb845DMMv1zQk5FF97BM9+kj/60RkdvPjR68aNk02sEZRoBfdnfV3W0DiHcIjJby8yrbAh4E HFZ6yAr4pykfRyfSkMg/P9WjTsWHAiWnMCA9COV2Uri1eHPaYPWpZB/0DjZgWfuV2sKYrTjjll1rD 9sUHHCepxqSLATQ2NHrQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1goBHz-0005fu-OO; Mon, 28 Jan 2019 18:05:43 +0000 Received: from mail-wm1-x341.google.com ([2a00:1450:4864:20::341]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1goBH6-0003gS-S9 for linux-arm-kernel@lists.infradead.org; Mon, 28 Jan 2019 18:04:50 +0000 Received: by mail-wm1-x341.google.com with SMTP id m22so15015556wml.3 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=Jjx7A05OoTdmUN8HkFfrK20XlZSCT3sFpuLxTDduJpbT9slwatWDy4MK191Kouaftk VyEVQc/pe+QxS9IUwA6i4rk6uQERGBosIwGr6B0z8GB8SYdtiqpqee9QOGuD2xSJrBOl 8uzFIai5g1HvzAHeoAY8gvYPDAGxclKe1WYQbfj3GenYhGUptYxX5A7cHT5wW1NsbSu9 uA6PwDzn1vvpl/ocfRV8z/DvF/yH4isFGHaobtTbma3H1pRTDQ2JLT97hAxQSf9H+0De VKXtHGrlTun2rtGmwOOSdEnxyBBEPmA5Dp1O840Pau2oRGRWD4Udo8vnHAN2JJrtaVKw w6uw== X-Gm-Message-State: AJcUukdkewU0RKzoqhLX3hVdJbxR/SYci4fZ5TkgLnLLWGtYPVCq91Oh sVAZnB3rweA8cA6ZFSz9X7YKog== X-Google-Smtp-Source: AHgI3IaWxr5X1uid7/Vo1ZeiTLguHcKoXOrRKhtR6Fxy68C9dTQWMzJCEFqyUhlczJcOOPAZ85Q95A== 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 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190128_100449_064972_90463DFA X-CRM114-Status: GOOD ( 12.25 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Hilman , linux-kernel@vger.kernel.org, linux-amlogic@lists.infradead.org, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Jerome Brunet Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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(-) 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: 10784229 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 469C36C2 for ; Mon, 28 Jan 2019 18:06:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 334AA2B777 for ; Mon, 28 Jan 2019 18:06:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 26CBA2B92B; Mon, 28 Jan 2019 18:06:23 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id CBC442B777 for ; Mon, 28 Jan 2019 18:06:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=fhjUFOvnKf4lWWv485NCMEwQU4EGEMpmVfio5o7gAng=; b=BDUEram+dQBJEg OkK0JF4BMQz5n77etOIlEQnstRVWMW0g74FwFyx9DHkjKlZgmoKwtDjtkbsZ83yR+cNFiLV11+c2N Yzc7+fgekePohV3BwyJyEocvNW2r7Zb57CWOYG1rcug94ZFari7cErc4KnZ52b0JYaF56YJmHFKOu 9fMU/hGYnDUgW7wk2u/ZnPp1J89gBZfNP1nFmspXOGDU0h1g59Hneg2xP/PVWzHbsuz1VgqGZKwjn UAREOhXk76bU3ZZubi8m4W59Ywc/WxZ0sCmiAsIjN9UWcK3Z2pUc5DN5kBSHgg3Z6sJAEI5DiAe9x HVqrDUTSSzjZcDgwiAag==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1goBIb-0006BC-GL; Mon, 28 Jan 2019 18:06:21 +0000 Received: from mail-wr1-x441.google.com ([2a00:1450:4864:20::441]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1goBH7-0003gb-A8 for linux-arm-kernel@lists.infradead.org; Mon, 28 Jan 2019 18:04:56 +0000 Received: by mail-wr1-x441.google.com with SMTP id u4so19142089wrp.3 for ; Mon, 28 Jan 2019 10:04:49 -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=LkuPqJCjx+bLMVIJnVHi+nFaiU8L+8JKmBa6ICX4HWokzCw3Gl4asdYiBLA3cKxSnc vVx818zIip5wOR/J0DfZMJk9JffTnSXn8r2qoFe7QzZ56iGfZp1yDZhpc2Lo/urHY0ps GYl0VwXkgIzWdXB+4JReQiBNMx4FvGmyO/Oie0cwTmkGHd4SrbVhI2+mGFtX2WsVJzhj XYmMFQciVZBbs9sK2eLlV6d0NFW/ouanA1zvcTN2rBbR65TwLtANPhYJRSMzSIYhiTzN m2lAE34sctQLhRTJf+3J2qbni8SIR7H/nK1AaUeLPkuM/6ZMaLn0qoatqOrAdcnOzEmh 0Rzw== X-Gm-Message-State: AJcUukd/lvbjZp1sy1Nw4H+hf9Xp1KroAxJn34f+ezuzLeVRCjS/7496 O/77nS5uvvGiTcXXizlxFIFFnw== X-Google-Smtp-Source: ALg8bN6+zBlIsLdvH0rPTB6ook6Al5zMZJFCCDkzoZ574m1bxusoJ/GiWAUd7oEjSj+qBUP5QEc71g== 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 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190128_100449_375753_86474E0D X-CRM114-Status: GOOD ( 12.62 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Hilman , linux-kernel@vger.kernel.org, linux-amlogic@lists.infradead.org, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Jerome Brunet Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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(-) 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: 10784255 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A08111390 for ; Mon, 28 Jan 2019 18:08:06 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8DDC22B970 for ; Mon, 28 Jan 2019 18:08:06 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7F2C72B9F1; Mon, 28 Jan 2019 18:08:06 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 00EB92B970 for ; Mon, 28 Jan 2019 18:08:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=iNjkv63J8w1e/BSi9OxaSDndMPtsT1LYX2b9QiJ/MOQ=; b=Y7qQZH9WHtpp0y n/2XCgbm2BZOY71LOxu/MrvdXAkTPvBfmbFSqmRbj1DfNwJKf6tnI1shj4iMJ3l5Ana7oWUwDGF6+ ecoquhDCHDGietepnlaXBwHotrJIIO9DisyPjz9ra+nMcy77O9KEhZvTfBl+Vc0WX5NQRN2mpZPNe GLUrqsCJWhbq8UmCUvypNXdwzC6U6sJSJWs/vBAvkmKeFm+NZNoS/RaK+zWw2tbxDWSTJ+mM+EyYf N6PhyitDgwibDem3DVdyyYvIuXXIxC79QCUmUWVoEc9wM18JNwOqEf9E3AOLUHl0p7wCy04n5/TIN BCzIx9f4hJkyCLOqAEMQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1goBKE-0007OK-Mi; Mon, 28 Jan 2019 18:08:02 +0000 Received: from mail-wr1-x441.google.com ([2a00:1450:4864:20::441]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1goBH9-0003j9-9T for linux-arm-kernel@lists.infradead.org; Mon, 28 Jan 2019 18:05:07 +0000 Received: by mail-wr1-x441.google.com with SMTP id z5so19097802wrt.11 for ; Mon, 28 Jan 2019 10:04:51 -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=LIG3MtgdqWH+NXDcwKT46NNzLjjBV/dHkJOEcSZwc/sYbWg2NKOHw35xkAOgsPlcLp r67BndYauuMEiWWwHOmax9+jmm+21+zOjMcPd/tv1f+UpPOo79veu0sw8Po9kBMMLqEn QTGGvuZ8hS0Vey3brNABGhOs3GTQECUKSVHpbd+aryp5GzxzriHlWPjfCgf086/lrOAd frPy4qObLpvsrVHQU5OOwOjnFLi8lm1WcX/FTyKcINLQ2aZwkLWFsZKLu960j7Sx9Uen xmdJbqfy8Nrd9b0qVzOLCLsTfsDfVX2mahJbOtm2ueAFefc7+oXbI7GWsxiQvPfxt8US AZPw== X-Gm-Message-State: AJcUukdr3yKolYL32v/7Dn7H6drq7+RPXSHZrtMtpNt+kKsEjedJVGGK 0384AfUjuN8cvVcNK98Y8mtbfQ== X-Google-Smtp-Source: ALg8bN43+P7d4wrn97gV8O0Ak5AVOuyFY/9fHPH1klbLsHnSlllH1qCMuc1gy1HgllQVPkmK6SXfUA== 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 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190128_100451_715434_BFD12D84 X-CRM114-Status: GOOD ( 13.01 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Hilman , linux-kernel@vger.kernel.org, linux-amlogic@lists.infradead.org, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Jerome Brunet Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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 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: 10784239 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6E01F6C2 for ; Mon, 28 Jan 2019 18:07:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5BE132B777 for ; Mon, 28 Jan 2019 18:07:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4F8462B8A8; Mon, 28 Jan 2019 18:07:03 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 514372B777 for ; Mon, 28 Jan 2019 18:07:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Fi+8TpcC/spug2xsvLc/MhktL5Pq0p2eR6cs6edF3uA=; b=hHLJMz5FJIhaeu +UE+m+7PAeRc/mICiMspRRt8ONs/cD7vCQl6PsST5IJ71oAFT7mOvkYftcDKpAcGc8vfabvl3/T/z NKFkJLAfN0HmuyFhT4AIBt8diE3YWYNEIbCtxIwDcAUQr9zhDQ3RLtn5ZnBZVvEe0gdT6K4Kr97tf H5nxfBA0PByAI/ixA40yj2/oD38zTfVoOJBoSyk436FXwqJRh8RPda0gS+1L68+VsHeYXfhgnxted gZpetiWBJXNLPv90LXXRPWnzJY9fMVKg2/XNuOeWlxiZGx6mG7rYLWOcCv2t+Suaf9rUOF+J4OzEc C59VKyRyQFVvYLuJaSXA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1goBJD-0006k6-4S; Mon, 28 Jan 2019 18:06:59 +0000 Received: from mail-wm1-x342.google.com ([2a00:1450:4864:20::342]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1goBHA-0003kc-VX for linux-arm-kernel@lists.infradead.org; Mon, 28 Jan 2019 18:05:04 +0000 Received: by mail-wm1-x342.google.com with SMTP id n190so15040313wmd.0 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=mnmO/7bVpQhHEkv8Oxb61mtqWd60zju+P0WwuUSOh0YPlUVUr8XtgYfmGpah7CNyj7 oEGKR2FbyCZ4dbeaZZCKTphqYd8uvwKyscUn89RPtBcjnIlMoQAAXtYHMAtTDhnwaTEH TDlLagiqYjX7OnMRhMeEUWZVJ1KniGoxlH9DKfL93Ynqzbth9oRYW9vZHPeK/u37P3Sp gXK1WsKhkFElAqXErBesK7VEr4J2ZLx+Zec9jUJB3zGDcmz1H5JySV9IN2tXsmtVnLq7 kBDYcJfbxP95v72YBLhrBICNsImXGkk+2sME5xAhNVuptu7zoX4SHJHCS6xQv09ZO7NR DvUA== X-Gm-Message-State: AJcUukehaC8A3RBNfx/xH6htIzsxMhcTQXyx3anMi4rCcUkX7xHmO0Wp SAEEVjyHUXD01BJnWO1AURFu+g== X-Google-Smtp-Source: ALg8bN6h3EwqtJR6x17PMVrJ85/8l7BNCc5PY79he82dxcUyVCCBRReX+tqR/ulVAdlmpVEeBcQHLg== 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 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190128_100453_404114_D603E3E9 X-CRM114-Status: GOOD ( 16.66 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Hilman , linux-kernel@vger.kernel.org, linux-amlogic@lists.infradead.org, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Jerome Brunet Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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 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: 10784257 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 07F451390 for ; Mon, 28 Jan 2019 18:08:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E9ADC2B970 for ; Mon, 28 Jan 2019 18:08:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DD0AA2B9CB; Mon, 28 Jan 2019 18:08:15 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 6E08A2B970 for ; Mon, 28 Jan 2019 18:08:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=ojb3ROVTNpP2fzpAvgpU0EiQgdluMiUU2zc1zolB7os=; b=kZT5JrRkxM05j3 HHm1lwP7y1UcaNDwhlLGFmd6PGWrVcwlKrrv957TUjUXDGhJ3ZH9Bdps7U+EMi/dRf4HpHjklSEWh UvUFmqVdH4BzcUCf7iZAEdxy2tnXBWZZOz6kXDarc/GFMDMRGvNdI5Txc7jdAV3CPsDk5h91HYVRb TArzzJdT//XK2om+MxgpoEr7+4cu5Hoi9pXxd6M2AVMqet+uVSA2vmx2XiTklfGalSAV0GbWRQHi5 MZ/lK1WW5TwRNvXAu/lh8RlVAbjs+7g1ntyblpdCsi6qWa6ZWYc9036qgj4REBdFM3HhXqDh+76Qa f5UBs8ee50VuU5cMOZAw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1goBKP-0007YX-Lc; Mon, 28 Jan 2019 18:08:13 +0000 Received: from mail-wr1-x443.google.com ([2a00:1450:4864:20::443]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1goBHC-0003mb-MC for linux-arm-kernel@lists.infradead.org; Mon, 28 Jan 2019 18:05:12 +0000 Received: by mail-wr1-x443.google.com with SMTP id f7so19209471wrp.1 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=kK3ZGhCigFPQUTpVDR5jOttniKxg3v7jUWKQ9RLbROfABZNgXylHOFo7bxJ6ekGkKG yYzSf98w+gevMtBlEtEAsN8s0Zpc/GeXzgQAUHfB4TqXRy6+mD7zWTj01ycpGKBMzLkS KyOsDexgIj42N0U9vD4NikQpdT9Qjdw2rF90WuFIWzVYp+RMxBq+FlBgxp87HrK92BX2 y5ATsKLnZrh0zhvlwOMrMnSxDItqqj2VFX6+k34GGB/sbYy4op2uj8+0db/3tt5OTOep OQxkMpRaV2qcDD+Lw5uuRnRWrZqY9r9qwLrcicJqWT2zA78MkOEgUXyK8ClG1KWSLAkC aS8w== X-Gm-Message-State: AHQUAuZ++nEZ7jfWrtqrEZd4WwwK0Mi65QEvxnVU8ayW9cSzv4kNS6qm 3Z9EFOtVbd+2lflswa71J1nhyq4GJmk= X-Google-Smtp-Source: AHgI3Ibf86P6JrR4OEXFj0tAJZiXCpcxEJRKZPGFbtTm60QemWO8lWx4yqtwQENi/Hxu6K3Voru+hg== 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 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190128_100455_252789_280F095F X-CRM114-Status: GOOD ( 16.02 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Hilman , linux-kernel@vger.kernel.org, linux-amlogic@lists.infradead.org, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Jerome Brunet Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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 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: 10784265 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9EEAC1390 for ; Mon, 28 Jan 2019 18:09:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8B6792A445 for ; Mon, 28 Jan 2019 18:09:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7E0732A4D2; Mon, 28 Jan 2019 18:09:09 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id A147F2A445 for ; Mon, 28 Jan 2019 18:09:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=qIjj1yGJTbUnZ5cE0CXdAaN7NyWEZ456ijjn6ngRY9Y=; b=GgL2EBDvGJrVYS mL3qq/3+o6bDZqZJBAU6s6HJ3XkFkxZfUViLoswDZkgrDmgzF/2zaaxrBPjf99MW/1WAihGPnoQiL Ul/H7rmjTFSp2ZFF1w/j2xRixRan2YjxUObXy0tA7vtoI443Rg5hD9P11jblT8+E8oPZaFthMNjRS 35lUbtGlb9hYBTBwxos8Orcy7FsyRlEL4qdHxtEDBXgIFEcv+mW0Kn2NVF7MWf6M/J1Mf9TBrFwUz f1BSi+e2MPn9TMF3Qj1zI/zO6qRfDeiBb9QLVlzZljCpEfUXAskWHxVpC6fcaVt8O/F9TgtBrfByQ zGFJVTFjBhZjSN8ANsLQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1goBLD-0008Ot-MV; Mon, 28 Jan 2019 18:09:03 +0000 Received: from mail-wr1-x444.google.com ([2a00:1450:4864:20::444]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1goBHE-0003ol-Sd for linux-arm-kernel@lists.infradead.org; Mon, 28 Jan 2019 18:05:18 +0000 Received: by mail-wr1-x444.google.com with SMTP id t27so19126818wra.6 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=FweBXcSbG07HBeWn6gUGOydOoS/VTCqiGHIbngOen5lxepSRqW3cMCWQCwH6mAMu5q 9WqpcylODQ009iqVAtworp/0t/RmFVOY5KvmC6kxc7De64LrhKcYZ4ogY+IvCeSH5TPi NNWYZKk+4y6IACuaAa82psDHABrzzY5GhN+LnE04tgZfyw6c72UWacrqWMaH5enq+qSN 5gIMQrd+wfOnJEkKA5FZVMAT/bN47s4JR9zNNLgj49YmEeXWOgumCWW82HWuOcv/bcld RnCwE2Oda9MoRnpY+/jdjjDMHOClF4Q1IXX1VCF1nlbyMgLQqG/TpfX6fuZG9tmlN+io nH1w== X-Gm-Message-State: AJcUukfGqtLTo+Sy9u9qcNpJ9yPkr2Kv9eWOMDYG+Sz3x3tfv/JWsExD 7BODzzQd5su1KILvFVySc41p7g== X-Google-Smtp-Source: ALg8bN5ptqOkDczz4Gl7nJbZhxdu3hNvlXVaK9LMPMfHt9AEJr8jfqZVW2W5tsQfy1LRnLNEkSfOQw== 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 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190128_100457_530245_4ED18793 X-CRM114-Status: GOOD ( 18.68 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Hilman , linux-kernel@vger.kernel.org, linux-amlogic@lists.infradead.org, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Jerome Brunet Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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 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: 10784263 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 387571390 for ; Mon, 28 Jan 2019 18:08:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 23FFE2A445 for ; Mon, 28 Jan 2019 18:08:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 117FD2A4D2; Mon, 28 Jan 2019 18:08:54 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id F22AA2A445 for ; Mon, 28 Jan 2019 18:08:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=MT3q86hsYWAPByjNxQ+4E8Wy4oiYXiWSWV2/yoRTm2k=; b=lPHoesN+a8h9Dn 5kW/GutZ36c1XLMp2cVYhvhz9x/Oj4J7cGOmb2UkbxVEsaNCKWqZHaob3bzkuUjjQQ5BhzaVI3mNw 266IcMLEZgyGfyaqacd08l2p0Tew4tqb/bfOnIle7X0GWXfleqvaXaphdhRUpSBMM7byqmQmA/Jfk eidu2KVz5+NIB8xxVX2Y7Gkg4x7AzVk94dLzXnhHuhwoV/iiwmIvnG14ukt6Jb6w9OvdTgazSz/ux /MI6zq6uDeLF//nFLP9D3fltOnq8anzTq7COAo4/dski5Wa/W2qsEPKOXM2AuDtMGZSgmh7jna85Y W3/9gXC2r9GJI+62BkCw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1goBKw-00085W-Iq; Mon, 28 Jan 2019 18:08:46 +0000 Received: from mail-wr1-x443.google.com ([2a00:1450:4864:20::443]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1goBHG-0003qU-CC for linux-arm-kernel@lists.infradead.org; Mon, 28 Jan 2019 18:05:18 +0000 Received: by mail-wr1-x443.google.com with SMTP id x10so19101559wrs.8 for ; Mon, 28 Jan 2019 10:04:58 -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=iRpUUmcm3E4//xwz7raUkl+5jHAr/Eup9iMAlzuoM6Lm59ZQcQChHvw3v3SqCGhtxq ZUH1G1YQmZEDWojvZuBMB6iMfycRGUcnMWqo/zIcoqWG5PxOhJgS3uRvNffPBeRQe9yd b9PC9xAiq8DFf72xlmvqAqgSTdzNVGR8AuGWsWceEZigGgieDe8ml6mIN9iZhk4YB0BZ 7VhdkKY9TdhusZam68ezqQFjWc3k7tbXyervvnamn5NfCDQBWOSeaMNflQNQAuuU4lcL s+fKPF6523VUD5Z1Tch30/0RG6HAuGd4PVkR49qVS+6TyVqybfvYuu34mvR4fBDeud3K Je+g== X-Gm-Message-State: AJcUukfVnJU88sq08P71nFf/ayL/ingCnRbsGFn+PWrTP9Ky5IrYH+X4 pzMAgRl1MQLkty5c5vUEWTP+Sg== X-Google-Smtp-Source: ALg8bN4axE3Jm57Ar6p/8Z5k8GxKCnyr15/ghuZ2xAJf2JLr5cweB1zCKXh7dy/WqE+I/F2jF8f1sQ== 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 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190128_100458_898493_217A2A78 X-CRM114-Status: GOOD ( 15.35 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Hilman , linux-kernel@vger.kernel.org, linux-amlogic@lists.infradead.org, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Jerome Brunet Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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 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: 10784269 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 09C856C2 for ; Mon, 28 Jan 2019 18:09:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id ECB332A445 for ; Mon, 28 Jan 2019 18:09:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E12E82B507; Mon, 28 Jan 2019 18:09:23 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 7AEC02A445 for ; Mon, 28 Jan 2019 18:09:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=lBb83E/jxAmjNzSnH61sIOgv2qgGRDKFR6zZ02w1Tyo=; b=EMnsuX+wrzrA+k r5SgmtJdkLOtB0NeI55aAmPdtXjfxP7+s11lZ7QmqwB2bWDjYOefsv6JLL3qwpgqrQK16Fnn5qmhk cfgOnG8oV81mveAhcp0RaTrWyLaGbDz2KVaoshYhWXqe1q2R1eMVEURR0VUEkJ69BpJbxQazH4UNN XZGDsw6NsSQ5AG1JiE2UTbxZVzxSPlUag+IbxXfEAVHb3FuTrAfrdCp6mFRlxjQ8tJUPkBFbdl/ih D7Dn6nfYfDkj4aPxvvNRlwvJfXByGSlbNc5qhDDz8jm/M4FPyd4pgUCNZfI0/12p7Kj+xCJVvNjsS QfeCGWsxswNINQ7wSygg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1goBLU-0000Bb-6d; Mon, 28 Jan 2019 18:09:20 +0000 Received: from mail-wr1-x441.google.com ([2a00:1450:4864:20::441]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1goBHI-0003sl-BS for linux-arm-kernel@lists.infradead.org; Mon, 28 Jan 2019 18:05:24 +0000 Received: by mail-wr1-x441.google.com with SMTP id l9so19066754wrt.13 for ; Mon, 28 Jan 2019 10:05:00 -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=b4vRos6Z3Fi5EtbZDfopt9+uEtFe501H+Lby4r0VWBsquXAymrrIvX/tYQ0fPD7sWo d0X04CBhzF4eP0C6LlOlaPbPGRckw/y28+c/7FdDUJLjjdVA3sVNj6ZURP9QEJTfQlub hWryTKspXY84gCO1JxvimSLiEj7Us1KYFkVQy9QJZoNuSrVKV3owlmNB4+IoOG9wrQVT c1vDBwXu7ojM6dkJScGIp/Fs2Bl8gFrSYNnlU+kMIopTTsgK0TfMT1D/1GW8a8OMbIth 8MgOV4znIuDMCOpEPuseQG1TRuer1Sq8moCQQDJzKu4QqBz1eUWOFS3v2kstd7jmclky aJ/g== X-Gm-Message-State: AJcUukfMdYtYR2ggPczKiaWJZ4eVmjaqwzVz8JA/ukHWqO1RymiqkrJN /2kzEhJr1NNOpT+b0pK5oH3jJQ== X-Google-Smtp-Source: ALg8bN7rc1FqBP6q7WHfC7vdI22OJgwmrgEzhl5DkIU0wmie8x73jzhGTOYrbqYrzK7s7AvEiSgiCA== 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 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190128_100501_264468_BC36FC46 X-CRM114-Status: GOOD ( 14.28 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Hilman , linux-kernel@vger.kernel.org, linux-amlogic@lists.infradead.org, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Jerome Brunet Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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 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: 10784271 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id AC3C31390 for ; Mon, 28 Jan 2019 18:09:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 981E02A445 for ; Mon, 28 Jan 2019 18:09:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 89E932B507; Mon, 28 Jan 2019 18:09:40 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 197262A445 for ; Mon, 28 Jan 2019 18:09:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=iz8VZBpouFhjmjEY6e5oiDBBVjGgv8xJttyi5DSCyII=; b=I3RLwedmBGmutK A/L2vYHJlNNqbc4ZDS+/e40aGpEwicNDC6dR3HN6485Ae4e/JinAQa8q5r1drIDwuL3ACD0dVSUF8 xEJXToMn6t5TxkIWKDe7LQsomes05lnRNmo7ZPIgi7I3gq08U0+nlwyuvaayMjYgrgvrAwWXhslYW jXuOAyEXAyvhob0s8CUJZeMg8JuMBzovpnHmYdVy9X6rcpB0tj05q3kUTtsVXtjSSaBKb2PNRIkmF NAOwfvTSbbAZVZO3XKsJ7UHgt4f/tNDMvp0lW6ns1htr1H03MntgSi/HwwI4OmjpyyAKnu7TAVL4k mC6QDlX4ur50EV7GvxJg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1goBLi-0000QK-Ni; Mon, 28 Jan 2019 18:09:34 +0000 Received: from mail-wm1-x342.google.com ([2a00:1450:4864:20::342]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1goBHJ-0003uF-Pn for linux-arm-kernel@lists.infradead.org; Mon, 28 Jan 2019 18:05:24 +0000 Received: by mail-wm1-x342.google.com with SMTP id p6so14922063wmc.1 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=qK7bdK564qY9NrCxDETh9S21dvbMiwm8qtXiIRLwQc2sjJYpFJZf7ix5ddMI743M8D maX6IL5FmBqHpClVvayDaSs5FfTVSImB2DMfPRYqNm8RcIs+tx6x+xr5yW/NYIXLl7AL jdLD5AM34P1WieupPkqsUvKtL57cMI9K9JL3nwiMICYE3GPibo5fAaVd9QKPqYsRKxdZ ou1JkA2hny4QBWz3L8sIEXbUurZw9RYBpcP62X4KWjlymhTb8+03tg72ctib55a1Eu9i gNPVCdiJgZgXQIUBAXmAwf5DGHmqLAm+FJxeFiwGV6vpJ0rNh3Ms+8my5IYpNk40PIlv pu3A== X-Gm-Message-State: AJcUukfdreqxv7k5MT55J3bvxgHDnDAPWtR4NNLPWKoLcPJu/0mji62k huZc+/ZzyV5bIjPd/GyDsuiMjbQroAI= X-Google-Smtp-Source: ALg8bN7IQBpAWx51W254lq8KN4Nv4yqyxBtevxoXFQECyMJOWUYw2LYRKrMxRJvuC2BW4AQgTA+pEA== 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 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190128_100503_419978_ACE8106D X-CRM114-Status: GOOD ( 14.94 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Hilman , linux-kernel@vger.kernel.org, linux-amlogic@lists.infradead.org, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Jerome Brunet Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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 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: 10784275 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 871036C2 for ; Mon, 28 Jan 2019 18:09:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7530F2B59D for ; Mon, 28 Jan 2019 18:09:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 697442B5B7; Mon, 28 Jan 2019 18:09:55 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id BCB812B59D for ; Mon, 28 Jan 2019 18:09:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=6PPjOkE5FDK+1wy5RzRbJiFDBUxHNF/pVPXRfOh7/Gs=; b=e7dxVPKBpDDH+Y uu5NBrEPRV+TQbZPwQNXeE3jtUopEMBNjX6fXJ0L0DYmqaF/60eqmoFsJqmf4IFGeXzr7ndR/Jrwk PDGaKVc5MwBmCoV1+UnUBozeEMOBhSxLq8krQV8KguSJ24hamWz4x9HGkBMoORLlGCA3hUuGGy2nH N+cl+E1siwlHbxLUFZNxsELzsOd+1j6Xu/oU3uniUnOTGZwW4mI1mjCWTLlvwiDDamMJa1bKZ5EGh vsS5uOYdQwZlDlNloJB8utq9sj9R/MWEuQ5ZdWDZU6Y9TNqscJloSL6WYHqUfUgS4Z/yag4KO1YTR afKYPDidzo+dFY0oZ7fA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1goBM0-0000gr-14; Mon, 28 Jan 2019 18:09:52 +0000 Received: from mail-wm1-f65.google.com ([209.85.128.65]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1goBHM-0003xo-OE for linux-arm-kernel@lists.infradead.org; Mon, 28 Jan 2019 18:05:27 +0000 Received: by mail-wm1-f65.google.com with SMTP id b11so15037404wmj.1 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=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=DgKGLFCvDUkFDWLwIfBO5kZhhjvMMit9RbZAyXFzmXsQYWKR4qnQ7/HxHseRtn0zXY aMCWxCZM4XiS4X7ycV5nwv5C+PEr45KvHqm7EIgYTFCQfFrgL394BHg+7jGD5Qkd+ARI Cmj5Bc9LSKJXqLOfYfL489k3qBqQAvYzgOI4vVNc+ljcdJhUVTqvwjvt1iDpHKdRBshy 7WxF7TmP7A6ejLPXBEM62ZObAPf65tfgb5WMm2miZi4PNrqG51Be4STvMtRHeK7BIP8M 681Yk12J6aPkoDucbVqOYwqU/irqYGYmjN4/f9/nI1Sbj2pJqZwWBlZKxQQloxdmBBOB 9MfQ== X-Gm-Message-State: AJcUukdSAhfCv6ItvRYzF11r6ZRPth2/Wd7yN2tUHW9WC0Cb8dXz76py 7GjkQ0VIUZ2zZEiGhVRsBTPzng== X-Google-Smtp-Source: ALg8bN4XikoAiiZ6m8KJzjzTM2NutTFSa6HkbAhF85gQrbCVU3ZNEmYPDUjk9IzArKne3w1nrguH1g== 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 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190128_100505_784522_BDE40025 X-CRM114-Status: GOOD ( 13.66 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Hilman , linux-kernel@vger.kernel.org, linux-amlogic@lists.infradead.org, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Jerome Brunet Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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 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: 10784357 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id F23F791E for ; Mon, 28 Jan 2019 18:25:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E09D12B88F for ; Mon, 28 Jan 2019 18:25:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D46102B8C5; Mon, 28 Jan 2019 18:25:41 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 69B192B88F for ; Mon, 28 Jan 2019 18:25:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=tDr7rTJd8ickhjpByjLHxkDcU7f7kRlYqswspGL2qVw=; b=m4yLrCjzedMcXQ Kc1lE75JfSyRrPVgLe7UmaLohqEbafO1meTkkFTonqZ8lQ8f504/PGX8myRiZoHQo4TgkIl3ftdBm pJKtVoU1tg7MreiEoNt9a0A6e1fZI2V9DqrpB28xCZDL7mIRT27+j3jXds4Kn3P/F/GxobZK1fRAZ KchayqHmpgLNRA1R3F4uF0Ydqdxui7FJReCsrbLaUrGi9UITppLRIrSrQnnFKUbkLmNVzJzbnv+2U 2epjV3h/WNASiU7oJoZsujKgbNXQzyCJan2u9QLmqSLp86FxgZPWExDQu0kFD/pqPaMbpii02Q5dT +8eXma/ghvTjWsC0IcAg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1goBbF-0002pb-Cj; Mon, 28 Jan 2019 18:25:37 +0000 Received: from merlin.infradead.org ([2001:8b0:10b:1231::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1goBar-0001gK-RG for linux-arm-kernel@bombadil.infradead.org; Mon, 28 Jan 2019 18:25:13 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=4wf9FAXSPyYzzMogrRK8K8vMBiOAXKZiQZa3fRw2VeY=; b=VEzl5VWizX/NAuGQe6nObSECxH FM0PRhEVQouY9dq/M+1oiL1RG3DzzRonkfjvrXfsg0BoIbxc1komm6k4df4M8KcbwfgTI5d7jzKIN tKBgpQTPLZHym0svVhaTTv2QbdNESval1vqpZjwujQcdx0ukOA3uPquFgPxpMfPh5zPSrldiCcOZK GEXF5AHkeliHO+qNw2g80SjoRIKg5gkG5CSe3xp6cUJhJqYQiuQ9Tud0f3Jqv7Zp3TD9VxBhrPQ/F IPuITrGmCLy7OYy4gJuzEPVImtI7+59L+l1PjwYGUXbcAKUQC0U7/kO8Nm3AqJBmLwKLp66vILtVf OwmVcHJw==; Received: from mail-wm1-x341.google.com ([2a00:1450:4864:20::341]) by merlin.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1goBHR-0002ub-Cq for linux-arm-kernel@lists.infradead.org; Mon, 28 Jan 2019 18:05:15 +0000 Received: by mail-wm1-x341.google.com with SMTP id n190so15040961wmd.0 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=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=Ie/tr82WIyq7qXHN6jtVNF9NeWQHKPRn3cmwVCxHrLUg3CMdJfiQM1jdOCMjic9M/7 n2fhzp4nJPzYMh+Vor/F8b9PUAVpBmOpaBcE+mqYxwuVGNNCtCTT5EwvnAvodmqoEm3L gJRYdw3tKDc8/Z53st1tB9vNyb2sLSde4K7xjLk86QHhhEIYqcNT9o1RS5zg2pjtW8jX J0vC0Wy027f6nKKoU9OPRRUrKQHwsXugvujsaDP2ZpQy9yOmZX84swQhNHj9B3Pygn+c OcCoaR2YPlXUQy2JKWOFQjbsCyUTPejOQaJb9XCRDDUFWhPbghchsMUy2sbpYYBW3gSX QgRw== X-Gm-Message-State: AJcUukeF7+xUUNj8CwlKA6VexBBSIEDl0aKLs2f1wmXuh2MXcXmRJdgr aAtm8FjhICw7CvbxIsdSX9UyOA== X-Google-Smtp-Source: ALg8bN75sC55jztbjVVmJDd8FxG0eY5D28u2GiTxNeyFtpJy0sKx6KZZC4T1/iMaBQT0GzM1D63dLA== 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 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190128_130509_523271_2697ED79 X-CRM114-Status: GOOD ( 14.78 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Hilman , linux-kernel@vger.kernel.org, linux-amlogic@lists.infradead.org, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Jerome Brunet Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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%) 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: 10784259 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 945FC6C2 for ; Mon, 28 Jan 2019 18:08:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 807562B970 for ; Mon, 28 Jan 2019 18:08:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 73F8B2B9CB; Mon, 28 Jan 2019 18:08:32 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id E823E2B970 for ; Mon, 28 Jan 2019 18:08:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=jCHrMZR0Cd/ZuHtN2rMIvsqCmxSPoCGhou7UI7Z7W38=; b=HcnlywXCLwg8mK IujWEXrAF6iDFKMswK4RGZETCR/N7Nu0Iu+G/ilarkc0A/M1ypgcnGhXDPyTw/8gBCMcfFaDboxjb QbXQsQ6GunQ8vTKXTuZpuJGJTCbXfPEGDjLqSPF9S8/het7Vpv/gjPcb6FM9TGovlX5M8eGADAbX+ UuP9F9DrOrtPrG0jVi5HCR+tBvNtvuR3Hwhsdujfw/uQv6tVDyEMrIm9ZFge79IEcqhbamoW2o9ks ghtOw3J5ohwNjX3coqFgpcDDx/US7TOnW0oelpIjtyTRmHWB2rlBhvwU4/GaYdqKYX7WYkzX17c/Y gXnzI0m5iME4GTfpX39Q==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1goBKg-0007p6-7o; Mon, 28 Jan 2019 18:08:30 +0000 Received: from merlin.infradead.org ([2001:8b0:10b:1231::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1goBHV-0004PV-Nn for linux-arm-kernel@bombadil.infradead.org; Mon, 28 Jan 2019 18:05:13 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=+5f9A0owJWTYd+3JvitHCSPw9imXDTHvj+3LfT3bYOk=; b=cdRV1j2D0B7bp9DtUPxJk17Qbp teNQtHRn4WrRS7mCjDQNJKyrkBhH/t6jU3hqWLl3NQHOnrfF2RFhUOZ3V9MS/7qZFq17Wxik5NRZJ RTzemQca5b2L/apSs60I2+bvE+huTiFwkEH37A9WHBmaMxNFQTf3kOlz0wBV/ieNyhhFoGdodktZO 9EpN3sFk2PdE8WziWrazr77c/0tbcQGiXgyUDtLZlx+ozrqmDMuuovb3Gsuc5hjqR2Jp0mTmgiSC4 2HPkmY0GfyIXRsERyOu+YWP6usmcWUNgPe/idIcAfwDvyfgwR+AaTqeNtV5k0e6jJpXCW6b0+WmeH OaX4VKxg==; Received: from mail-wm1-x341.google.com ([2a00:1450:4864:20::341]) by merlin.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1goBHR-0002uh-Bt for linux-arm-kernel@lists.infradead.org; Mon, 28 Jan 2019 18:05:11 +0000 Received: by mail-wm1-x341.google.com with SMTP id f188so14883483wmf.5 for ; Mon, 28 Jan 2019 10:05:07 -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=NrgmG/2mS+zFzz85dpijbFScqssjd39GYzdZ2WQ5nNHhmqOYIgk4DaPn359kG8TVHE LnyYaD7GfCtkqIxnyshpDk6CVNo11C72ac1G5jHBLcpwNAV/0FaGlbpXIq1PWVH6PYaB oExvbsf/4xTF1ErXnlRzd67PdtcarsVNDufH29D6IG4BQoc7mHxBsN9qNzXdmFAQiTZy KYGQqNv517cOK2BiGVKXeBGVRypDDSyhB5vlLHjwfKiFoI01+14pr4NkXppeVu9VhmSv dQfuAfr11jbsxGQGQL3TghECs/AJyDUG7myg51a409B934ICRkIrTLXQB1FUVUphGtfJ SFIQ== X-Gm-Message-State: AJcUukdHahIXtswwLIeVc2jeuSU+Ep++5JpU8yamfYIgpZvyd/yxW/Ot 6k+NFC2Z14ERWkXjvdQT7ROxcw== X-Google-Smtp-Source: ALg8bN6k298/NJi0b7cLi+OrdmFywtfHwPwOaIFMaHfwxuqMYGiXLkd08l3a+VUxPu7kE3ta1cihPg== 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 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190128_130509_427166_2EB17D17 X-CRM114-Status: GOOD ( 15.64 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Hilman , linux-kernel@vger.kernel.org, linux-amlogic@lists.infradead.org, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Jerome Brunet Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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(-) 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