linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: lethal@linux-sh.org (Paul Mundt)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 01/08] mach-shmobile: Emma Mobile EV2 SoC base support V3
Date: Wed, 16 May 2012 15:56:26 +0900	[thread overview]
Message-ID: <20120516065625.GM7988@linux-sh.org> (raw)
In-Reply-To: <20120516064458.32286.37948.sendpatchset@w520>

On Wed, May 16, 2012 at 03:44:58PM +0900, Magnus Damm wrote:
> +static int emev2_gclk_enable(struct clk *clk)
> +{
> +	iowrite32(ioread32(clk->mapped_reg) | (1 << clk->enable_bit),
> +		  clk->mapped_reg);
> +	return 0;
> +}
> +
> +static void emev2_gclk_disable(struct clk *clk)
> +{
> +	iowrite32(ioread32(clk->mapped_reg) & ~(1 << clk->enable_bit),
> +		  clk->mapped_reg);
> +}
> +
> +static struct sh_clk_ops emev2_gclk_clk_ops = {
> +	.enable		= emev2_gclk_enable,
> +	.disable	= emev2_gclk_disable,
> +	.recalc		= followparent_recalc,
> +};
> +
> +static int __init emev2_gclk_register(struct clk *clks, int nr)
> +{
> +	struct clk *clkp;
> +	int ret = 0;
> +	int k;
> +
> +	for (k = 0; !ret && (k < nr); k++) {
> +		clkp = clks + k;
> +		clkp->ops = &emev2_gclk_clk_ops;
> +		ret |= clk_register(clkp);
> +	}
> +
> +	return ret;
> +}
> +
This all looks like a pointless abstraction. This is basically a verbatim
copy of the sh_clk_mstp32 routines.

I suppose this is a case where you want to use the mstp32 routines but
don't specifically have div4/div6 clocks to manage so you aren't setting
SH_CLK_CPG. Perhaps we should just move the sh_clk_mstp32 stuff out so
it's provided regardless of the CPG setting and rename it to drop the
mstp32 connotations. It's really only the div4/div6 stuff that has any
CPG-specific behaviour at this point anyways.

  reply	other threads:[~2012-05-16  6:56 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-16  6:44 [PATCH 00/08] mach-shmobile: Emma Mobile EV2 support V3 Magnus Damm
2012-05-16  6:44 ` [PATCH 01/08] mach-shmobile: Emma Mobile EV2 SoC base " Magnus Damm
2012-05-16  6:56   ` Paul Mundt [this message]
2012-05-16  9:49     ` Magnus Damm
2012-05-16  6:45 ` [PATCH 02/08] ARM: Undelete KZM9D mach-type V3 Magnus Damm
2012-05-16  6:45 ` [PATCH 03/08] mach-shmobile: KZM9D board support V3 Magnus Damm
2012-05-16  6:45 ` [PATCH 04/08] mach-shmobile: Emma Mobile EV2 SMP " Magnus Damm
2012-05-16  6:45 ` [PATCH 05/08] mach-shmobile: Emma Mobile EV2 GPIO " Magnus Damm
2012-05-16  6:45 ` [PATCH 06/08] mach-shmobile: KZM9D board Ethernet " Magnus Damm
2012-05-16  6:45 ` [PATCH 07/08] mach-shmobile: Emma Mobile EV2 DT " Magnus Damm
2012-05-16  6:46 ` [PATCH 08/08] mach-shmobile: Use DT_MACHINE for KZM9D V3 Magnus Damm
2012-05-18  1:44 ` [PATCH 00/08] mach-shmobile: Emma Mobile EV2 support V3 Simon Horman
2012-05-18  3:30   ` Simon Horman
2012-05-18  3:40   ` Magnus Damm
2012-05-18  4:46     ` Simon Horman
2012-06-11  3:55 ` Paul Mundt

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=20120516065625.GM7988@linux-sh.org \
    --to=lethal@linux-sh.org \
    --cc=linux-arm-kernel@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;
as well as URLs for NNTP newsgroup(s).