[PATCH RFC v2 2/4] clk: thead: Add support for T-Head TH1520 AP_SUBSYS clocks
Thomas Bonnefille
thomas.bonnefille at bootlin.com
Thu May 2 00:47:46 PDT 2024
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 at vivo.com>
> Signed-off-by: Yangtao Li <frank.li at vivo.com>
> Co-developed-by: Jisheng Zhang <jszhang at kernel.org>
> Signed-off-by: Jisheng Zhang <jszhang at kernel.org>
> Signed-off-by: Drew Fustini <dfustini at tenstorrent.com>
> ...
> +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
More information about the linux-riscv
mailing list