diff options
author | Laurence Evans <levans@solarflare.com> | 2013-03-07 15:46:58 +0400 |
---|---|---|
committer | Ben Hutchings <bhutchings@solarflare.com> | 2013-08-28 01:27:02 +0400 |
commit | 977a5d5d32f4797ace5ef65ee3f2232a1c88a274 (patch) | |
tree | ae1d9a9e6348a3017521ab604a82cd260ab1a498 /drivers/net/ethernet/sfc/siena.c | |
parent | c1d828bdca00f29e00c1650750ce0445d8b4458d (diff) | |
download | linux-977a5d5d32f4797ace5ef65ee3f2232a1c88a274.tar.xz |
sfc: Add a function pointer to abstract write of host time into NIC shared memory
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Diffstat (limited to 'drivers/net/ethernet/sfc/siena.c')
-rw-r--r-- | drivers/net/ethernet/sfc/siena.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/net/ethernet/sfc/siena.c b/drivers/net/ethernet/sfc/siena.c index a51d90c4c6cf..3c0a54400260 100644 --- a/drivers/net/ethernet/sfc/siena.c +++ b/drivers/net/ethernet/sfc/siena.c @@ -855,6 +855,19 @@ fail: /************************************************************************** * + * PTP + * + ************************************************************************** + */ + +static void siena_ptp_write_host_time(struct efx_nic *efx, u32 host_time) +{ + _efx_writed(efx, cpu_to_le32(host_time), + FR_CZ_MC_TREG_SMEM + MC_SMEM_P0_PTP_TIME_OFST); +} + +/************************************************************************** + * * Revision-dependent attributes used by efx.c and nic.c * ************************************************************************** @@ -943,6 +956,7 @@ const struct efx_nic_type siena_a0_nic_type = { .mtd_write = efx_mcdi_mtd_write, .mtd_sync = efx_mcdi_mtd_sync, #endif + .ptp_write_host_time = siena_ptp_write_host_time, .revision = EFX_REV_SIENA_A0, .txd_ptr_tbl_base = FR_BZ_TX_DESC_PTR_TBL, |