net: dsa: mv88e6xxx: add accessors for PTP/TAI registers
authorBrandon Streiff <brandon.streiff@ni.com>
Wed, 14 Feb 2018 00:07:44 +0000 (01:07 +0100)
committerDavid S. Miller <davem@davemloft.net>
Wed, 14 Feb 2018 19:33:36 +0000 (14:33 -0500)
commit0d632c3d6fe3b909fa481ddd51b5cb76ad18f921
tree2fbbda7284ad84419948042b7d4be605df240709
parentb000be95e5b903c686349dff5d1bf8e2dcf76aef
net: dsa: mv88e6xxx: add accessors for PTP/TAI registers

This patch implements support for accessing the Precision Time Protocol
and Time Application Interface registers via the AVB register interface
in the Global 2 register.

The register interface differs slightly between different models; older
models use a 3-bit operations field, while newer models use a 2-bit
field. The operations values and the special "global port" values are
different between the two. This is a similar split to the differences
in the "Ingress Rate" register between models, so, like in that case,
we call the two variants "6352" and "6390" and create an ops structure
to abstract between the two.

checkpatch fixups by Andrew Lunn

Signed-off-by: Brandon Streiff <brandon.streiff@ni.com>
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/mv88e6xxx/Makefile
drivers/net/dsa/mv88e6xxx/chip.c
drivers/net/dsa/mv88e6xxx/chip.h
drivers/net/dsa/mv88e6xxx/global2.h
drivers/net/dsa/mv88e6xxx/global2_avb.c [new file with mode: 0644]