Go to the documentation of this file.
39 #ifndef CLK_ALTERA_A10_FPLL_H_
40 #define CLK_ALTERA_A10_FPLL_H_
uint32_t timeout
Definition: ad413x.c:55
void altera_a10_release_arbitration(struct altera_a10_fpll *fpll, bool run_calibration)
altera_a10_release_arbitration
Definition: clk_altera_a10_fpll.c:133
int32_t altera_a10_fpll_enable(struct altera_a10_fpll *fpll)
altera_a10_fpll_enable
Definition: clk_altera_a10_fpll.c:454
#define no_os_min_t(type, x, y)
Definition: no_os_util.h:67
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:88
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:346
int32_t altera_a10_fpll_enable(struct altera_a10_fpll *fpll)
altera_a10_fpll_enable
Definition: clk_altera_a10_fpll.c:454
uint32_t altera_a10_acquire_arbitration(struct altera_a10_fpll *fpll)
altera_a10_acquire_arbitration
Definition: clk_altera_a10_fpll.c:111
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:244
#define FPLL_REG_DIV_COUNTER0
Definition: clk_altera_a10_fpll.c:64
int32_t altera_a10_fpll_remove(struct altera_a10_fpll *fpll)
altera_a10_fpll_remove
Definition: clk_altera_a10_fpll.c:493
#define FPLL_REG_C_COUNTER2
Definition: clk_altera_a10_fpll.c:60
#define NO_OS_DIV_ROUND_CLOSEST_ULL(x, y)
Definition: no_os_util.h:62
#define FPLL_REG_DIV_COUNTER1
Definition: clk_altera_a10_fpll.c:65
uint32_t parent_rate
Definition: clk_altera_a10_fpll.h:53
const char * name
Definition: clk_altera_a10_fpll.h:58
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:320
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:346
#define A10_FPLL_PFD_MIN
Definition: clk_altera_a10_fpll.c:67
int32_t altera_a10_fpll_remove(struct altera_a10_fpll *fpll)
altera_a10_fpll_remove
Definition: clk_altera_a10_fpll.c:493
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:182
uint32_t altera_a10_fpll_read(struct altera_a10_fpll *fpll, uint32_t addr)
altera_a10_fpll_read
Definition: clk_altera_a10_fpll.c:79
#define NO_OS_DIV_ROUND_UP(x, y)
Definition: no_os_util.h:58
#define FPLL_REG_C_COUNTER3
Definition: clk_altera_a10_fpll.c:61
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:142
#define A10_FPLL_VCO_MAX
Definition: clk_altera_a10_fpll.c:70
uint32_t parent_rate
Definition: clk_altera_a10_fpll.h:60
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:299
Driver for the Altera FPLL.
const char * name
Definition: clk_altera_a10_fpll.h:51
#define A10_FPLL_VCO_MIN
Definition: clk_altera_a10_fpll.c:69
void * no_os_malloc(size_t size)
Allocate memory and return a pointer to it.
Definition: chibios_alloc.c:49
#define no_os_clamp_t(type, val, min_val, max_val)
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:464
#define no_os_max_t(type, x, y)
Definition: no_os_util.h:72
Definition: clk_altera_a10_fpll.h:57
#define NO_OS_BIT(x)
Definition: no_os_util.h:51
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:75
#define A10_FPLL_PFD_MAX
Definition: clk_altera_a10_fpll.c:68
uint32_t altera_a10_fpll_recalc_rate(struct altera_a10_fpll *fpll)
altera_a10_fpll_recalc_rate
Definition: clk_altera_a10_fpll.c:403
bool initial_recalc
Definition: clk_altera_a10_fpll.h:54
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:472
void no_os_udelay(uint32_t usecs)
Wait until usecs microseconds passed.
Definition: aducm3029_delay.c:120
Definition: clk_altera_a10_fpll.h:50
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:472
#define no_os_round_up(x, y)
Definition: no_os_util.h:83
void altera_a10_fpll_disable(struct altera_a10_fpll *fpll)
altera_a10_fpll_disable
Definition: clk_altera_a10_fpll.c:464
Header file of utility functions.
uint32_t base
Definition: clk_altera_a10_fpll.h:52
uint32_t base
Definition: clk_altera_a10_fpll.h:59
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:97
#define NO_OS_DIV_ROUND_CLOSEST(x, y)
Definition: no_os_util.h:60
int32_t altera_a10_fpll_is_enabled(struct altera_a10_fpll *fpll)
altera_a10_fpll_is_enabled
Definition: clk_altera_a10_fpll.c:446
#define FPLL_REG_C_COUNTER4
Definition: clk_altera_a10_fpll.c:62