Commit 54593958 authored by Adam Wujek's avatar Adam Wujek 💬

include: move sfp related definitions

Signed-off-by: Adam Wujek's avatarAdam Wujek <adam.wujek@cern.ch>
parent cbbfef4e
......@@ -15,6 +15,11 @@
#include "i2c.h"
#include "sfp.h"
/* Calibration data (from EEPROM if available) */
int32_t sfp_alpha = 73622176; /* default values if could not read EEPROM */
int32_t sfp_deltaTx = 0;
int32_t sfp_deltaRx = 0;
int sfp_present(void)
{
return !gpio_in(GPIO_SFP_DET);
......
......@@ -9,6 +9,12 @@
#include <stdint.h>
#define SFP_PN_LEN 16
extern int32_t sfp_alpha;
extern int32_t sfp_deltaTx;
extern int32_t sfp_deltaRx;
/* Returns 1 if there's a SFP transceiver inserted in the socket. */
int sfp_present(void);
......
......@@ -9,6 +9,8 @@
#ifndef __STORAGE_H
#define __STORAGE_H
#include "sfp.h"
#define SFP_SECTION_PATTERN 0xdeadbeef
#if defined CONFIG_LEGACY_EEPROM
......@@ -38,16 +40,12 @@
#define SFPS_MAX 4
#endif
#define SFP_PN_LEN 16
#define EE_RET_I2CERR -1
#define EE_RET_DBFULL -2
#define EE_RET_CORRPT -3
#define EE_RET_POSERR -4
extern int32_t sfp_alpha;
extern int32_t sfp_deltaTx;
extern int32_t sfp_deltaRx;
extern uint32_t cal_phase_transition;
extern uint8_t has_eeprom;
......
......@@ -38,11 +38,6 @@ int wrc_ui_mode = UI_SHELL_MODE;
int wrc_ui_refperiod = TICS_PER_SECOND; /* 1 sec */
int wrc_phase_tracking = 1;
///////////////////////////////////
//Calibration data (from EEPROM if available)
int32_t sfp_alpha = 73622176; //default values if could not read EEPROM
int32_t sfp_deltaTx = 0;
int32_t sfp_deltaRx = 0;
uint32_t cal_phase_transition = 2389;
int wrc_vlan_number = CONFIG_VLAN_NR;
......
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