On 4/27/24 2:10 AM, Drew Fustini wrote:
Add support for the AP sub-system clock controller in the T-Head TH1520. This include CPU, DPU, GMAC and TEE PLLs. Link: https://openbeagle.org/beaglev-ahead/beaglev-ahead/-/blob/main/docs/TH1520%20System%20User%20Manual.pdf Co-developed-by: Yangtao Li <frank.li@xxxxxxxx> Signed-off-by: Yangtao Li <frank.li@xxxxxxxx> Co-developed-by: Jisheng Zhang <jszhang@xxxxxxxxxx> Signed-off-by: Jisheng Zhang <jszhang@xxxxxxxxxx> Signed-off-by: Drew Fustini <dfustini@xxxxxxxxxxxxxxx>
...
+void ccu_disable_helper(struct ccu_common *common, u32 gate) +{ + if (!gate) + return; + + regmap_update_bits(common->map, common->reg, + gate, ~gate); +} + +int ccu_enable_helper(struct ccu_common *common, u32 gate) +{ + if (!gate) + return 0; + + return regmap_update_bits(common->map, common->reg, + gate, gate); +} +
Both of those functions are only used in this file, you should probably make them static because otherwise, the compilation process will prompt a "missing prototype" warning.
Thomas