net: macb: Add separate definition for PPM fraction
The scaled ppm parameter passed to _adjfine() contains a 16 bit fraction. This just happens to be the same as SUBNSINCR_SIZE now. Hence define this separately. Signed-off-by: Harini Katakam <harini.katakam@xilinx.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
79293f4967
commit
a8ee4dc1b5
@@ -135,7 +135,7 @@ static int gem_ptp_adjfine(struct ptp_clock_info *ptp, long scaled_ppm)
|
||||
* (temp / USEC_PER_SEC) + 0.5
|
||||
*/
|
||||
adj += (USEC_PER_SEC >> 1);
|
||||
adj >>= GEM_SUBNSINCR_SIZE; /* remove fractions */
|
||||
adj >>= PPM_FRACTION; /* remove fractions */
|
||||
adj = div_u64(adj, USEC_PER_SEC);
|
||||
adj = neg_adj ? (word - adj) : (word + adj);
|
||||
|
||||
|
Reference in New Issue
Block a user