linux/drivers/net/ethernet
Fugang Duan 34270f5f6f net: fec: ptp: correct the ENET_ATCOR value
The current driver adjust freq formula is:
fe * diff = ppb * pc
Note:
  fe: ENET ref clock frequency in Hz
  diff = inc_corr - inc: difference between default increment and correction increment
  ppb: parts per billion adjustment from base
  pc: correction period (in number of fe clock cycles)

The correction increment will be used after N cycles of regular increments,
not every N cycles (with N being the correction period). For example, set ENET_ATCOR=4,
INC=8, INC_CORR=9, there will be 4 increments of 8 (ENET_ATINC[INC]) , followed by 1
increment of 9 (ENET_ATINC[INC_CORR]).

So, the correct formula is:
	fe * diff = ppb * (pc + 1)

For ENET_ATCOR, a value 0 disables the correction counter and no corrections occur.
So base on the origin formula, set pc = pc > 1 ? pc - 1 : pc.

Signed-off-by: Fugang Duan <B38611@freescale.com>
Signed-off-by: Frank Li <Frank.Li@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-06-07 15:30:42 -07:00
..
3com drivers/net: Use setup_timer and mod_timer 2015-02-11 19:40:12 -08:00
8390 net:treewide: Fix typo in drivers/net 2015-04-27 13:40:53 -04:00
adaptec
adi ptp: blackfin: use helpers for converting ns to timespec. 2015-03-31 17:19:19 -04:00
aeroflex net: greth: constify of_device_id array 2015-03-17 15:00:22 -04:00
agere
allwinner ethernet: codespell comment spelling fixes 2015-03-08 22:54:22 -04:00
alteon
altera altera_tse: Correct rx packet length 2015-04-29 15:19:34 -04:00
amd amd-xgbe: Add more netif_dbg output to the driver 2015-05-25 00:13:58 -04:00
apm Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2015-05-13 14:31:43 -04:00
apple powerpc updates for 4.1 2015-04-16 13:53:32 -05:00
arc ethernet: arc: ARC_EMAC and EMAC_ROCKCHIP should depend on HAS_DMA 2015-04-23 14:09:58 -04:00
atheros trivial: net: atl1e: atl1e_hw.h: fix 0x0x prefix 2015-04-29 14:56:39 -04:00
broadcom net: bcmgenet: improve TX timeout 2015-06-07 15:19:06 -07:00
brocade bna: fix soft lock-up during firmware initialization failure 2015-05-30 23:46:49 -07:00
cadence Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2015-05-23 01:22:35 -04:00
calxeda ethernet: codespell comment spelling fixes 2015-03-08 22:54:22 -04:00
cavium net: thunderx: use GFP_KERNEL in thread context 2015-06-02 12:49:33 -07:00
chelsio cxgb4: Fix static checker warning 2015-06-05 21:31:58 -07:00
cirrus ethernet: codespell comment spelling fixes 2015-03-08 22:54:22 -04:00
cisco net: Add full IPv6 addresses to flow_keys 2015-06-04 15:44:30 -07:00
davicom
dec net: tulip: rearrange order of searching for substrings 2015-06-03 20:21:24 -07:00
dlink net: dl2k: Use setup_timer 2015-05-31 21:34:38 -07:00
emulex Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2015-06-01 22:51:30 -07:00
faraday
freescale net: fec: ptp: correct the ENET_ATCOR value 2015-06-07 15:30:42 -07:00
fujitsu
hisilicon net: batch of last_rx update avoidance in ethernet drivers. 2015-05-14 17:38:17 -04:00
hp
i825xx
ibm Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2015-06-01 22:51:30 -07:00
icplus
intel e1000e: Bump the version to 3.2.5 2015-06-03 04:13:39 -07:00
marvell net: mv643xx_eth: Use setup_timer 2015-05-31 21:23:28 -07:00
mellanox mlx5: Enable mutual support for IB and Ethernet 2015-06-04 16:41:02 -07:00
micrel ethernet: micrel: use time_after_eq 2015-06-03 19:38:46 -07:00
microchip
moxa net: batch of last_rx update avoidance in ethernet drivers. 2015-05-14 17:38:17 -04:00
myricom ethernet: myri10ge: use arch_phys_wc_add() 2015-04-23 14:28:14 -04:00
natsemi
neterion neterion: s2io: Fix kernel doc formatting 2015-05-25 17:45:27 -04:00
nuvoton
nvidia
nxp
octeon netdev: octeon_mgmt: constify of_device_id array 2015-03-17 15:00:22 -04:00
oki-semi ethernet: codespell comment spelling fixes 2015-03-08 22:54:22 -04:00
packetengines ethernet: codespell comment spelling fixes 2015-03-08 22:54:22 -04:00
pasemi net: pasemi: Use setup_timer and mod_timer 2015-03-01 13:40:23 -05:00
qlogic Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2015-06-01 22:51:30 -07:00
qualcomm Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2015-05-13 14:31:43 -04:00
rdc
realtek r8169: Do not use dev_kfree_skb in xmit path 2015-05-04 00:06:55 -04:00
renesas sh_eth: Mitigate lost statistics updates 2015-03-04 15:40:54 -05:00
rocker rocker: remove support for legacy VLAN ndo ops 2015-06-01 17:00:09 -07:00
samsung ethernet: codespell comment spelling fixes 2015-03-08 22:54:22 -04:00
seeq
sfc sfc: leak vports if a VF is assigned during PF unload 2015-06-02 12:57:32 -07:00
sgi
silan
sis
smsc Revert "Revert "smc91x: retrieve IRQ and trigger flags in a modern way"" 2015-05-04 15:12:33 -04:00
stmicro Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2015-06-01 22:51:30 -07:00
sun sungem, sunhme, sunvnet: Update drivers to use dma_wmb/rmb 2015-04-08 12:15:14 -04:00
tehuti
ti net: cpsw: remove redundant calls disabling dma interrupts. 2015-05-25 18:19:09 -04:00
tile net: batch of last_rx update avoidance in ethernet drivers. 2015-05-14 17:38:17 -04:00
toshiba spider_net: Use DECLARE_BITMAP 2015-05-21 17:17:50 -04:00
tundra
via via-rhine: close SMP transmit races. 2015-05-04 00:18:27 -04:00
wiznet Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2015-03-20 18:51:09 -04:00
xilinx net: ll_temac: Remove sparse warnings 2015-06-07 15:20:42 -07:00
xircom
xscale Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2015-03-03 21:16:48 -05:00
dnet.c
dnet.h
ec_bhf.c
ethoc.c net: ethoc: constify of_device_id array 2015-03-17 15:00:21 -04:00
fealnx.c
jme.c
jme.h
Kconfig net: Adding support for Cavium ThunderX network controller 2015-05-27 14:19:44 -04:00
korina.c
lantiq_etop.c
Makefile net: Adding support for Cavium ThunderX network controller 2015-05-27 14:19:44 -04:00
netx-eth.c