diff --git a/dev/endpoint.c b/dev/endpoint.c index d2c2233f95b61f3141cedccdfe8135d6d3b985a5..76c1d522b0c992c3129588b15e3294ace6e172f3 100644 --- a/dev/endpoint.c +++ b/dev/endpoint.c @@ -13,6 +13,7 @@ LGPL 2.1 #include "board.h" #include "syscon.h" #include +#include "eeprom.h" #include #include @@ -154,8 +155,8 @@ int ep_get_deltas(uint32_t *delta_tx, uint32_t *delta_rx) { /* fixme: these values should be stored in calibration block in the EEPROM on the FMC. Also, the TX/RX delays of a particular SFP should be added here */ - *delta_tx = 46407; - *delta_rx = 273593 + PICOS_PER_SERIAL_BIT * MDIO_WR_SPEC_BSLIDE_R(pcs_read(MDIO_REG_WR_SPEC)); + *delta_tx = sfp_deltaTx; + *delta_rx = sfp_deltaRx + PICOS_PER_SERIAL_BIT * MDIO_WR_SPEC_BSLIDE_R(pcs_read(MDIO_REG_WR_SPEC)); return 0; }