mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-26 14:05:46 +07:00
7a9ad671ac
It turns out that all platforms using the ICST VCO are really just touching two registers, and in the same way as well: one register with the VCO configuration as such, and one lock register that makes it possible to write to the VCO. Factor this register read/write into the ICST driver so we can reuse it in the IM-PD1 driver. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Mike Turquette <mturquette@linaro.org>
19 lines
501 B
C
19 lines
501 B
C
#include <asm/hardware/icst.h>
|
|
|
|
/**
|
|
* struct clk_icst_desc - descriptor for the ICST VCO
|
|
* @params: ICST parameters
|
|
* @vco_offset: offset to the ICST VCO from the provided memory base
|
|
* @lock_offset: offset to the ICST VCO locking register from the provided
|
|
* memory base
|
|
*/
|
|
struct clk_icst_desc {
|
|
const struct icst_params *params;
|
|
u32 vco_offset;
|
|
u32 lock_offset;
|
|
};
|
|
|
|
struct clk *icst_clk_register(struct device *dev,
|
|
const struct clk_icst_desc *desc,
|
|
void __iomem *base);
|