linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: dbaryshkov@gmail.com (Dmitry Eremin-Solenikov)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 3/4] ARM: sa1100: provide OSTIMER0 clock for pxa_timer
Date: Tue,  2 Dec 2014 02:47:25 +0300	[thread overview]
Message-ID: <1417477646-14278-4-git-send-email-dbaryshkov@gmail.com> (raw)
In-Reply-To: <1417477646-14278-1-git-send-email-dbaryshkov@gmail.com>

Pxa_timer clocksource requires OSTIMER0 clock to be provided.
Add dummy clock returning proper rate.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
---
 arch/arm/mach-sa1100/clock.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/arch/arm/mach-sa1100/clock.c b/arch/arm/mach-sa1100/clock.c
index 9434766..32fc5ab 100644
--- a/arch/arm/mach-sa1100/clock.c
+++ b/arch/arm/mach-sa1100/clock.c
@@ -97,9 +97,21 @@ const struct clkops clk_gpio27_ops = {
 
 static DEFINE_CLK(gpio27, &clk_gpio27_ops);
 
+static unsigned long clk_36864_get_rate(struct clk *clk)
+{
+	return 36864000;
+}
+
+static struct clkops clk_36864_ops = {
+	.get_rate	= clk_36864_get_rate,
+};
+
+static DEFINE_CLK(36864, &clk_36864_ops);
+
 static struct clk_lookup sa11xx_clkregs[] = {
 	CLKDEV_INIT("sa1111.0", NULL, &clk_gpio27),
 	CLKDEV_INIT("sa1100-rtc", NULL, NULL),
+	CLKDEV_INIT(NULL, "OSTIMER0", &clk_36864),
 };
 
 static int __init sa11xx_clk_init(void)
-- 
2.1.3

  parent reply	other threads:[~2014-12-01 23:47 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-01 23:47 [PATCH v2 0/4] ARM: sa100: use pxa_timer clocksource driver Dmitry Eremin-Solenikov
2014-12-01 23:47 ` [PATCH v2 1/4] clocksource: enable pxa_timer for SA-1100 platform Dmitry Eremin-Solenikov
2014-12-01 23:47 ` [PATCH v2 2/4] ARM: sa1100: implement clk_get_rate Dmitry Eremin-Solenikov
2014-12-01 23:47 ` Dmitry Eremin-Solenikov [this message]
2014-12-01 23:47 ` [PATCH v2 4/4] ARM: sa1100: use pxa_timer clocksource driver Dmitry Eremin-Solenikov

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=1417477646-14278-4-git-send-email-dbaryshkov@gmail.com \
    --to=dbaryshkov@gmail.com \
    --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).