Go to the documentation of this file.
33 #ifndef AXI_JESD204_RX_H_
34 #define AXI_JESD204_RX_H_
#define JESD204_LINK_STATUS_DATA
Definition: axi_jesd204_rx.c:81
#define JESD204_RX_REG_MAGIC
Definition: axi_jesd204_rx.c:53
int32_t axi_jesd204_rx_apply_config_legacy(struct axi_jesd204_rx *jesd, struct jesd204_rx_config *config)
Apply the JESD204 RX configuration.
Definition: axi_jesd204_rx.c:567
#define JESD204_RX_REG_LINK_CONF2
Definition: axi_jesd204_rx.c:77
#define JESD204_RX_REG_ILAS(x, y)
Definition: axi_jesd204_rx.c:89
JESD204 link configuration settings.
Definition: jesd204.h:105
#define JESD204_EMB_STATE_GET(x)
Definition: axi_jesd204_rx.c:85
#define ADI_AXI_PCORE_VER(major, minor, patch)
Definition: axi_jesd204_rx.c:102
uint8_t subclass_version
Definition: axi_jesd204_rx.h:50
int32_t axi_jesd204_rx_init_legacy(struct axi_jesd204_rx **jesd204, const struct jesd204_rx_init *init)
Device initialization.
Definition: axi_jesd204_rx.c:835
uint32_t num_lanes
Definition: axi_jesd204_rx.h:65
struct jesd204_state_op state_ops[__JESD204_MAX_OPS]
Definition: jesd204.h:232
@ JESD204_STATE_OP_REASON_INIT
Definition: jesd204.h:148
bool axi_jesd204_rx_check_lane_status(struct axi_jesd204_rx *jesd, uint32_t lane)
Check JESD204 RX Lane Status.
Definition: axi_jesd204_rx.c:443
int32_t axi_jesd204_rx_lane_clk_disable(struct axi_jesd204_rx *jesd)
JESD204 RX Lane Clock Disable.
Definition: axi_jesd204_rx.c:202
uint16_t frames_per_multiframe
Definition: axi_jesd204_rx.h:96
uint32_t lane_clk_khz
Definition: axi_jesd204_rx.h:102
uint32_t data_path_width
Definition: axi_jesd204_rx.h:67
uint32_t base
Definition: axi_jesd204_rx.h:61
struct jesd204_dev * jdev
Definition: axi_jesd204_rx.h:81
#define pr_err(fmt, args...)
Definition: no_os_print_log.h:88
Header file of Delay functions.
uint32_t axi_jesd204_rx_status_read(struct axi_jesd204_rx *jesd)
Read status of the JESD204 Receive Peripherial.
Definition: axi_jesd204_rx.c:212
@ JESD204_ENCODER_8B10B
Definition: jesd204.h:30
#define JESD204_RX_REG_SYNTH_NUM_LANES
Definition: axi_jesd204_rx.c:55
jesd204_state_op_reason
Definition: jesd204.h:147
#define pr_info(fmt, args...)
Definition: no_os_print_log.h:115
int32_t no_os_clk_enable(struct no_os_clk_desc *desc)
#define NO_OS_DIV_ROUND_CLOSEST_ULL(x, y)
Definition: no_os_util.h:56
#define JESD204_RX_REG_LINK_DISABLE
Definition: axi_jesd204_rx.c:62
#define JESD204_RX_REG_LANE_ERRORS(x)
Definition: axi_jesd204_rx.c:88
const char * axi_jesd204_rx_link_status_label[]
Definition: axi_jesd204_rx.c:115
uint32_t axi_jesd204_rx_status_read(struct axi_jesd204_rx *jesd)
Read status of the JESD204 Receive Peripherial.
Definition: axi_jesd204_rx.c:212
#define JESD204_RX_ENCODER_GET(x)
Definition: axi_jesd204_rx.c:60
uint8_t octets_per_frame
Definition: axi_jesd204_rx.h:48
@ JESD204_EMB_STATE_LOCK
Definition: axi_jesd204_rx.c:112
Definition: axi_jesd204_rx.c:147
uint32_t tpl_data_path_width
Definition: axi_jesd204_rx.h:69
const char * axi_jesd204_rx_link_status_64b66b_l[]
Definition: axi_jesd204_rx.c:129
int32_t axi_jesd204_rx_init(struct axi_jesd204_rx **jesd204, const struct jesd204_rx_init *init)
Device initialization, JESD FSM ON.
Definition: axi_jesd204_rx.c:911
void * no_os_calloc(size_t nitems, size_t size)
Allocate memory and return a pointer to it, set memory to 0.
Definition: chibios_alloc.c:54
int32_t axi_jesd204_rx_remove(struct axi_jesd204_rx *jesd)
Free resoulces allocated for JESD204 RX peripheral.
Definition: axi_jesd204_rx.c:990
const char * name
Definition: axi_jesd204_rx.h:90
uint32_t version
Definition: axi_jesd204_rx.h:63
#define JESD204_RX_REG_SYSREF_CONF_SYSREF_DISABLE
Definition: axi_jesd204_rx.c:67
@ JESD204_STATE_OP_REASON_UNINIT
Definition: jesd204.h:149
uint8_t octets_per_frame
Definition: axi_jesd204_rx.h:94
#define JESD204_RX_LINK_CONF2_BUFFER_EARLY_RELEASE
Definition: axi_jesd204_rx.c:78
#define JESD204_LMFC_OFFSET_UNINITIALIZED
Definition: jesd204.h:51
int32_t no_os_clk_disable(struct no_os_clk_desc *desc)
int32_t axi_jesd204_rx_init(struct axi_jesd204_rx **jesd204, const struct jesd204_rx_init *init)
Device initialization, JESD FSM ON.
Definition: axi_jesd204_rx.c:911
Definition: axi_jesd204_rx.h:47
void * jesd204_dev_priv(struct jesd204_dev *jdev)
Header file of Clock Driver.
#define JESD204_RX_REG_SYNTH_REG_1
Definition: axi_jesd204_rx.c:58
void no_os_mdelay(uint32_t msecs)
Wait until msecs milliseconds passed.
Definition: aducm3029_delay.c:126
int jesd204_link_get_device_clock(struct jesd204_link *lnk, unsigned long *device_clock)
int32_t axi_jesd204_rx_lane_clk_enable(struct axi_jesd204_rx *jesd)
JESD204 RX Lane Clock Enable.
Definition: axi_jesd204_rx.c:189
@ JESD204_OP_CLOCKS_ENABLE
Definition: jesd204.h:210
#define JESD204_RX_REG_LINK_CONF0
Definition: axi_jesd204_rx.c:73
#define pr_debug(fmt, args...)
Definition: no_os_print_log.h:129
uint32_t device_clk_khz
Definition: axi_jesd204_rx.h:73
@ JESD204_EMB_STATE_INIT
Definition: axi_jesd204_rx.c:110
uint8_t subclass
Definition: axi_jesd204_rx.h:98
int32_t axi_jesd204_rx_remove(struct axi_jesd204_rx *jesd)
Free resoulces allocated for JESD204 RX peripheral.
Definition: axi_jesd204_rx.c:990
#define JESD204_RX_REG_LINK_CONF4
Definition: axi_jesd204_rx.c:75
#define JESD204_RX_REG_LINK_STATE
Definition: axi_jesd204_rx.c:63
enum jesd204_encoder encoder
Definition: axi_jesd204_rx.h:77
#define JESD204_RX_REG_LANE_LATENCY(x)
Definition: axi_jesd204_rx.c:87
uint16_t frames_per_multiframe
Definition: axi_jesd204_rx.h:49
@ JESD204_ENCODER_MAX
Definition: jesd204.h:34
@ JESD204_EMB_STATE_HUNT
Definition: axi_jesd204_rx.c:111
int32_t no_os_clk_set_rate(struct no_os_clk_desc *desc, uint64_t rate)
uint32_t device_clk_khz
Definition: axi_jesd204_rx.h:100
int32_t axi_jesd204_rx_read(struct axi_jesd204_rx *jesd, uint32_t reg_addr, uint32_t *reg_val)
JESD204 RX AXI Data Read.
Definition: axi_jesd204_rx.c:176
Structure holding CLK descriptor.
Definition: no_os_clk.h:75
#define JESD204_RX_REG_SYNTH_DATA_PATH_WIDTH
Definition: axi_jesd204_rx.c:56
#define PCORE_VERSION_MAJOR(x)
Definition: axi_jesd204_rx.c:105
@ JESD204_OP_LINK_ENABLE
Definition: jesd204.h:211
const char * axi_jesd204_rx_emb_state_label[]
Definition: axi_jesd204_rx.c:136
int32_t no_os_axi_io_read(uint32_t base, uint32_t offset, uint32_t *data)
AXI IO Altera specific read function.
Definition: altera_axi_io.c:53
@ JESD204_ENCODER_64B66B
Definition: jesd204.h:31
#define JESD204_SYNTH_DATA_PATH_WIDTH_GET(x)
Definition: axi_jesd204_rx.c:98
#define PCORE_VERSION_PATCH(x)
Definition: axi_jesd204_rx.c:107
@ JESD204_STATE_CHANGE_ERROR
Definition: jesd204.h:44
struct jesd204_rx_config config
Definition: axi_jesd204_rx.h:71
@ JESD204_OP_LINK_PRE_SETUP
Definition: jesd204.h:200
uint32_t link_id
Definition: jesd204.h:106
@ JESD204_SUBCLASS_0
Definition: jesd204.h:16
int32_t axi_jesd204_rx_watchdog(struct axi_jesd204_rx *jesd)
JESD204 RX Watchdog.
Definition: axi_jesd204_rx.c:479
void * no_os_malloc(size_t size)
Allocate memory and return a pointer to it.
Definition: chibios_alloc.c:43
struct axi_jesd204_rx * jesd
Definition: axi_jesd204_rx.c:148
#define JESD204_RX_REG_SYSREF_STATUS
Definition: axi_jesd204_rx.c:71
uint8_t num_lanes
Definition: jesd204.h:114
const char * axi_jesd204_rx_lane_status_label[]
Definition: axi_jesd204_rx.c:122
int32_t axi_jesd204_rx_init_legacy(struct axi_jesd204_rx **jesd204, const struct jesd204_rx_init *init)
Device initialization.
Definition: axi_jesd204_rx.c:835
int32_t axi_jesd204_rx_watchdog(struct axi_jesd204_rx *jesd)
JESD204 RX Watchdog.
Definition: axi_jesd204_rx.c:479
#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 JESD204_RX_REG_LINK_STATUS
Definition: axi_jesd204_rx.c:80
int32_t axi_jesd204_rx_laneinfo_read(struct axi_jesd204_rx *jesd, uint32_t lane)
Read JESD204 RX Lane Info.
Definition: axi_jesd204_rx.c:415
int jesd204_dev_register(struct jesd204_dev **jdev, const struct jesd204_dev_data *dev_data)
#define JESD204_TPL_DATA_PATH_WIDTH_GET(x)
Definition: axi_jesd204_rx.c:100
jesd204_encoder
Definition: jesd204.h:28
#define JESD204_RX_REG_SYSREF_LMFC_OFFSET
Definition: axi_jesd204_rx.c:69
int32_t axi_jesd204_rx_laneinfo_read(struct axi_jesd204_rx *jesd, uint32_t lane)
Read JESD204 RX Lane Info.
Definition: axi_jesd204_rx.c:415
Definition: axi_jesd204_rx.h:57
#define JESD204_RX_REG_VERSION
Definition: axi_jesd204_rx.c:52
int jesd204_link_get_rate_khz(struct jesd204_link *lnk, unsigned long *lane_rate_khz)
@ JESD204_STATE_CHANGE_DONE
Definition: jesd204.h:46
Driver for the Analog Devices AXI-JESD204-RX peripheral.
int32_t no_os_axi_io_write(uint32_t base, uint32_t offset, uint32_t data)
AXI IO Altera specific write function.
Definition: altera_axi_io.c:67
uint32_t base
Definition: axi_jesd204_rx.h:92
#define JESD204_RX_MAGIC
Definition: axi_jesd204_rx.c:94
JESD204B/C Receive Peripheral Initialization Structure.
Definition: axi_jesd204_rx.h:88
int32_t axi_jesd204_rx_write(struct axi_jesd204_rx *jesd, uint32_t reg_addr, uint32_t reg_val)
JESD204 RX AXI Data Write.
Definition: axi_jesd204_rx.c:161
@ JESD204_ENCODER_UNKNOWN
Definition: jesd204.h:29
jesd204_link_cb per_link
Definition: jesd204.h:192
int32_t axi_jesd204_rx_get_lane_errors(struct axi_jesd204_rx *jesd, uint32_t lane, uint32_t *errors)
Read the JESD204 RX Lane Errors.
Definition: axi_jesd204_rx.c:297
uint32_t lane_clk_khz
Definition: axi_jesd204_rx.h:75
const char * name
Definition: axi_jesd204_rx.h:59
Header file of utility functions.
#define PCORE_VERSION_MINOR(x)
Definition: axi_jesd204_rx.c:106
#define JESD204_RX_REG_SYSREF_CONF
Definition: axi_jesd204_rx.c:66
int32_t axi_jesd204_rx_lane_clk_disable(struct axi_jesd204_rx *jesd)
JESD204 RX Lane Clock Disable.
Definition: axi_jesd204_rx.c:202
@ JESD204_OP_LINK_RUNNING
Definition: jesd204.h:212
JESD204 device initialization data.
Definition: jesd204.h:227
struct no_os_clk_desc * lane_clk
Definition: axi_jesd204_rx.h:104
int32_t axi_jesd204_rx_lane_clk_enable(struct axi_jesd204_rx *jesd)
JESD204 RX Lane Clock Enable.
Definition: axi_jesd204_rx.c:189
#define JESD204_RX_REG_LANE_STATUS(x)
Definition: axi_jesd204_rx.c:83
#define NO_OS_DIV_ROUND_CLOSEST(x, y)
Definition: no_os_util.h:54
@ JESD204_OP_LINK_SETUP
Definition: jesd204.h:204
#define JESD204_RX_REG_LINK_CLK_RATIO
Definition: axi_jesd204_rx.c:64
uint64_t no_os_div_u64(uint64_t dividend, uint32_t divisor)
struct no_os_clk_desc * lane_clk
Definition: axi_jesd204_rx.h:79