Driver for the Altera ADXCVR Configuration. More...
#include <stdlib.h>
#include <stdio.h>
#include <inttypes.h>
#include "io.h"
#include "no_os_error.h"
#include "no_os_util.h"
#include "no_os_alloc.h"
#include "altera_a10_atx_pll.h"
#include "altera_a10_cdr_pll.h"
#include "altera_adxcvr.h"
Macros | |
#define | ADXCVR_REG_VERSION 0x0000 |
#define | VERSION(major, minor, letter) |
#define | VERSION_MAJOR(version) |
#define | VERSION_MINOR(version) |
#define | VERSION_LETTER(version) |
#define | ADXCVR_REG_ID 0x0004 |
#define | ADXCVR_REG_SCRATCH 0x0008 |
#define | ADXCVR_REG_RESETN 0x0010 |
#define | ADXCVR_RESETN (1 << 0) |
#define | ADXCVR_REG_STATUS 0x0014 |
#define | ADXCVR_STATUS (1 << 0) |
#define | ADXCVR_REG_STATUS2 0x0018 |
#define | ADXCVR_STATUS2_XCVR(x) |
#define | ADXCVR_REG_SYNTH_CONF 0x0024 |
Functions | |
int32_t | adxcvr_write (struct adxcvr *xcvr, uint32_t reg_addr, uint32_t reg_val) |
adxcvr_write | |
int32_t | adxcvr_read (struct adxcvr *xcvr, uint32_t reg_addr, uint32_t *reg_val) |
adxcvr_read | |
void | adxcvr_acquire_arbitration (struct adxcvr *xcvr, uint32_t addr, uint32_t status_reg) |
adxcvr_acquire_arbitration | |
void | adxcvr_release_arbitration (uint32_t addr, bool calibrate) |
adxcvr_release_arbitration | |
int32_t | atx_pll_write (struct adxcvr *xcvr, uint32_t reg, uint32_t val) |
atx_pll_write | |
int32_t | atx_pll_read (struct adxcvr *xcvr, uint32_t reg, uint32_t *val) |
atx_pll_read | |
void | atx_pll_update (struct adxcvr *xcvr, uint32_t reg, uint32_t mask, uint32_t val) |
atx_pll_update | |
void | atx_pll_acquire_arbitration (struct adxcvr *xcvr) |
atx_pll_acquire_arbitration | |
void | atx_pll_release_arbitration (struct adxcvr *xcvr, bool calibrate) |
atx_pll_release_arbitration | |
int32_t | adxcfg_write (struct adxcvr *xcvr, uint32_t lane, uint32_t reg, uint32_t val) |
adxcfg_write | |
int32_t | adxcfg_read (struct adxcvr *xcvr, uint32_t lane, uint32_t reg, uint32_t *val) |
adxcfg_read | |
void | adxcfg_update (struct adxcvr *xcvr, uint32_t lane, uint32_t reg, uint32_t mask, uint32_t val) |
adxcfg_update | |
void | adxcfg_acquire_arbitration (struct adxcvr *xcvr, uint32_t lane) |
adxcfg_acquire_arbitration | |
void | adxcfg_release_arbitration (struct adxcvr *xcvr, uint32_t lane, bool calibrate) |
adxcfg_release_arbitration | |
int32_t | atx_pll_calibration_check (struct adxcvr *xcvr) |
atx_pll_calibration_check | |
int32_t | adxcfg_calibration_check (struct adxcvr *xcvr, uint32_t lane, bool tx) |
adxcfg_calibration_check | |
int32_t | xcvr_calib_tx (struct adxcvr *xcvr) |
xcvr_calib_tx | |
void | adxcvr_pre_lane_rate_change (struct adxcvr *xcvr) |
adxcvr_pre_lane_rate_change | |
void | adxcvr_finalize_lane_rate_change (struct adxcvr *xcvr) |
adxcvr_finalize_lane_rate_change | |
void | adxcvr_post_lane_rate_change (struct adxcvr *xcvr, unsigned int lane_rate_khz) |
adxcvr_post_lane_rate_change | |
int32_t | adxcvr_round_rate (struct adxcvr *xcvr, uint32_t rate_khz) |
adxcvr_round_rate | |
int32_t | adxcvr_set_rate (struct adxcvr *xcvr, uint32_t rate_khz) |
adxcvr_init | |
uint32_t | adxcvr_recalc_rate (struct adxcvr *xcvr) |
adxcvr_recalc_rate | |
int32_t | adxcvr_init (struct adxcvr **ad_xcvr, const struct adxcvr_init *init) |
adxcvr_init | |
int32_t | adxcvr_remove (struct adxcvr *xcvr) |
adxcvr_remove | |
Driver for the Altera ADXCVR Configuration.
Copyright 2018(c) Analog Devices, Inc.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES, INC. “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ANALOG DEVICES, INC. BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#define ADXCVR_REG_ID 0x0004 |
#define ADXCVR_REG_RESETN 0x0010 |
#define ADXCVR_REG_SCRATCH 0x0008 |
#define ADXCVR_REG_STATUS 0x0014 |
#define ADXCVR_REG_STATUS2 0x0018 |
#define ADXCVR_REG_SYNTH_CONF 0x0024 |
#define ADXCVR_REG_VERSION 0x0000 |
#define ADXCVR_RESETN (1 << 0) |
#define ADXCVR_STATUS (1 << 0) |
#define ADXCVR_STATUS2_XCVR | ( | x | ) |
#define VERSION | ( | major, | |
minor, | |||
letter ) |
#define VERSION_LETTER | ( | version | ) |
#define VERSION_MAJOR | ( | version | ) |
#define VERSION_MINOR | ( | version | ) |
void adxcfg_acquire_arbitration | ( | struct adxcvr * | xcvr, |
uint32_t | lane ) |
adxcfg_acquire_arbitration
adxcfg_calibration_check
int32_t adxcfg_read | ( | struct adxcvr * | xcvr, |
uint32_t | lane, | ||
uint32_t | reg, | ||
uint32_t * | val ) |
adxcfg_read
adxcfg_release_arbitration
void adxcfg_update | ( | struct adxcvr * | xcvr, |
uint32_t | lane, | ||
uint32_t | reg, | ||
uint32_t | mask, | ||
uint32_t | val ) |
adxcfg_update
int32_t adxcfg_write | ( | struct adxcvr * | xcvr, |
uint32_t | lane, | ||
uint32_t | reg, | ||
uint32_t | val ) |
adxcfg_write
void adxcvr_acquire_arbitration | ( | struct adxcvr * | xcvr, |
uint32_t | addr, | ||
uint32_t | status_reg ) |
adxcvr_acquire_arbitration
void adxcvr_finalize_lane_rate_change | ( | struct adxcvr * | xcvr | ) |
adxcvr_finalize_lane_rate_change
int32_t adxcvr_init | ( | struct adxcvr ** | ad_xcvr, |
const struct adxcvr_init * | init ) |
void adxcvr_post_lane_rate_change | ( | struct adxcvr * | xcvr, |
unsigned int | lane_rate_khz ) |
adxcvr_post_lane_rate_change
void adxcvr_pre_lane_rate_change | ( | struct adxcvr * | xcvr | ) |
adxcvr_pre_lane_rate_change
int32_t adxcvr_read | ( | struct adxcvr * | xcvr, |
uint32_t | reg_addr, | ||
uint32_t * | reg_val ) |
adxcvr_read
AXI ADXCVR Read
uint32_t adxcvr_recalc_rate | ( | struct adxcvr * | xcvr | ) |
adxcvr_recalc_rate
void adxcvr_release_arbitration | ( | uint32_t | addr, |
bool | calibrate ) |
adxcvr_release_arbitration
int32_t adxcvr_remove | ( | struct adxcvr * | xcvr | ) |
adxcvr_remove
AXI ADXCVR Resources Deallocation
int32_t adxcvr_round_rate | ( | struct adxcvr * | xcvr, |
uint32_t | rate_khz ) |
adxcvr_round_rate
int32_t adxcvr_set_rate | ( | struct adxcvr * | xcvr, |
uint32_t | rate_khz ) |
int32_t adxcvr_write | ( | struct adxcvr * | xcvr, |
uint32_t | reg_addr, | ||
uint32_t | reg_val ) |
adxcvr_write
AXI ADXCVR Write
void atx_pll_acquire_arbitration | ( | struct adxcvr * | xcvr | ) |
atx_pll_acquire_arbitration
int32_t atx_pll_calibration_check | ( | struct adxcvr * | xcvr | ) |
atx_pll_calibration_check
int32_t atx_pll_read | ( | struct adxcvr * | xcvr, |
uint32_t | reg, | ||
uint32_t * | val ) |
atx_pll_read
atx_pll_release_arbitration
void atx_pll_update | ( | struct adxcvr * | xcvr, |
uint32_t | reg, | ||
uint32_t | mask, | ||
uint32_t | val ) |
atx_pll_update
int32_t atx_pll_write | ( | struct adxcvr * | xcvr, |
uint32_t | reg, | ||
uint32_t | val ) |
atx_pll_write
int32_t xcvr_calib_tx | ( | struct adxcvr * | xcvr | ) |
xcvr_calib_tx