zynqmp ptp clock adjustment

39 Views Asked by At

We have a zynqmp based board and we use it as ptp slave. When I run phc_ctl /dev/ptp0 caps, where /dev/ptp0 is macb/gem0 ptp, I get 64000000, which is hardcoded in the following function, in macb_ptp.c.

static s32 gem_get_ptp_max_adj(void)

{

return 64000000;

}

and when I call like this, I get frequency = 6892.211

double f = 0.0;

struct timex tx;

memset(&tx, 0, sizeof(tx));

if (ClockAdjtime(tx) >= 0) {

f = tx.freq / 65.536;

}

Can anyone tell me how these 6892.211 and 64000000 are derived?

0

There are 0 best solutions below