tg3: Enable support for timesync gpio output
authorNithin Sujir <nsujir@broadcom.com>
Mon, 29 Jul 2013 20:58:38 +0000 (13:58 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 30 Jul 2013 06:38:52 +0000 (23:38 -0700)
commit92e6457d4cf68ef69bc4f98330c93e198df06a43
treea60ad7edf04f1881225b8e4eb04fd3f394221c24
parent4c305fa2cbe2a85c34899763fcefb843c87b591d
tg3: Enable support for timesync gpio output

The PTP_CAPABLE tg3 devices have a gpio output that is toggled when the
free running counter matches a watchdog value. This patch adds support
to set the watchdog and enable this feature.

Since the output is controlled via bits in the EAV_REF_CLCK_CTL
register, we have to read-modify-write it when we stop/resume.

Cc: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: Nithin Nayak Sujir <nsujir@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/tg3.c
drivers/net/ethernet/broadcom/tg3.h