Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Two cases of overlapping changes, nothing fancy. Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
@@ -496,7 +496,11 @@
|
||||
|
||||
/* Bitfields in TISUBN */
|
||||
#define GEM_SUBNSINCR_OFFSET 0
|
||||
#define GEM_SUBNSINCR_SIZE 16
|
||||
#define GEM_SUBNSINCRL_OFFSET 24
|
||||
#define GEM_SUBNSINCRL_SIZE 8
|
||||
#define GEM_SUBNSINCRH_OFFSET 0
|
||||
#define GEM_SUBNSINCRH_SIZE 16
|
||||
#define GEM_SUBNSINCR_SIZE 24
|
||||
|
||||
/* Bitfields in TI */
|
||||
#define GEM_NSINCR_OFFSET 0
|
||||
@@ -834,6 +838,9 @@ struct gem_tx_ts {
|
||||
/* limit RX checksum offload to TCP and UDP packets */
|
||||
#define GEM_RX_CSUM_CHECKED_MASK 2
|
||||
|
||||
/* Scaled PPM fraction */
|
||||
#define PPM_FRACTION 16
|
||||
|
||||
/* struct macb_tx_skb - data about an skb which is being transmitted
|
||||
* @skb: skb currently being transmitted, only set for the last buffer
|
||||
* of the frame
|
||||
|
@@ -104,7 +104,10 @@ static int gem_tsu_incr_set(struct macb *bp, struct tsu_incr *incr_spec)
|
||||
* to take effect.
|
||||
*/
|
||||
spin_lock_irqsave(&bp->tsu_clk_lock, flags);
|
||||
gem_writel(bp, TISUBN, GEM_BF(SUBNSINCR, incr_spec->sub_ns));
|
||||
/* RegBit[15:0] = Subns[23:8]; RegBit[31:24] = Subns[7:0] */
|
||||
gem_writel(bp, TISUBN, GEM_BF(SUBNSINCRL, incr_spec->sub_ns) |
|
||||
GEM_BF(SUBNSINCRH, (incr_spec->sub_ns >>
|
||||
GEM_SUBNSINCRL_SIZE)));
|
||||
gem_writel(bp, TI, GEM_BF(NSINCR, incr_spec->ns));
|
||||
spin_unlock_irqrestore(&bp->tsu_clk_lock, flags);
|
||||
|
||||
@@ -135,7 +138,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