mirror of
https://github.com/torvalds/linux.git
synced 2024-12-22 19:01:37 +00:00
5b6b7490af
Sometimes we need to program PLLs with a fixed rate
configuration during driver probe. Doing this after we register
the PLLs with the clock framework causes the common clock
framework to assume the rate of the PLLs are 0. This causes all
sorts of problems for rate recalculations because the common
clock framework caches the rate once at registration time unless
a flag is set to always recalculate the rates.
Split the qcom_cc_probe() function into two pieces, map and
everything else, so that drivers which need to configure some
PLL rates or otherwise twiddle bits in the clock controller can
do so before registering clocks. This allows us to properly
detect the rates of PLLs that are programmed at boot.
Fixes: 49fc825f0c
"clk: qcom: Consolidate common probe code"
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
41 lines
1.2 KiB
C
41 lines
1.2 KiB
C
/*
|
|
* Copyright (c) 2014, The Linux Foundation. All rights reserved.
|
|
*
|
|
* This software is licensed under the terms of the GNU General Public
|
|
* License version 2, as published by the Free Software Foundation, and
|
|
* may be copied, distributed, and modified under those terms.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*/
|
|
#ifndef __QCOM_CLK_COMMON_H__
|
|
#define __QCOM_CLK_COMMON_H__
|
|
|
|
struct platform_device;
|
|
struct regmap_config;
|
|
struct clk_regmap;
|
|
struct qcom_reset_map;
|
|
struct regmap;
|
|
|
|
struct qcom_cc_desc {
|
|
const struct regmap_config *config;
|
|
struct clk_regmap **clks;
|
|
size_t num_clks;
|
|
const struct qcom_reset_map *resets;
|
|
size_t num_resets;
|
|
};
|
|
|
|
extern struct regmap *qcom_cc_map(struct platform_device *pdev,
|
|
const struct qcom_cc_desc *desc);
|
|
extern int qcom_cc_really_probe(struct platform_device *pdev,
|
|
const struct qcom_cc_desc *desc,
|
|
struct regmap *regmap);
|
|
extern int qcom_cc_probe(struct platform_device *pdev,
|
|
const struct qcom_cc_desc *desc);
|
|
|
|
extern void qcom_cc_remove(struct platform_device *pdev);
|
|
|
|
#endif
|