Stephen Boyd | 49fc825 | 2014-03-21 17:59:37 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2014, The Linux Foundation. All rights reserved. |
| 3 | * |
| 4 | * This software is licensed under the terms of the GNU General Public |
| 5 | * License version 2, as published by the Free Software Foundation, and |
| 6 | * may be copied, distributed, and modified under those terms. |
| 7 | * |
| 8 | * This program is distributed in the hope that it will be useful, |
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 11 | * GNU General Public License for more details. |
| 12 | */ |
| 13 | #ifndef __QCOM_CLK_COMMON_H__ |
| 14 | #define __QCOM_CLK_COMMON_H__ |
| 15 | |
| 16 | struct platform_device; |
| 17 | struct regmap_config; |
| 18 | struct clk_regmap; |
| 19 | struct qcom_reset_map; |
Stephen Boyd | 5b6b749 | 2014-07-15 14:59:21 -0700 | [diff] [blame] | 20 | struct regmap; |
Stephen Boyd | 50c6a50 | 2014-09-04 13:21:50 -0700 | [diff] [blame] | 21 | struct freq_tbl; |
Georgi Djakov | 293d2e97 | 2015-03-20 18:30:26 +0200 | [diff] [blame] | 22 | struct clk_hw; |
| 23 | struct parent_map; |
Stephen Boyd | 49fc825 | 2014-03-21 17:59:37 -0700 | [diff] [blame] | 24 | |
| 25 | struct qcom_cc_desc { |
| 26 | const struct regmap_config *config; |
| 27 | struct clk_regmap **clks; |
| 28 | size_t num_clks; |
| 29 | const struct qcom_reset_map *resets; |
| 30 | size_t num_resets; |
| 31 | }; |
| 32 | |
Stephen Boyd | 50c6a50 | 2014-09-04 13:21:50 -0700 | [diff] [blame] | 33 | extern const struct freq_tbl *qcom_find_freq(const struct freq_tbl *f, |
| 34 | unsigned long rate); |
Georgi Djakov | 293d2e97 | 2015-03-20 18:30:26 +0200 | [diff] [blame] | 35 | extern int qcom_find_src_index(struct clk_hw *hw, const struct parent_map *map, |
| 36 | u8 src); |
Stephen Boyd | 50c6a50 | 2014-09-04 13:21:50 -0700 | [diff] [blame] | 37 | |
Stephen Boyd | 5b6b749 | 2014-07-15 14:59:21 -0700 | [diff] [blame] | 38 | extern struct regmap *qcom_cc_map(struct platform_device *pdev, |
| 39 | const struct qcom_cc_desc *desc); |
| 40 | extern int qcom_cc_really_probe(struct platform_device *pdev, |
| 41 | const struct qcom_cc_desc *desc, |
| 42 | struct regmap *regmap); |
Stephen Boyd | 49fc825 | 2014-03-21 17:59:37 -0700 | [diff] [blame] | 43 | extern int qcom_cc_probe(struct platform_device *pdev, |
| 44 | const struct qcom_cc_desc *desc); |
| 45 | |
| 46 | extern void qcom_cc_remove(struct platform_device *pdev); |
| 47 | |
| 48 | #endif |