diff options
author | Simon Horman <horms+renesas@verge.net.au> | 2013-04-02 11:08:34 +0900 |
---|---|---|
committer | Simon Horman <horms+renesas@verge.net.au> | 2013-04-02 11:08:34 +0900 |
commit | 809609a5d8427b0025304dbb69a84a692d11c4f9 (patch) | |
tree | 95a544cda32d36e4a9ee1ce27c527406c54d91b4 /arch/arm/mach-shmobile/include/mach/clock.h | |
parent | a4339a9cb46644e19278e4dd5d89b262a37cb0b0 (diff) | |
parent | 8585deb18580d04209a2986430aa0959ef38fce2 (diff) | |
download | talos-op-linux-809609a5d8427b0025304dbb69a84a692d11c4f9.tar.gz talos-op-linux-809609a5d8427b0025304dbb69a84a692d11c4f9.zip |
Merge branch 'soc' into pinmux-base
Conflicts:
drivers/pinctrl/sh-pfc/pfc-r8a7740.c
This merge is to provide r8a73a4 SoC files, which are added in the
soc branch and depended on by r8a73a4 pfc-changes which are to
be added to the pinmux branch.
Diffstat (limited to 'arch/arm/mach-shmobile/include/mach/clock.h')
-rw-r--r-- | arch/arm/mach-shmobile/include/mach/clock.h | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/arch/arm/mach-shmobile/include/mach/clock.h b/arch/arm/mach-shmobile/include/mach/clock.h new file mode 100644 index 000000000000..76ac61292e48 --- /dev/null +++ b/arch/arm/mach-shmobile/include/mach/clock.h @@ -0,0 +1,39 @@ +#ifndef CLOCK_H +#define CLOCK_H + +unsigned long shmobile_fixed_ratio_clk_recalc(struct clk *clk); +extern struct sh_clk_ops shmobile_fixed_ratio_clk_ops; + +/* clock ratio */ +struct clk_ratio { + int mul; + int div; +}; + +#define SH_CLK_RATIO(name, m, d) \ +static struct clk_ratio name ##_ratio = { \ + .mul = m, \ + .div = d, \ +} + +#define SH_FIXED_RATIO_CLKg(name, p, r) \ +struct clk name = { \ + .parent = &p, \ + .ops = &shmobile_fixed_ratio_clk_ops,\ + .priv = &r ## _ratio, \ +} + +#define SH_FIXED_RATIO_CLK(name, p, r) \ +static SH_FIXED_RATIO_CLKg(name, p, r); + +#define SH_FIXED_RATIO_CLK_SET(name, p, m, d) \ + SH_CLK_RATIO(name, m, d); \ + SH_FIXED_RATIO_CLK(name, p, name); + +#define SH_CLK_SET_RATIO(p, m, d) \ +{ \ + (p)->mul = m; \ + (p)->div = d; \ +} + +#endif |