mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
To: barebox@lists.infradead.org
Subject: [PATCH 4/5] nomadik: switch to static allocation clkdev
Date: Mon,  8 Aug 2011 23:17:15 +0200	[thread overview]
Message-ID: <1312838236-646-4-git-send-email-plagnioj@jcrosoft.com> (raw)
In-Reply-To: <1312838236-646-1-git-send-email-plagnioj@jcrosoft.com>

as we need to register it before the device

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
---
 arch/arm/mach-nomadik/8815.c                |   13 +++++++++++++
 arch/arm/mach-nomadik/include/mach/clkdev.h |    6 ++++++
 2 files changed, 19 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-nomadik/8815.c b/arch/arm/mach-nomadik/8815.c
index bcc3406..3138045 100644
--- a/arch/arm/mach-nomadik/8815.c
+++ b/arch/arm/mach-nomadik/8815.c
@@ -36,6 +36,19 @@ void st8815_add_device_sdram(u32 size)
 	arm_add_mem_device("ram0", 0x00000000, size);
 }
 
+static struct clk_lookup clocks_lookups[] = {
+	CLKDEV_CON_ID("uart-pl0110", &st8815_clk_48),
+	CLKDEV_CON_ID("uart-pl0111", &st8815_clk_48),
+};
+
+static int st8815_clkdev_init(void)
+{
+	clkdev_add_table(clocks_lookups, ARRAY_SIZE(clocks_lookups));
+
+	return 0;
+}
+postcore_initcall(st8815_clkdev_init);
+
 void st8815_register_uart(unsigned id)
 {
 	resource_size_t start;
diff --git a/arch/arm/mach-nomadik/include/mach/clkdev.h b/arch/arm/mach-nomadik/include/mach/clkdev.h
index 04b37a8..a9092a2 100644
--- a/arch/arm/mach-nomadik/include/mach/clkdev.h
+++ b/arch/arm/mach-nomadik/include/mach/clkdev.h
@@ -4,4 +4,10 @@
 #define __clk_get(clk) ({ 1; })
 #define __clk_put(clk) do { } while (0)
 
+#define CLKDEV_CON_ID(_id, _clk)			\
+	{						\
+		.con_id = _id,				\
+		.clk = _clk,				\
+	}
+
 #endif
-- 
1.7.5.4


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  parent reply	other threads:[~2011-08-08 21:35 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-08 21:17 [PATCH 1/5] at91: swtich to clkdev Jean-Christophe PLAGNIOL-VILLARD
2011-08-08 21:17 ` [PATCH 2/5] arm_dcc: fix missing switch to resource Jean-Christophe PLAGNIOL-VILLARD
2011-08-10  7:30   ` Sascha Hauer
2011-08-10 10:44     ` Jean-Christophe PLAGNIOL-VILLARD
2011-08-10 12:53       ` Sascha Hauer
2011-08-10 17:38         ` Jean-Christophe PLAGNIOL-VILLARD
2011-08-11 15:05         ` Jean-Christophe PLAGNIOL-VILLARD
2011-08-08 21:17 ` [PATCH 3/5] at91sam9261ek: fix missing ecc type Jean-Christophe PLAGNIOL-VILLARD
2011-08-08 21:17 ` Jean-Christophe PLAGNIOL-VILLARD [this message]
2011-08-08 21:17 ` [PATCH 5/5] versatilek: switch to static allocation clkdev Jean-Christophe PLAGNIOL-VILLARD

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=1312838236-646-4-git-send-email-plagnioj@jcrosoft.com \
    --to=plagnioj@jcrosoft.com \
    --cc=barebox@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