2 * Copyright (c) 2015, Linaro Limited
3 * Copyright (c) 2014, The Linux Foundation. All rights reserved.
5 * This software is licensed under the terms of the GNU General Public
6 * License version 2, as published by the Free Software Foundation, and
7 * may be copied, distributed, and modified under those terms.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
15 #ifndef __QCOM_CLK_RPM_H__
16 #define __QCOM_CLK_RPM_H__
18 #include <linux/clk-provider.h>
31 extern const struct clk_ops clk_rpm_ops;
32 extern const struct clk_ops clk_rpm_branch_ops;
34 #define DEFINE_CLK_RPM(_platform, _name, r_id) \
35 static struct clk_rpm _platform##_##_name = { \
36 .rpm_clk_id = (r_id), \
38 .hw.init = &(struct clk_init_data){ \
40 .parent_names = (const char *[]){ "pxo_board" }, \
42 .ops = &clk_rpm_ops, \
46 #define DEFINE_CLK_RPM_PXO_BRANCH(_platform, _name, r_id, r) \
47 static struct clk_rpm _platform##_##_name = { \
48 .rpm_clk_id = (r_id), \
51 .hw.init = &(struct clk_init_data){ \
53 .parent_names = (const char *[]){ "pxo_board" }, \
55 .ops = &clk_rpm_branch_ops, \
59 #define DEFINE_CLK_RPM_CXO_BRANCH(_platform, _name, r_id, r) \
60 static struct clk_rpm _platform##_##_name = { \
61 .rpm_clk_id = (r_id), \
64 .hw.init = &(struct clk_init_data){ \
66 .parent_names = (const char *[]){ "cxo_board" }, \
68 .ops = &clk_rpm_branch_ops, \