Commit e72b21c9 authored by Maciej Lipinski's avatar Maciej Lipinski

Update of SHMEM needed for Low Phase Drift Calibration

parent 13e4a0cf
......@@ -12,6 +12,23 @@
#define HAL_PORT_STATE_CALIBRATION 3
#define HAL_PORT_STATE_LOCKING 4
#define HAL_PORT_STATE_RESET 5
#define HAL_PORT_STATE_INIT 6
/* Port tx setup/calib machine states (hal_port_tx_setup_state) */
#define TX_SETUP_STATE_START 0
#define TX_SETUP_STATE_RESET_PCS 1
#define TX_SETUP_STATE_WAIT_LOCK 2
#define TX_SETUP_STATE_MEASURE_PHASE 3
#define TX_SETUP_DONE 4
#define TX_SETUP_VALIDATE 5
/* Port rx setup/calib machine states (hal_port_tx_setup_state) */
#define RX_SETUP_STATE_INIT 0
#define RX_SETUP_STATE_RESET_PCS 1
#define RX_SETUP_STATE_WAIT_LOCK 2
#define RX_SETUP_STATE_MEASURE_PHASE 3
#define RX_SETUP_DONE 4
#define RX_SETUP_VALIDATE 5
/* Read temperature from SFPs */
#define READ_SFP_DIAG_ENABLE 1
......@@ -24,6 +41,10 @@
#define DEFAULT_T2_PHASE_TRANS 0
#define DEFAULT_T4_PHASE_TRANS 0
/* Low Phase Drift Calibration for tx and rx */
struct hal_port_tx_setup_state;
struct hal_port_rx_setup_state;
/* Port delay calibration parameters */
typedef struct hal_port_calibration {
......@@ -122,6 +143,9 @@ struct hal_port_state {
int synchronized; // <>0 if port is synchronized
int portInfoUpdated; // Set to 1 when updated
/* needed for the Low Phase Drift Calibration */
struct hal_port_tx_setup_state *tx_setup_fsm;
struct hal_port_rx_setup_state *rx_setup_fsm;
};
struct hal_temp_sensors {
......@@ -132,8 +156,7 @@ struct hal_temp_sensors {
};
/* This is the overall structure stored in shared memory */
#define HAL_SHMEM_VERSION 12 /* Version 12, added monitor to
struct hal_port_state */
#define HAL_SHMEM_VERSION 13 /* Version 13, added Low Phase Drift Calib */
struct hal_shmem_header {
int nports;
......
......@@ -5,7 +5,8 @@
#define SFP_LED_WRMODE_SLAVE (1) /* green */
#define SFP_LED_WRMODE_OTHER (2) /* orange */
#define SFP_LED_WRMODE_MASTER (3) /* yellow */
#define SFP_LED_WRMODE_OFF (4) /* to off entire WRMODE LED */
#define SFP_LED_WRMODE_NO_LINK (4) /* to off entire WRMODE LED */
#define SFP_LED_WRMODE_CALIBRATING (1) /* green-blinking */
#define SFP_LED_WRMODE1 (1 << 0)
#define SFP_LED_WRMODE2 (1 << 1)
#define SFP_LED_SYNCED (1 << 2)
......
......@@ -55,7 +55,8 @@ static unsigned int run_all_state_machines(struct pp_globals *ppg)
ppi->link_up =
(p->state != HAL_PORT_STATE_LINK_DOWN &&
p->state != HAL_PORT_STATE_DISABLED);
p->state != HAL_PORT_STATE_DISABLED &&
p->state != HAL_PORT_STATE_INIT);
if (old_lu != ppi->link_up) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment