diff options
author | Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> | 2011-08-08 23:17:15 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2011-08-10 14:53:06 +0200 |
commit | e18df20c902b83f7526fd62a27c0f6a2d67df3cb (patch) | |
tree | 92480fee3be0506aeeb95d743793d99f1ea32cfa | |
parent | 41452449754c473e32c56147f915fed660cd3071 (diff) | |
download | barebox-e18df20c902b83f7526fd62a27c0f6a2d67df3cb.tar.gz barebox-e18df20c902b83f7526fd62a27c0f6a2d67df3cb.tar.xz |
nomadik: switch to static allocation clkdev
as we need to register it before the device
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r-- | arch/arm/mach-nomadik/8815.c | 13 | ||||
-rw-r--r-- | 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 bcc34062b5..3138045190 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 04b37a8980..a9092a213d 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 |