diff options
author | Alexander Duyck <alexander.h.duyck@intel.com> | 2014-09-20 19:53:40 -0400 |
---|---|---|
committer | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2014-09-23 03:59:22 -0700 |
commit | 5f226ddb5b0c477bd512085b0b1d1052a24f0020 (patch) | |
tree | 75b962d536ceac983d15339c91516e487c523ff4 /drivers/net/ethernet/intel/fm10k/fm10k_common.h | |
parent | fm10k: Add support for debugfs (diff) | |
download | linux-dev-5f226ddb5b0c477bd512085b0b1d1052a24f0020.tar.xz linux-dev-5f226ddb5b0c477bd512085b0b1d1052a24f0020.zip |
fm10k: Add support for ptp to hw specific files
This change adds the messaging support needed to support PTP. In the case
of Tx timestamps it is necessary for the Switch Management entity to return
the frames via the mailbox as the host interface cannot know which port the
timestamp will be delivered to. In addition there is only one clock on the
entire switch, as such the entity that has BAR 4 access is the only one who
can actually update the frequency as it is the only one with access.
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Acked-by: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/ethernet/intel/fm10k/fm10k_common.h')
-rw-r--r-- | drivers/net/ethernet/intel/fm10k/fm10k_common.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/net/ethernet/intel/fm10k/fm10k_common.h b/drivers/net/ethernet/intel/fm10k/fm10k_common.h index 8250e1432a27..45e4e5b1f20a 100644 --- a/drivers/net/ethernet/intel/fm10k/fm10k_common.h +++ b/drivers/net/ethernet/intel/fm10k/fm10k_common.h @@ -39,6 +39,14 @@ do { \ writel((val), &hw_addr[(reg)]); \ } while (0) +/* Switch register write operations, index using DWORDS */ +#define fm10k_write_sw_reg(hw, reg, val) \ +do { \ + u32 __iomem *sw_addr = ACCESS_ONCE((hw)->sw_addr); \ + if (!FM10K_REMOVED(sw_addr)) \ + writel((val), &sw_addr[(reg)]); \ +} while (0) + /* read ctrl register which has no clear on read fields as PCIe flush */ #define fm10k_write_flush(hw) fm10k_read_reg((hw), FM10K_CTRL) s32 fm10k_get_bus_info_generic(struct fm10k_hw *hw); |