Go to the documentation of this file.
33 #ifndef CLK_ALTERA_A10_FPLL_H_
34 #define CLK_ALTERA_A10_FPLL_H_
uint32_t timeout
Definition: ad413x.c:49
void altera_a10_release_arbitration(struct altera_a10_fpll *fpll, bool run_calibration)
altera_a10_release_arbitration
Definition: clk_altera_a10_fpll.c:127
int32_t altera_a10_fpll_enable(struct altera_a10_fpll *fpll)
altera_a10_fpll_enable
Definition: clk_altera_a10_fpll.c:448
#define no_os_min_t(type, x, y)
Definition: no_os_util.h:61
void altera_a10_fpll_write(struct altera_a10_fpll *fpll, uint32_t addr, uint32_t val)
altera_a10_fpll_write
Definition: clk_altera_a10_fpll.c:82
int32_t altera_a10_fpll_set_rate(struct altera_a10_fpll *fpll, uint32_t rate)
altera_a10_fpll_set_rate
Definition: clk_altera_a10_fpll.c:340
int32_t altera_a10_fpll_enable(struct altera_a10_fpll *fpll)
altera_a10_fpll_enable
Definition: clk_altera_a10_fpll.c:448
uint32_t altera_a10_acquire_arbitration(struct altera_a10_fpll *fpll)
altera_a10_acquire_arbitration
Definition: clk_altera_a10_fpll.c:105
int32_t altera_a10_fpll_calc_params(uint32_t fref, uint32_t fout, uint32_t *best_n, uint32_t *best_m, uint32_t *best_c0, uint32_t *best_fvco)
altera_a10_fpll_calc_params
Definition: clk_altera_a10_fpll.c:238
#define FPLL_REG_DIV_COUNTER0
Definition: clk_altera_a10_fpll.c:58
int32_t altera_a10_fpll_remove(struct altera_a10_fpll *fpll)
altera_a10_fpll_remove
Definition: clk_altera_a10_fpll.c:487
#define FPLL_REG_C_COUNTER2
Definition: clk_altera_a10_fpll.c:54
#define NO_OS_DIV_ROUND_CLOSEST_ULL(x, y)
Definition: no_os_util.h:56
#define FPLL_REG_DIV_COUNTER1
Definition: clk_altera_a10_fpll.c:59
uint32_t parent_rate
Definition: clk_altera_a10_fpll.h:47
const char * name
Definition: clk_altera_a10_fpll.h:52
int32_t altera_a10_fpll_pll_calibration_check(struct altera_a10_fpll *fpll)
altera_a10_fpll_pll_calibration_check
Definition: clk_altera_a10_fpll.c:314
int32_t altera_a10_fpll_set_rate(struct altera_a10_fpll *fpll, uint32_t rate)
altera_a10_fpll_set_rate
Definition: clk_altera_a10_fpll.c:340
#define A10_FPLL_PFD_MIN
Definition: clk_altera_a10_fpll.c:61
int32_t altera_a10_fpll_remove(struct altera_a10_fpll *fpll)
altera_a10_fpll_remove
Definition: clk_altera_a10_fpll.c:487
int32_t altera_a10_fpll_lookup_cp_current(uint32_t fvco, uint32_t m)
altera_a10_fpll_lookup_cp_current
Definition: clk_altera_a10_fpll.c:176
uint32_t altera_a10_fpll_read(struct altera_a10_fpll *fpll, uint32_t addr)
altera_a10_fpll_read
Definition: clk_altera_a10_fpll.c:73
#define NO_OS_DIV_ROUND_UP(x, y)
Definition: no_os_util.h:52
#define FPLL_REG_C_COUNTER3
Definition: clk_altera_a10_fpll.c:55
uint32_t altera_a10_fpll_lookup_lf_resistance(uint32_t fvco, uint32_t m)
altera_a10_fpll_lookup_lf_resistance
Definition: clk_altera_a10_fpll.c:136
#define A10_FPLL_VCO_MAX
Definition: clk_altera_a10_fpll.c:64
uint32_t parent_rate
Definition: clk_altera_a10_fpll.h:54
int32_t altera_a10_fpll_round_rate(struct altera_a10_fpll *fpll, uint32_t rate)
altera_a10_fpll_round_rate
Definition: clk_altera_a10_fpll.c:293
Driver for the Altera FPLL.
const char * name
Definition: clk_altera_a10_fpll.h:45
#define A10_FPLL_VCO_MIN
Definition: clk_altera_a10_fpll.c:63
void * no_os_malloc(size_t size)
Allocate memory and return a pointer to it.
Definition: chibios_alloc.c:43
#define no_os_clamp_t(type, val, min_val, max_val)
Definition: no_os_util.h:71
void altera_a10_fpll_disable(struct altera_a10_fpll *fpll)
altera_a10_fpll_disable
Definition: clk_altera_a10_fpll.c:458
#define no_os_max_t(type, x, y)
Definition: no_os_util.h:66
Definition: clk_altera_a10_fpll.h:51
#define NO_OS_BIT(x)
Definition: no_os_util.h:45
void no_os_free(void *ptr)
Deallocate memory previously allocated by a call to no_os_calloc or no_os_malloc.
Definition: chibios_alloc.c:69
#define A10_FPLL_PFD_MAX
Definition: clk_altera_a10_fpll.c:62
uint32_t altera_a10_fpll_recalc_rate(struct altera_a10_fpll *fpll)
altera_a10_fpll_recalc_rate
Definition: clk_altera_a10_fpll.c:397
bool initial_recalc
Definition: clk_altera_a10_fpll.h:48
int32_t altera_a10_fpll_init(struct altera_a10_fpll **a10_fpll, const struct altera_a10_fpll_init *init)
altera_a10_fpll_init
Definition: clk_altera_a10_fpll.c:466
void no_os_udelay(uint32_t usecs)
Wait until usecs microseconds passed.
Definition: aducm3029_delay.c:114
Definition: clk_altera_a10_fpll.h:44
int32_t altera_a10_fpll_init(struct altera_a10_fpll **a10_fpll, const struct altera_a10_fpll_init *init)
altera_a10_fpll_init
Definition: clk_altera_a10_fpll.c:466
#define no_os_round_up(x, y)
Definition: no_os_util.h:77
void altera_a10_fpll_disable(struct altera_a10_fpll *fpll)
altera_a10_fpll_disable
Definition: clk_altera_a10_fpll.c:458
Header file of utility functions.
uint32_t base
Definition: clk_altera_a10_fpll.h:46
uint32_t base
Definition: clk_altera_a10_fpll.h:53
void altera_a10_fpll_update(struct altera_a10_fpll *fpll, uint32_t addr, uint32_t mask, uint32_t val)
altera_a10_fpll_update
Definition: clk_altera_a10_fpll.c:91
#define NO_OS_DIV_ROUND_CLOSEST(x, y)
Definition: no_os_util.h:54
int32_t altera_a10_fpll_is_enabled(struct altera_a10_fpll *fpll)
altera_a10_fpll_is_enabled
Definition: clk_altera_a10_fpll.c:440
#define FPLL_REG_C_COUNTER4
Definition: clk_altera_a10_fpll.c:56