Commit 9c517165 authored by Ben Hutchings's avatar Ben Hutchings

sfc: Add EF10 register and structure definitions

Also update comments and assertions in io.h:
- EF10 does not have a general BIU collector and does not have the
  bug affecting TIMER_COMMAND_REG[0] on Falcon/Siena
- The WPTR field moved within RX_DESC_UPD_REG and TX_DESC_UPD_REG.
  Adjust efx_writed_page() accordingly
Signed-off-by: default avatarBen Hutchings <bhutchings@solarflare.com>
parent ba8977bd
This diff is collapsed.
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
* *
************************************************************************** **************************************************************************
* *
* Notes on locking strategy: * Notes on locking strategy for the Falcon architecture:
* *
* Many CSRs are very wide and cannot be read or written atomically. * Many CSRs are very wide and cannot be read or written atomically.
* Writes from the host are buffered by the Bus Interface Unit (BIU) * Writes from the host are buffered by the Bus Interface Unit (BIU)
...@@ -54,6 +54,12 @@ ...@@ -54,6 +54,12 @@
* register while the collector already holds values for some other * register while the collector already holds values for some other
* register, the write is discarded and the collector maintains its * register, the write is discarded and the collector maintains its
* current state. * current state.
*
* The EF10 architecture exposes very few registers to the host and
* most of them are only 32 bits wide. The only exceptions are the MC
* doorbell register pair, which has its own latching, and
* TX_DESC_UPD, which works in a similar way to the Falcon
* architecture.
*/ */
#if BITS_PER_LONG == 64 #if BITS_PER_LONG == 64
...@@ -237,8 +243,8 @@ static inline void _efx_writeo_page(struct efx_nic *efx, efx_oword_t *value, ...@@ -237,8 +243,8 @@ static inline void _efx_writeo_page(struct efx_nic *efx, efx_oword_t *value,
BUILD_BUG_ON_ZERO((reg) != 0x830 && (reg) != 0xa10), \ BUILD_BUG_ON_ZERO((reg) != 0x830 && (reg) != 0xa10), \
page) page)
/* Write a page-mapped 32-bit CSR (EVQ_RPTR or the high bits of /* Write a page-mapped 32-bit CSR (EVQ_RPTR, EVQ_TMR (EF10), or the
* RX_DESC_UPD or TX_DESC_UPD) * high bits of RX_DESC_UPD or TX_DESC_UPD)
*/ */
static inline void static inline void
_efx_writed_page(struct efx_nic *efx, const efx_dword_t *value, _efx_writed_page(struct efx_nic *efx, const efx_dword_t *value,
...@@ -249,8 +255,12 @@ _efx_writed_page(struct efx_nic *efx, const efx_dword_t *value, ...@@ -249,8 +255,12 @@ _efx_writed_page(struct efx_nic *efx, const efx_dword_t *value,
#define efx_writed_page(efx, value, reg, page) \ #define efx_writed_page(efx, value, reg, page) \
_efx_writed_page(efx, value, \ _efx_writed_page(efx, value, \
reg + \ reg + \
BUILD_BUG_ON_ZERO((reg) != 0x400 && (reg) != 0x83c \ BUILD_BUG_ON_ZERO((reg) != 0x400 && \
&& (reg) != 0xa1c), \ (reg) != 0x420 && \
(reg) != 0x830 && \
(reg) != 0x83c && \
(reg) != 0xa18 && \
(reg) != 0xa1c), \
page) page)
/* Write TIMER_COMMAND. This is a page-mapped 32-bit CSR, but a bug /* Write TIMER_COMMAND. This is a page-mapped 32-bit CSR, but a bug
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment