From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/6] U6715 clocks gating management U6 clock generic driver & U6715 cgu clock specific
Date: Thu, 15 Jul 2010 12:27:14 +0100 [thread overview]
Message-ID: <20100715112714.GC29322@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <1278688913-26417-3-git-send-email-philippe.langlais@stericsson.com>
On Fri, Jul 09, 2010 at 05:21:49PM +0200, Philippe Langlais wrote:
> diff --git a/arch/arm/mach-u67xx/Makefile b/arch/arm/mach-u67xx/Makefile
> index 38cf624..8c1dad8 100644
> --- a/arch/arm/mach-u67xx/Makefile
> +++ b/arch/arm/mach-u67xx/Makefile
> @@ -5,7 +5,10 @@
> ## Object file lists.
>
> # Common support
> -obj-y := devices.o
> +obj-y := devices.o cgu.o
> +
> +# Specific machine support
> +obj-$(CONFIG_ARCH_U67XX) += clock_data_u67xx.o
Aren't we already using this makefile because CONFIG_ARCH_U67XX is set?
> +int u6_clk_set_parent_uart(struct clk *clk, struct clk *parent)
> +{
> +
> + if (!strcmp(parent->name, "pclk2_ck")) {
> + clk->parent = parent;
> + return 0;
> + } else if (!strcmp(parent->name, "clk26m_ck")) {
> + clk->parent = parent;
> + return 0;
> + } else if (!strcmp(parent->name, "clk13m_ck")) {
> + clk->parent = parent;
> + return 0;
> + } else {
> + return -1;
Ouch. This will cause clk_set_parent() to return -1, which is -EPERM.
I don't think you mean "operation not permitted". Maybe -ENOENT, -ENXIO,
or -EINVAL would be more appropriate?
> +/*
> + * Standard clock functions defined in include/linux/clk.h
> + */
> +int clk_enable(struct clk *clk)
> +{
> + unsigned long flags;
> + int ret = 0;
> +
> + if (clk == ERR_PTR(-ENOENT))
> + return -EINVAL;
> +
> + spin_lock_irqsave(&clockfw_lock, flags);
> + if (arch_clock->clk_enable)
> + ret = arch_clock->clk_enable(clk);
> + spin_unlock_irqrestore(&clockfw_lock, flags);
Hmm. This looks like it's been modelled on OMAP.
Wouldn't it be better to move some of the U67xx stuff into here,
such as the use-count tracking - rather than having each sub-arch
reimplement it?
next prev parent reply other threads:[~2010-07-15 11:27 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-09 15:21 The first 3 patches for U6715 after review Philippe Langlais
2010-07-09 15:21 ` [PATCH 1/6] U6/U6715 ARM architecture files Philippe Langlais
2010-07-15 11:17 ` Russell King - ARM Linux
2010-07-16 13:04 ` Philippe Langlais
2010-07-09 15:21 ` [PATCH 2/6] U6715 clocks gating management U6 clock generic driver & U6715 cgu clock specific Philippe Langlais
2010-07-15 11:27 ` Russell King - ARM Linux [this message]
2010-07-19 8:34 ` Vincent GUITTOT
2010-07-09 15:21 ` [PATCH 3/6] U6715 gpio platform driver This driver is U6XXX platform generic Philippe Langlais
2010-07-15 11:18 ` Russell King - ARM Linux
2010-07-16 13:09 ` Philippe Langlais
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=20100715112714.GC29322@n2100.arm.linux.org.uk \
--to=linux@arm.linux.org.uk \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.