From: Maxime Ripard <maxime.ripard@free-electrons.com>
To: Chen-Yu Tsai <wens@csie.org>
Cc: Michael Turquette <mturquette@baylibre.com>,
Stephen Boyd <sboyd@codeaurora.org>,
Rob Herring <robh+dt@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-sunxi@googlegroups.com
Subject: Re: [PATCH v3 3/6] clk: sunxi-ng: Add driver for A83T CCU
Date: Thu, 18 May 2017 09:39:43 +0200 [thread overview]
Message-ID: <20170518073943.hu4bsz5qggpkvyv2@flea.home> (raw)
In-Reply-To: <20170518035809.15487-4-wens@csie.org>
[-- Attachment #1: Type: text/plain, Size: 1924 bytes --]
On Thu, May 18, 2017 at 11:58:06AM +0800, Chen-Yu Tsai wrote:
> +/*
> + * MMC2 supports both old and new timing modes. When the new timing
> + * mode is active, the output clock rate is halved by two. Here we
> + * treat it as a variable pre-divider. Note that the pre-divider is
> + * _not_ included in the possible factors during a set clock rate
> + * operation. It is only read out.
> + */
> +#define SUN8I_A83T_MMC2_REG 0x090
> +static const struct ccu_mux_var_prediv mmc2_new_timing_predivs[] = {
> + { .index = 0, .shift = 30, .width = 1 },
> + { .index = 1, .shift = 30, .width = 1 },
> +};
> +static struct ccu_mp mmc2_clk = {
> + .enable = BIT(31),
> + .m = _SUNXI_CCU_DIV(0, 4),
> + .p = _SUNXI_CCU_DIV(16, 2),
> + .mux = {
> + .shift = 24,
> + .width = 2,
> + .var_predivs = mmc2_new_timing_predivs,
> + .n_var_predivs = ARRAY_SIZE(mmc2_new_timing_predivs),
> + },
> + .common = {
> + .reg = 0x090,
> + .hw.init = CLK_HW_INIT_PARENTS("mmc2",
> + mod0_default_parents,
> + &ccu_mp_ops,
> + CLK_GET_RATE_NOCACHE),
> + },
> +};
> +
> +static SUNXI_CCU_PHASE(mmc2_sample_clk, "mmc2-sample", "mmc2",
> + 0x090, 20, 3, 0);
> +static SUNXI_CCU_PHASE(mmc2_output_clk, "mmc2-output", "mmc2",
> + 0x090, 8, 3, 0);
I'm sorry to be a pain for this, but we're in the exact same situation
for the A83T than the A33 or the H3. There's no reason we'd do
something different with the MMC clocks only on the A83T.
What I'd like to happen is:
1) Get the A83T ccu driver in, without *any* of the new mode
handling.
2) Work on the new mode for the A33, A83T and H3 (and the other I
might have forgotten).
This issue really isn't A83 specific, there's no reason to come up
with A83 specific code.
Maxime
--
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 801 bytes --]
next prev parent reply other threads:[~2017-05-18 7:39 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-18 3:58 [PATCH v3 0/6] clk: sunxi-ng: Add support " Chen-Yu Tsai
2017-05-18 3:58 ` [PATCH v3 1/6] dt-bindings: clock: sunxi-ccu: Add compatible string " Chen-Yu Tsai
2017-05-18 3:58 ` [PATCH v3 2/6] clk: sunxi-ng: Support multiple variable pre-dividers Chen-Yu Tsai
2017-05-18 3:58 ` [PATCH v3 3/6] clk: sunxi-ng: Add driver for A83T CCU Chen-Yu Tsai
2017-05-18 7:39 ` Maxime Ripard [this message]
2017-05-18 7:51 ` Chen-Yu Tsai
2017-05-18 3:58 ` [PATCH v3 4/6] ARM: sun8i: a83t: Add CCU device nodes Chen-Yu Tsai
2017-05-18 3:58 ` [PATCH v3 5/6] ARM: sun8i: a83t: Set clock accuracy for 24MHz oscillator Chen-Yu Tsai
2017-05-18 3:58 ` [PATCH v3 6/6] ARM: sun8i: a83t: Switch to CCU device tree binding macros Chen-Yu Tsai
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=20170518073943.hu4bsz5qggpkvyv2@flea.home \
--to=maxime.ripard@free-electrons.com \
--cc=devicetree@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sunxi@googlegroups.com \
--cc=mark.rutland@arm.com \
--cc=mturquette@baylibre.com \
--cc=robh+dt@kernel.org \
--cc=sboyd@codeaurora.org \
--cc=wens@csie.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®