no-OS
All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
jesd204.h File Reference
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
Include dependency graph for jesd204.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  jesd204_sysref
 JESD204 parameters for SYSREF. More...
 
struct  jesd204_link
 JESD204 link configuration settings. More...
 
struct  jesd204_state_op
 JESD204 device per-state op. More...
 
struct  jesd204_dev_data
 JESD204 device initialization data. More...
 
struct  jesd204_topology_dev
 
struct  jesd204_topology
 

Macros

#define JESD204_LINKS_ALL   ((unsigned int)(-1))
 
#define JESD204_LMFC_OFFSET_UNINITIALIZED   ((uint16_t)-1)
 
#define JESD204_MAX_TOPOLOGY_LINKS   16
 

Typedefs

typedef int(* jesd204_sysref_cb) (struct jesd204_dev *jdev)
 
typedef int(* jesd204_dev_cb) (struct jesd204_dev *jdev, enum jesd204_state_op_reason reason)
 
typedef int(* jesd204_link_cb) (struct jesd204_dev *jdev, enum jesd204_state_op_reason, struct jesd204_link *lnk)
 

Enumerations

enum  jesd204_subclass {
  JESD204_SUBCLASS_0 ,
  JESD204_SUBCLASS_1 ,
  JESD204_SUBCLASS_2
}
 
enum  jesd204_version {
  JESD204_VERSION_A ,
  JESD204_VERSION_B ,
  JESD204_VERSION_C
}
 
enum  jesd204_encoder {
  JESD204_ENCODER_UNKNOWN ,
  JESD204_ENCODER_8B10B ,
  JESD204_ENCODER_64B66B ,
  JESD204_ENCODER_64B80B ,
  JESD204_ENCODER_MAX
}
 
enum  jesd204_sysref_mode {
  JESD204_SYSREF_DISABLED ,
  JESD204_SYSREF_CONTINUOUS ,
  JESD204_SYSREF_ONESHOT
}
 
enum  jesd204_state_change_result {
  JESD204_STATE_CHANGE_ERROR = -1 ,
  JESD204_STATE_CHANGE_DEFER = 0 ,
  JESD204_STATE_CHANGE_DONE
}
 
enum  jesd204_state_op_reason {
  JESD204_STATE_OP_REASON_INIT ,
  JESD204_STATE_OP_REASON_UNINIT
}
 
enum  jesd204_state_op_mode {
  JESD204_STATE_OP_MODE_PER_LINK ,
  JESD204_STATE_OP_MODE_PER_DEVICE
}
 
enum  jesd204_dev_op {
  JESD204_OP_DEVICE_INIT ,
  JESD204_OP_LINK_INIT ,
  JESD204_OP_LINK_SUPPORTED ,
  JESD204_OP_LINK_PRE_SETUP ,
  JESD204_OP_CLK_SYNC_STAGE1 ,
  JESD204_OP_CLK_SYNC_STAGE2 ,
  JESD204_OP_CLK_SYNC_STAGE3 ,
  JESD204_OP_LINK_SETUP ,
  JESD204_OP_OPT_SETUP_STAGE1 ,
  JESD204_OP_OPT_SETUP_STAGE2 ,
  JESD204_OP_OPT_SETUP_STAGE3 ,
  JESD204_OP_OPT_SETUP_STAGE4 ,
  JESD204_OP_OPT_SETUP_STAGE5 ,
  JESD204_OP_CLOCKS_ENABLE ,
  JESD204_OP_LINK_ENABLE ,
  JESD204_OP_LINK_RUNNING ,
  JESD204_OP_OPT_POST_RUNNING_STAGE ,
  __JESD204_MAX_OPS
}
 

Functions

int jesd204_dev_register (struct jesd204_dev **jdev, const struct jesd204_dev_data *dev_data)
 
int jesd204_dev_unregister (struct jesd204_dev *jdev)
 
int jesd204_topology_init (struct jesd204_topology **topology, struct jesd204_topology_dev *devs, unsigned int devs_number)
 
int jesd204_topology_remove (struct jesd204_topology *topology)
 
int jesd204_fsm_start (struct jesd204_topology *topology, unsigned int link_idx)
 
int jesd204_fsm_stop (struct jesd204_topology *topology, unsigned int link_idx)
 
void * jesd204_dev_priv (struct jesd204_dev *jdev)
 
int jesd204_link_get_lmfc_lemc_rate (struct jesd204_link *lnk, unsigned long *rate_hz)
 
int jesd204_link_get_rate_khz (struct jesd204_link *lnk, unsigned long *lane_rate_khz)
 
int jesd204_link_get_device_clock (struct jesd204_link *lnk, unsigned long *device_clock)
 
int jesd204_sysref_async (struct jesd204_dev *jdev)
 
int jesd204_sysref_async_force (struct jesd204_dev *jdev)
 
bool jesd204_dev_is_top (struct jesd204_dev *jdev)
 
void jesd204_copy_link_params (struct jesd204_link *dst, const struct jesd204_link *src)
 

Macro Definition Documentation

◆ JESD204_LINKS_ALL

#define JESD204_LINKS_ALL   ((unsigned int)(-1))

◆ JESD204_LMFC_OFFSET_UNINITIALIZED

#define JESD204_LMFC_OFFSET_UNINITIALIZED   ((uint16_t)-1)

◆ JESD204_MAX_TOPOLOGY_LINKS

#define JESD204_MAX_TOPOLOGY_LINKS   16

Typedef Documentation

◆ jesd204_dev_cb

typedef int(* jesd204_dev_cb) (struct jesd204_dev *jdev, enum jesd204_state_op_reason reason)

◆ jesd204_link_cb

typedef int(* jesd204_link_cb) (struct jesd204_dev *jdev, enum jesd204_state_op_reason, struct jesd204_link *lnk)

◆ jesd204_sysref_cb

typedef int(* jesd204_sysref_cb) (struct jesd204_dev *jdev)

Enumeration Type Documentation

◆ jesd204_dev_op

Enumerator
JESD204_OP_DEVICE_INIT 
JESD204_OP_LINK_INIT 
JESD204_OP_LINK_SUPPORTED 
JESD204_OP_LINK_PRE_SETUP 
JESD204_OP_CLK_SYNC_STAGE1 
JESD204_OP_CLK_SYNC_STAGE2 
JESD204_OP_CLK_SYNC_STAGE3 
JESD204_OP_LINK_SETUP 
JESD204_OP_OPT_SETUP_STAGE1 
JESD204_OP_OPT_SETUP_STAGE2 
JESD204_OP_OPT_SETUP_STAGE3 
JESD204_OP_OPT_SETUP_STAGE4 
JESD204_OP_OPT_SETUP_STAGE5 
JESD204_OP_CLOCKS_ENABLE 
JESD204_OP_LINK_ENABLE 
JESD204_OP_LINK_RUNNING 
JESD204_OP_OPT_POST_RUNNING_STAGE 
__JESD204_MAX_OPS 

◆ jesd204_encoder

Enumerator
JESD204_ENCODER_UNKNOWN 
JESD204_ENCODER_8B10B 
JESD204_ENCODER_64B66B 
JESD204_ENCODER_64B80B 
JESD204_ENCODER_MAX 

◆ jesd204_state_change_result

Enumerator
JESD204_STATE_CHANGE_ERROR 
JESD204_STATE_CHANGE_DEFER 
JESD204_STATE_CHANGE_DONE 

◆ jesd204_state_op_mode

Enumerator
JESD204_STATE_OP_MODE_PER_LINK 
JESD204_STATE_OP_MODE_PER_DEVICE 

◆ jesd204_state_op_reason

Enumerator
JESD204_STATE_OP_REASON_INIT 
JESD204_STATE_OP_REASON_UNINIT 

◆ jesd204_subclass

Enumerator
JESD204_SUBCLASS_0 
JESD204_SUBCLASS_1 
JESD204_SUBCLASS_2 

◆ jesd204_sysref_mode

Enumerator
JESD204_SYSREF_DISABLED 
JESD204_SYSREF_CONTINUOUS 
JESD204_SYSREF_ONESHOT 

◆ jesd204_version

Enumerator
JESD204_VERSION_A 
JESD204_VERSION_B 
JESD204_VERSION_C 

Function Documentation

◆ jesd204_copy_link_params()

void jesd204_copy_link_params ( struct jesd204_link * dst,
const struct jesd204_link * src )

◆ jesd204_dev_is_top()

bool jesd204_dev_is_top ( struct jesd204_dev * jdev)

◆ jesd204_dev_priv()

void * jesd204_dev_priv ( struct jesd204_dev * jdev)
Here is the caller graph for this function:

◆ jesd204_dev_register()

int jesd204_dev_register ( struct jesd204_dev ** jdev,
const struct jesd204_dev_data * dev_data )
Here is the caller graph for this function:

◆ jesd204_dev_unregister()

int jesd204_dev_unregister ( struct jesd204_dev * jdev)
Here is the caller graph for this function:

◆ jesd204_fsm_start()

int jesd204_fsm_start ( struct jesd204_topology * topology,
unsigned int link_idx )
Here is the caller graph for this function:

◆ jesd204_fsm_stop()

int jesd204_fsm_stop ( struct jesd204_topology * topology,
unsigned int link_idx )

◆ jesd204_link_get_device_clock()

int jesd204_link_get_device_clock ( struct jesd204_link * lnk,
unsigned long * device_clock )

◆ jesd204_link_get_lmfc_lemc_rate()

int jesd204_link_get_lmfc_lemc_rate ( struct jesd204_link * lnk,
unsigned long * rate_hz )

◆ jesd204_link_get_rate_khz()

int jesd204_link_get_rate_khz ( struct jesd204_link * lnk,
unsigned long * lane_rate_khz )

◆ jesd204_sysref_async()

int jesd204_sysref_async ( struct jesd204_dev * jdev)

◆ jesd204_sysref_async_force()

int jesd204_sysref_async_force ( struct jesd204_dev * jdev)

◆ jesd204_topology_init()

int jesd204_topology_init ( struct jesd204_topology ** topology,
struct jesd204_topology_dev * devs,
unsigned int devs_number )
Here is the caller graph for this function:

◆ jesd204_topology_remove()

int jesd204_topology_remove ( struct jesd204_topology * topology)