2 * linux/arch/h8300/kernel/clk.c
4 * Copyright 2015 Yoshinori Sato <ysato@users.sourceforge.jp>
8 #include <linux/module.h>
9 #include <linux/compiler.h>
10 #include <linux/clkdev.h>
13 unsigned long clk_get_rate(struct clk *clk)
15 return clk->parent->rate;
17 EXPORT_SYMBOL(clk_get_rate)
19 int clk_enable(struct clk *clk)
23 EXPORT_SYMBOL(clk_enable)
25 void clk_disable(struct clk *clk)
28 EXPORT_SYMBOL(clk_disable)
30 static struct clk master_clk;
32 static struct clk peripheral_clk = {
33 .parent = &master_clk,
36 static struct clk_lookup lookups[] = {
38 .con_id = "master_clk",
42 .con_id = "peripheral_clk",
43 .clk = &peripheral_clk,
47 int __init h8300_clk_init(unsigned long hz)
50 clkdev_add_table(lookups, ARRAY_SIZE(lookups));