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"
|
| int32_t | axi_jesd204_tx_write (struct axi_jesd204_tx *jesd, uint32_t reg_addr, uint32_t reg_val) |
| | JESD204 TX AXI Data Write.
|
| |
| int32_t | axi_jesd204_tx_read (struct axi_jesd204_tx *jesd, uint32_t reg_addr, uint32_t *reg_val) |
| | JESD204 TX AXI Data Read.
|
| |
| int32_t | axi_jesd204_tx_lane_clk_enable (struct axi_jesd204_tx *jesd) |
| | JESD204 TX Lane Clock Enable.
|
| |
| int32_t | axi_jesd204_tx_lane_clk_disable (struct axi_jesd204_tx *jesd) |
| | JESD204 TX Lane Clock Disable.
|
| |
| uint32_t | axi_jesd204_tx_status_read (struct axi_jesd204_tx *jesd) |
| | Read status of the JESD204 Transmit Peripherial.
|
| |
| uint32_t | axi_jesd204_tx_calc_ilas_chksum_legacy (const struct jesd204_tx_config *config) |
| | Compute the JESD204 TX ILAS checksum.
|
| |
| 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.
|
| |
| int32_t | axi_jesd204_tx_apply_config (struct axi_jesd204_tx *jesd, struct jesd204_link *config) |
| | Apply the JESD204 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.
|
| |
| int32_t | axi_jesd204_tx_init_legacy (struct axi_jesd204_tx **jesd204, const struct jesd204_tx_init *init) |
| | Device initialization.
|
| |
| int32_t | axi_jesd204_tx_init (struct axi_jesd204_tx **jesd204, const struct jesd204_tx_init *init) |
| | Device initialization.
|
| |
| int32_t | axi_jesd204_tx_remove (struct axi_jesd204_tx *jesd) |
| | Free resoulces allocated for JESD204 TX peripheral.
|
| |
Driver for the Analog Devices AXI-JESD204-TX peripheral.
- Author
- DBogdan (drago.nosp@m.s.bo.nosp@m.gdan@.nosp@m.anal.nosp@m.og.co.nosp@m.m)
Copyright 2018(c) Analog Devices, Inc.
SPDX-License-Identifier: BSD-3-Clause
◆ ADI_AXI_PCORE_VER
| #define ADI_AXI_PCORE_VER |
( |
| major, |
|
|
| minor, |
|
|
| patch ) |
Value: (((major) << 16) | ((minor) << 8) | (patch))
◆ JESD204_LINK_STATUS_DATA
| #define JESD204_LINK_STATUS_DATA 3 |
◆ JESD204_SYNTH_DATA_PATH_WIDTH_GET
| #define JESD204_SYNTH_DATA_PATH_WIDTH_GET |
( |
| x | ) |
|
Value:
#define JESD204_SYNTH_DATA_PATH_WIDTH_MASK
Definition axi_jesd204_rx.c:68
uint32_t no_os_field_get(uint32_t mask, uint32_t word)
◆ JESD204_SYNTH_DATA_PATH_WIDTH_MASK
◆ JESD204_TPL_DATA_PATH_WIDTH_GET
| #define JESD204_TPL_DATA_PATH_WIDTH_GET |
( |
| x | ) |
|
Value:
#define JESD204_TPL_DATA_PATH_WIDTH_MASK
Definition axi_jesd204_rx.c:70
◆ JESD204_TPL_DATA_PATH_WIDTH_MASK
◆ JESD204_TX_ENCODER_GET
| #define JESD204_TX_ENCODER_GET |
( |
| x | ) |
|
Value:
#define JESD204_TX_ENCODER_MASK
Definition axi_jesd204_tx.c:30
◆ JESD204_TX_ENCODER_MASK
◆ JESD204_TX_MAGIC
| #define JESD204_TX_MAGIC (('2' << 24) | ('0' << 16) | ('4' << 8) | ('T')) |
◆ JESD204_TX_REG_CONF0
| #define JESD204_TX_REG_CONF0 0x210 |
◆ JESD204_TX_REG_CONF_DATA_PATH_WIDTH
| #define JESD204_TX_REG_CONF_DATA_PATH_WIDTH 0x14 |
◆ JESD204_TX_REG_CONF_NUM_LANES
| #define JESD204_TX_REG_CONF_NUM_LANES 0x10 |
◆ JESD204_TX_REG_ILAS
| #define JESD204_TX_REG_ILAS |
( |
| x, |
|
|
| y ) |
Value: (((x) * 32 + (y) * 4) + 0x310)
◆ JESD204_TX_REG_LINK_CLK_RATIO
| #define JESD204_TX_REG_LINK_CLK_RATIO 0xc8 |
◆ JESD204_TX_REG_LINK_CONF4
| #define JESD204_TX_REG_LINK_CONF4 0x21C |
◆ JESD204_TX_REG_LINK_DISABLE
| #define JESD204_TX_REG_LINK_DISABLE 0xc0 |
◆ JESD204_TX_REG_LINK_STATE
| #define JESD204_TX_REG_LINK_STATE 0xc4 |
◆ JESD204_TX_REG_LINK_STATUS
| #define JESD204_TX_REG_LINK_STATUS 0x280 |
◆ JESD204_TX_REG_MAGIC
| #define JESD204_TX_REG_MAGIC 0x0c |
◆ JESD204_TX_REG_SYNTH_REG_1
| #define JESD204_TX_REG_SYNTH_REG_1 0x18 |
◆ JESD204_TX_REG_SYSREF_CONF
| #define JESD204_TX_REG_SYSREF_CONF 0x100 |
◆ JESD204_TX_REG_SYSREF_CONF_SYSREF_DISABLE
| #define JESD204_TX_REG_SYSREF_CONF_SYSREF_DISABLE NO_OS_BIT(0) |
◆ JESD204_TX_REG_SYSREF_LMFC_OFFSET
| #define JESD204_TX_REG_SYSREF_LMFC_OFFSET 0x104 |
◆ JESD204_TX_REG_SYSREF_STATUS
| #define JESD204_TX_REG_SYSREF_STATUS 0x108 |
◆ JESD204_TX_REG_VERSION
| #define JESD204_TX_REG_VERSION 0x00 |
◆ PCORE_VERSION_MAJOR
| #define PCORE_VERSION_MAJOR |
( |
| x | ) |
|
◆ PCORE_VERSION_MINOR
| #define PCORE_VERSION_MINOR |
( |
| x | ) |
|
◆ PCORE_VERSION_PATCH
| #define PCORE_VERSION_PATCH |
( |
| x | ) |
|
◆ axi_jesd204_tx_apply_config()
Apply the JESD204 TX configuration.
- Parameters
-
| jesd | - The device structure. |
| config | - The JESD TX configuration. |
- Returns
- Returns 0 in case of success or negative error code otherwise.
◆ axi_jesd204_tx_apply_config_legacy()
Apply the JESD204 TX configuration.
- Parameters
-
| jesd | - The device structure. |
| config | - The JESD TX configuration. |
- Returns
- Returns 0 in case of success or negative error code otherwise.
◆ axi_jesd204_tx_calc_ilas_chksum_legacy()
| uint32_t axi_jesd204_tx_calc_ilas_chksum_legacy |
( |
const struct jesd204_tx_config * | config | ) |
|
Compute the JESD204 TX ILAS checksum.
- Parameters
-
| config | - The JESD TX configuration |
- Returns
- Returns 0 in case of success or negative error code otherwise.
◆ axi_jesd204_tx_init()
Device initialization.
- Parameters
-
| jesd204 | - The device structure. |
| init | - The structure containing the device initial parameters. |
- Returns
- Returns 0 in case of success or negative error code otherwise.
◆ axi_jesd204_tx_init_legacy()
Device initialization.
- Parameters
-
| jesd204 | - The device structure. |
| init | - The structure containing the device initial parameters. |
- Returns
- Returns 0 in case of success or negative error code otherwise.
◆ axi_jesd204_tx_lane_clk_disable()
| int32_t axi_jesd204_tx_lane_clk_disable |
( |
struct axi_jesd204_tx * | jesd | ) |
|
JESD204 TX Lane Clock Disable.
- Parameters
-
| jesd | - The device structure. |
- Returns
- Returns 0 in case of success or negative error code otherwise.
◆ axi_jesd204_tx_lane_clk_enable()
| int32_t axi_jesd204_tx_lane_clk_enable |
( |
struct axi_jesd204_tx * | jesd | ) |
|
JESD204 TX Lane Clock Enable.
- Parameters
-
| jesd | - The device structure. |
- Returns
- Returns 0 in case of success or negative error code otherwise.
◆ axi_jesd204_tx_read()
| int32_t axi_jesd204_tx_read |
( |
struct axi_jesd204_tx * | jesd, |
|
|
uint32_t | reg_addr, |
|
|
uint32_t * | reg_val ) |
JESD204 TX AXI Data Read.
- Parameters
-
| jesd | - The device structure. |
| reg_addr | - The register address. |
| reg_val | - Data read from the device. |
- Returns
- Returns 0 in case of success or negative error code otherwise.
◆ axi_jesd204_tx_remove()
Free resoulces allocated for JESD204 TX peripheral.
- Parameters
-
| jesd | - The device structure. |
- Returns
- Returns 0 in case of success or negative error code.
◆ axi_jesd204_tx_set_lane_ilas_legacy()
Set the JESD204 TX lane ILAS.
- Parameters
-
| jesd | - The device structure. |
| config | - The JESD TX configuration. |
| lane | - The lane ID. |
◆ axi_jesd204_tx_status_read()
Read status of the JESD204 Transmit Peripherial.
- Parameters
-
| jesd | - The device structure. |
- Returns
- Returns 0 in case of success or negative error code otherwise.
◆ axi_jesd204_tx_write()
| int32_t axi_jesd204_tx_write |
( |
struct axi_jesd204_tx * | jesd, |
|
|
uint32_t | reg_addr, |
|
|
uint32_t | reg_val ) |
JESD204 TX AXI Data Write.
- Parameters
-
| jesd | - The device structure. |
| reg_addr | - The register address. |
| reg_val | - Data value to write. |
- Returns
- Returns 0 in case of success or negative error code otherwise.
◆ axi_jesd204_tx_link_status_label
| const char* axi_jesd204_tx_link_status_label[] |
Initial value:= {
"WAIT",
"CGS",
"ILAS",
"DATA"
}