blob: 071ef377c1b86121b7f0a455a1b8288f292a3e3e [file] [log] [blame]
Xiaohu.Huanga2c5a042022-03-12 22:41:09 +08001/*
2 * Copyright (c) 2021-2022 Amlogic, Inc. All rights reserved.
3 *
4 * SPDX-License-Identifier: MIT
5 */
6
7#ifndef _CLK_H_
8#define _CLK_H_
9
10#ifdef __cplusplus
11extern "C" {
12#endif
13
xiaohu.huang38262102022-05-06 22:21:48 +080014enum PLL_TYPE {
Xiaohu.Huanga2c5a042022-03-12 22:41:09 +080015 PLL_SYS,
16 PLL_GP0,
17 PLL_GP1,
18 PLL_FIX,
19 PLL_HIFI,
20 PLL_RTC,
21 PLL_DDR
xiaohu.huang38262102022-05-06 22:21:48 +080022};
Xiaohu.Huanga2c5a042022-03-12 22:41:09 +080023
24void disable_pll(int id);
25void set_time(uint32_t val);
26uint32_t get_time(void);
27void alt_timebase(int use_clk_src);
28void set_sys_div_clk(int sel, int div);
29void set_axi_div_clk(int sel, int div);
30void clk_util_set_dsp_clk(uint32_t id, uint32_t freq_sel);
31
32#ifdef __cplusplus
33}
34#endif
35#endif