From: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
To: Jisheng Zhang <jszhang@marvell.com>,
robh+dt@kernel.org, pawel.moll@arm.com, mark.rutland@arm.com,
ijc+devicetree@hellion.org.uk, galak@codeaurora.org,
catalin.marinas@arm.com, will.deacon@arm.com,
mturquette@baylibre.com, sboyd@codeaurora.org,
antoine.tenart@free-electrons.com
Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org
Subject: Re: [PATCH v2 4/6] clk: berlin: add clk support for berlin4ct
Date: Fri, 20 Nov 2015 21:56:34 +0100 [thread overview]
Message-ID: <564F8902.4000405@gmail.com> (raw)
In-Reply-To: <1448008952-1787-5-git-send-email-jszhang@marvell.com>
On 20.11.2015 09:42, Jisheng Zhang wrote:
> This patch supports the gateclk and berlin-clk in berlin4ct SoC.
>
> Signed-off-by: Jisheng Zhang <jszhang@marvell.com>
> ---
> drivers/clk/berlin/Makefile | 2 +-
> drivers/clk/berlin/clk-berlin4ct.c | 97 ++++++++++++++++++++++++++++++++++++++
> 2 files changed, 98 insertions(+), 1 deletion(-)
> create mode 100644 drivers/clk/berlin/clk-berlin4ct.c
>
> diff --git a/drivers/clk/berlin/Makefile b/drivers/clk/berlin/Makefile
> index fc92151..accfc3a 100644
> --- a/drivers/clk/berlin/Makefile
> +++ b/drivers/clk/berlin/Makefile
> @@ -1,5 +1,5 @@
> obj-y += berlin2-avpll.o berlin2-pll.o berlin2-div.o
> -obj-y += pll.o clk.o gate.o
> +obj-y += pll.o clk.o gate.o clk-berlin4ct.o
This will always compile clk-berlin4ct unconditionally on bg2x too.
Also, keep the naming style.
Sebastian
> obj-$(CONFIG_MACH_BERLIN_BG2) += bg2.o
> obj-$(CONFIG_MACH_BERLIN_BG2CD) += bg2.o
> obj-$(CONFIG_MACH_BERLIN_BG2Q) += bg2q.o
> diff --git a/drivers/clk/berlin/clk-berlin4ct.c b/drivers/clk/berlin/clk-berlin4ct.c
> new file mode 100644
> index 0000000..0d994a4
> --- /dev/null
> +++ b/drivers/clk/berlin/clk-berlin4ct.c
> @@ -0,0 +1,97 @@
> +/*
> + * Copyright (c) 2015 Marvell Technology Group Ltd.
> + *
> + * Author: Jisheng Zhang <jszhang@marvell.com>
> + *
> + * This program is free software; you can redistribute it and/or modify it
> + * under the terms and conditions of the GNU General Public License,
> + * version 2, as published by the Free Software Foundation.
> + *
> + * This program is distributed in the hope it will be useful, but WITHOUT
> + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
> + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
> + * more details.
> + *
> + * You should have received a copy of the GNU General Public License along with
> + * this program. If not, see <http://www.gnu.org/licenses/>.
> + */
> +
> +#include <linux/clk-provider.h>
> +
> +#include "clk.h"
> +
> +static struct clk_onecell_data gateclk_data;
> +static struct clk_onecell_data clk_data;
> +
> +static const struct gateclk_desc berlin4ct_gates[] __initconst = {
> + { "tspsysclk", "perifsysclk", 0 },
> + { "usb0coreclk", "perifsysclk", 1 },
> + { "zspsysclk", "perifsysclk", 2 },
> + { "sdiosysclk", "perifsysclk", 3 },
> + { "ethcoreclk", "perifsysclk", 4 },
> + { "pcie0sys", "perifsysclk", 6 },
> + { "sata0core", "perifsysclk", 7 },
> + { "nfcsysclk", "perifsysclk", 8 },
> + { "emmcsysclk", "perifsysclk", 9 },
> + { "ihb0sysclk", "perifsysclk", 10 },
> +};
> +
> +static void __init berlin4ct_gateclk_setup(struct device_node *np)
> +{
> + int n = ARRAY_SIZE(berlin4ct_gates);
> +
> + berlin_gateclk_setup(np, berlin4ct_gates, &gateclk_data, n);
> +}
> +CLK_OF_DECLARE(berlin4ct_gateclk, "marvell,berlin4ct-gateclk",
> + berlin4ct_gateclk_setup);
> +
> +static const struct clk_desc berlin4ct_descs[] __initconst = {
> + { "cpufastrefclk", 0x0 },
> + { "memfastrefclk", 0x4 },
> + { "cfgclk", 0x20, CLK_IGNORE_UNUSED },
> + { "perifsysclk", 0x24, CLK_IGNORE_UNUSED },
> + { "hbclk", 0x28 },
> + { "atbclk", 0x2c },
> + { "decoderclk", 0x40 },
> + { "decoderm3clk", 0x44 },
> + { "decoderpcubeclk", 0x48 },
> + { "encoderclk", 0x4c },
> + { "ovpcoreclk", 0x50 },
> + { "gfx2dcoreclk", 0x60 },
> + { "gfx3dcoreclk", 0x64 },
> + { "gfx3dshclk", 0x68 },
> + { "gfx3dsysclk", 0x6c },
> + { "gfx2dsysclk", 0x70 },
> + { "aviosysclk", 0x80 },
> + { "vppsysclk", 0x84 },
> + { "eddcclk", 0x88 },
> + { "aviobiuclk", 0x8c },
> + { "zspclk", 0xa0 },
> + { "tspclk", 0xc0 },
> + { "tsprefclk", 0xc4 },
> + { "ndsclk", 0xc8 },
> + { "nocsclk", 0xcc },
> + { "apbcoreclk", 0xd0, CLK_IGNORE_UNUSED },
> + { "emmcclk", 0xe0 },
> + { "sd0clk", 0xe4 },
> + { "sd1clk", 0xe8 },
> + { "dllmstrefclk", 0xec },
> + { "gethrgmiiclk", 0xf0 },
> + { "gethrgmiisysclk", 0xf4 },
> + { "usim0clk", 0x100 },
> + { "pcietestclk", 0x110 },
> + { "usb2testclk", 0x120 },
> + { "usb3testclk", 0x124 },
> + { "usb3coreclk", 0x128 },
> + { "nfceccclk", 0x130 },
> + { "bcmclk", 0x140 },
> +};
> +
> +static void __init berlin4ct_clk_setup(struct device_node *np)
> +{
> + int n = ARRAY_SIZE(berlin4ct_descs);
> +
> + berlin_clk_setup(np, berlin4ct_descs, &clk_data, n);
> +}
> +CLK_OF_DECLARE(berlin4ct_clk, "marvell,berlin4ct-clk",
> + berlin4ct_clk_setup);
>
next prev parent reply other threads:[~2015-11-20 20:56 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-20 8:42 [PATCH v2 0/6] Add Marvell berlin4ct clk support Jisheng Zhang
2015-11-20 8:42 ` [PATCH v2 1/6] clk: berlin: add common pll driver Jisheng Zhang
2015-11-20 20:46 ` Sebastian Hesselbarth
2015-11-20 8:42 ` [PATCH v2 2/6] clk: berlin: add common clk driver for newer SoCs Jisheng Zhang
2015-11-20 20:54 ` Sebastian Hesselbarth
2015-11-20 8:42 ` [PATCH v2 3/6] clk: berlin: add common gateclk " Jisheng Zhang
2015-11-20 8:42 ` [PATCH v2 4/6] clk: berlin: add clk support for berlin4ct Jisheng Zhang
2015-11-20 20:56 ` Sebastian Hesselbarth [this message]
2015-11-23 5:56 ` Jisheng Zhang
2015-11-20 8:42 ` [PATCH v2 5/6] dt-bindings: add binding for marvell berlin4ct SoC Jisheng Zhang
2015-11-20 14:37 ` Rob Herring
2015-11-20 8:42 ` [PATCH v2 6/6] arm64: dts: berlin4ct: add pll and clock nodes Jisheng Zhang
[not found] ` <1448008952-1787-7-git-send-email-jszhang-eYqpPyKDWXRBDgjK7y7TUQ@public.gmane.org>
2015-11-20 21:06 ` Sebastian Hesselbarth
2015-11-23 7:21 ` Jisheng Zhang
2015-11-23 8:14 ` Jisheng Zhang
2015-11-23 8:30 ` Sebastian Hesselbarth
2015-11-23 8:54 ` Jisheng Zhang
2015-11-24 2:35 ` Jisheng Zhang
2015-11-27 7:51 ` Sebastian Hesselbarth
2015-11-27 8:39 ` Jisheng Zhang
2015-11-27 8:45 ` Jisheng Zhang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=564F8902.4000405@gmail.com \
--to=sebastian.hesselbarth@gmail.com \
--cc=antoine.tenart@free-electrons.com \
--cc=catalin.marinas@arm.com \
--cc=devicetree@vger.kernel.org \
--cc=galak@codeaurora.org \
--cc=ijc+devicetree@hellion.org.uk \
--cc=jszhang@marvell.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mturquette@baylibre.com \
--cc=pawel.moll@arm.com \
--cc=robh+dt@kernel.org \
--cc=sboyd@codeaurora.org \
--cc=will.deacon@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).