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 @@ 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