no-OS
|
Driver for the Analog Devices AXI-JESD204-TX peripheral. More...
#include <stdlib.h>
#include <stdio.h>
#include <inttypes.h>
#include "no_os_clk.h"
#include "no_os_error.h"
#include "no_os_util.h"
#include "no_os_alloc.h"
#include "axi_jesd204_tx.h"
#include "no_os_axi_io.h"
#include "no_os_delay.h"
#include "no_os_print_log.h"
Classes | |
struct | axi_jesd204_tx_jesd204_priv |
Functions | |
int32_t | axi_jesd204_tx_write (struct axi_jesd204_tx *jesd, uint32_t reg_addr, uint32_t reg_val) |
JESD204 TX AXI Data Write. More... | |
int32_t | axi_jesd204_tx_read (struct axi_jesd204_tx *jesd, uint32_t reg_addr, uint32_t *reg_val) |
JESD204 TX AXI Data Read. More... | |
int32_t | axi_jesd204_tx_lane_clk_enable (struct axi_jesd204_tx *jesd) |
JESD204 TX Lane Clock Enable. More... | |
int32_t | axi_jesd204_tx_lane_clk_disable (struct axi_jesd204_tx *jesd) |
JESD204 TX Lane Clock Disable. More... | |
uint32_t | axi_jesd204_tx_status_read (struct axi_jesd204_tx *jesd) |
Read status of the JESD204 Transmit Peripherial. More... | |
uint32_t | axi_jesd204_tx_calc_ilas_chksum_legacy (const struct jesd204_tx_config *config) |
Compute the JESD204 TX ILAS checksum. More... | |
void | axi_jesd204_tx_set_lane_ilas_legacy (struct axi_jesd204_tx *jesd, struct jesd204_tx_config *config, uint32_t lane) |
Set the JESD204 TX lane ILAS. More... | |
int32_t | axi_jesd204_tx_apply_config (struct axi_jesd204_tx *jesd, struct jesd204_link *config) |
Apply the JESD204 TX configuration. More... | |
int32_t | axi_jesd204_tx_apply_config_legacy (struct axi_jesd204_tx *jesd, struct jesd204_tx_config *config) |
Apply the JESD204 TX configuration. More... | |
int32_t | axi_jesd204_tx_init_legacy (struct axi_jesd204_tx **jesd204, const struct jesd204_tx_init *init) |
Device initialization. More... | |
int32_t | axi_jesd204_tx_init (struct axi_jesd204_tx **jesd204, const struct jesd204_tx_init *init) |
Device initialization. More... | |
int32_t | axi_jesd204_tx_remove (struct axi_jesd204_tx *jesd) |
Free resoulces allocated for JESD204 TX peripheral. More... | |
Variables | |
const char * | axi_jesd204_tx_link_status_label [] |
Driver for the Analog Devices AXI-JESD204-TX peripheral.
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 ADI_AXI_PCORE_VER | ( | major, | |
minor, | |||
patch | |||
) | (((major) << 16) | ((minor) << 8) | (patch)) |
#define JESD204_LINK_STATUS_DATA 3 |
#define JESD204_SYNTH_DATA_PATH_WIDTH_GET | ( | x | ) | no_os_field_get(JESD204_SYNTH_DATA_PATH_WIDTH_MASK, x) |
#define JESD204_SYNTH_DATA_PATH_WIDTH_MASK NO_OS_GENMASK(7, 0) |
#define JESD204_TPL_DATA_PATH_WIDTH_GET | ( | x | ) | no_os_field_get(JESD204_TPL_DATA_PATH_WIDTH_MASK, x) |
#define JESD204_TPL_DATA_PATH_WIDTH_MASK NO_OS_GENMASK(15, 8) |
#define JESD204_TX_ENCODER_GET | ( | x | ) | no_os_field_get(JESD204_TX_ENCODER_MASK, x) |
#define JESD204_TX_ENCODER_MASK NO_OS_GENMASK(9, 8) |
#define JESD204_TX_MAGIC (('2' << 24) | ('0' << 16) | ('4' << 8) | ('T')) |
#define JESD204_TX_REG_CONF0 0x210 |
#define JESD204_TX_REG_CONF_DATA_PATH_WIDTH 0x14 |
#define JESD204_TX_REG_CONF_NUM_LANES 0x10 |
#define JESD204_TX_REG_ILAS | ( | x, | |
y | |||
) | (((x) * 32 + (y) * 4) + 0x310) |
#define JESD204_TX_REG_LINK_CLK_RATIO 0xc8 |
#define JESD204_TX_REG_LINK_CONF4 0x21C |
#define JESD204_TX_REG_LINK_DISABLE 0xc0 |
#define JESD204_TX_REG_LINK_STATE 0xc4 |
#define JESD204_TX_REG_LINK_STATUS 0x280 |
#define JESD204_TX_REG_MAGIC 0x0c |
#define JESD204_TX_REG_SYNTH_REG_1 0x18 |
#define JESD204_TX_REG_SYSREF_CONF 0x100 |
#define JESD204_TX_REG_SYSREF_CONF_SYSREF_DISABLE NO_OS_BIT(0) |
#define JESD204_TX_REG_SYSREF_LMFC_OFFSET 0x104 |
#define JESD204_TX_REG_SYSREF_STATUS 0x108 |
#define JESD204_TX_REG_VERSION 0x00 |
#define PCORE_VERSION_MAJOR | ( | x | ) | ((x) >> 16) |
#define PCORE_VERSION_MINOR | ( | x | ) | (((x) >> 8) & 0xff) |
#define PCORE_VERSION_PATCH | ( | x | ) | ((x) & 0xff) |
int32_t axi_jesd204_tx_apply_config | ( | struct axi_jesd204_tx * | jesd, |
struct jesd204_link * | config | ||
) |
Apply the JESD204 TX configuration.
jesd | - The device structure. |
config | - The JESD TX configuration. |
int32_t axi_jesd204_tx_apply_config_legacy | ( | struct axi_jesd204_tx * | jesd, |
struct jesd204_tx_config * | config | ||
) |
Apply the JESD204 TX configuration.
jesd | - The device structure. |
config | - The JESD TX configuration. |
uint32_t axi_jesd204_tx_calc_ilas_chksum_legacy | ( | const struct jesd204_tx_config * | config | ) |
Compute the JESD204 TX ILAS checksum.
config | - The JESD TX configuration |
int32_t axi_jesd204_tx_init | ( | struct axi_jesd204_tx ** | jesd204, |
const struct jesd204_tx_init * | init | ||
) |
Device initialization.
jesd204 | - The device structure. |
init | - The structure containing the device initial parameters. |
int32_t axi_jesd204_tx_init_legacy | ( | struct axi_jesd204_tx ** | jesd204, |
const struct jesd204_tx_init * | init | ||
) |
Device initialization.
jesd204 | - The device structure. |
init | - The structure containing the device initial parameters. |
int32_t axi_jesd204_tx_lane_clk_disable | ( | struct axi_jesd204_tx * | jesd | ) |
JESD204 TX Lane Clock Disable.
jesd | - The device structure. |
int32_t axi_jesd204_tx_lane_clk_enable | ( | struct axi_jesd204_tx * | jesd | ) |
JESD204 TX Lane Clock Enable.
jesd | - The device structure. |
int32_t axi_jesd204_tx_read | ( | struct axi_jesd204_tx * | jesd, |
uint32_t | reg_addr, | ||
uint32_t * | reg_val | ||
) |
JESD204 TX AXI Data Read.
jesd | - The device structure. |
reg_addr | - The register address. |
reg_val | - Data read from the device. |
int32_t axi_jesd204_tx_remove | ( | struct axi_jesd204_tx * | jesd | ) |
Free resoulces allocated for JESD204 TX peripheral.
jesd | - The device structure. |
void axi_jesd204_tx_set_lane_ilas_legacy | ( | struct axi_jesd204_tx * | jesd, |
struct jesd204_tx_config * | config, | ||
uint32_t | lane | ||
) |
Set the JESD204 TX lane ILAS.
jesd | - The device structure. |
config | - The JESD TX configuration. |
lane | - The lane ID. |
uint32_t axi_jesd204_tx_status_read | ( | struct axi_jesd204_tx * | jesd | ) |
Read status of the JESD204 Transmit Peripherial.
jesd | - The device structure. |
int32_t axi_jesd204_tx_write | ( | struct axi_jesd204_tx * | jesd, |
uint32_t | reg_addr, | ||
uint32_t | reg_val | ||
) |
JESD204 TX AXI Data Write.
jesd | - The device structure. |
reg_addr | - The register address. |
reg_val | - Data value to write. |
const char* axi_jesd204_tx_link_status_label[] |