From: mturquette@baylibre.com (Michael Turquette)
To: linus-amlogic@lists.infradead.org
Subject: [PATCH v2 7/7] meson: clk: Add support for clock gates
Date: Wed, 13 Jul 2016 14:53:47 -0700 [thread overview]
Message-ID: <146844682774.73491.3554377408257493400@resonance> (raw)
In-Reply-To: <1468432181-9550-8-git-send-email-serveralex@gmail.com>
Quoting Alexander M?ller (2016-07-13 10:49:41)
> This patch adds support for the meson8b clock gates. Most of
> them are disabled by Amlogic U-Boot, but need to be enabled
> for ethernet, USB and many other components.
>
> Signed-off-by: Alexander M?ller <serveralex@gmail.com>
> ---
> drivers/clk/meson/meson8b.c | 263 ++++++++++++++++++++++++++++++++++++++++++++
> drivers/clk/meson/meson8b.h | 5 +
> 2 files changed, 268 insertions(+)
>
> diff --git a/drivers/clk/meson/meson8b.c b/drivers/clk/meson/meson8b.c
> index 9a656d9..0a0e01d 100644
> --- a/drivers/clk/meson/meson8b.c
> +++ b/drivers/clk/meson/meson8b.c
> @@ -27,6 +27,20 @@
> #include "clkc.h"
> #include "meson8b.h"
>
> +#define MESON8B_GATE(_name, _reg, _bit) \
> +struct clk_gate meson8b_##_name = { \
> + .reg = (void __iomem *) _reg, \
> + .bit_idx = (_bit), \
> + .lock = &clk_lock, \
> + .hw.init = &(struct clk_init_data) { \
> + .name = #_name, \
> + .ops = &clk_gate_ops, \
> + .parent_names = (const char *[]){ "clk81" }, \
> + .num_parents = 1, \
> + .flags = (CLK_SET_RATE_PARENT | CLK_IGNORE_UNUSED), \
> + }, \
> +};
As I mentioned in patch #6, let's keep this shared between meson8b and
gxbb in clkc.h.
> +
> static DEFINE_SPINLOCK(clk_lock);
>
> static const struct pll_rate_table sys_pll_rate_table[] = {
> @@ -311,6 +325,92 @@ struct clk_gate meson8b_clk81 = {
> },
> };
>
> +/* Everything Else (EE) domain gates */
> +
> +static MESON8B_GATE(ddr, HHI_GCLK_MPEG0, 0);
To do the above, "ddr" will need to become "meson8b_ddr", etc.
Regards,
Mike
prev parent reply other threads:[~2016-07-13 21:53 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-13 17:49 [PATCH v2 0/7] Add Amlogic meson8b " Alexander Müller
2016-07-13 17:49 ` [PATCH v2 1/7] clk: meson: Rename meson8b-clkc.c to reflect gxbb naming convention Alexander Müller
2016-07-13 17:49 ` [PATCH v2 2/7] meson: clk: Move register definitions to meson8b.h Alexander Müller
2016-07-13 21:34 ` Michael Turquette
2016-07-13 17:49 ` [PATCH v2 3/7] meson: clk: Rename register names according to Amlogic datasheet Alexander Müller
2016-07-13 17:49 ` [PATCH v2 4/7] clk: meson: Copy meson8b CLKID defines to private header file Alexander Müller
2016-07-13 17:49 ` [PATCH v2 5/7] meson: clk: Add CLKIDs for clock gates Alexander Müller
2016-07-13 21:39 ` Michael Turquette
2016-07-13 17:49 ` [PATCH v2 6/7] gxbb: clk: Move MESON_GATE macro to gxbb Alexander Müller
2016-07-13 21:32 ` Michael Turquette
2016-07-14 17:09 ` Alexander Müller
2016-07-16 20:14 ` Michael Turquette
2016-07-13 17:49 ` [PATCH v2 7/7] meson: clk: Add support for clock gates Alexander Müller
2016-07-13 21:53 ` Michael Turquette [this message]
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=146844682774.73491.3554377408257493400@resonance \
--to=mturquette@baylibre.com \
--cc=linus-amlogic@lists.infradead.org \
/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
all inboxes | Powered by JetHome®