18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-only */
28c2ecf20Sopenharmony_ci/****************************************************************************
38c2ecf20Sopenharmony_ci * Driver for Solarflare network controllers and boards
48c2ecf20Sopenharmony_ci * Copyright 2005-2006 Fen Systems Ltd.
58c2ecf20Sopenharmony_ci * Copyright 2006-2013 Solarflare Communications Inc.
68c2ecf20Sopenharmony_ci */
78c2ecf20Sopenharmony_ci
88c2ecf20Sopenharmony_ci#ifndef EFX_IO_H
98c2ecf20Sopenharmony_ci#define EFX_IO_H
108c2ecf20Sopenharmony_ci
118c2ecf20Sopenharmony_ci#include <linux/io.h>
128c2ecf20Sopenharmony_ci#include <linux/spinlock.h>
138c2ecf20Sopenharmony_ci
148c2ecf20Sopenharmony_ci/**************************************************************************
158c2ecf20Sopenharmony_ci *
168c2ecf20Sopenharmony_ci * NIC register I/O
178c2ecf20Sopenharmony_ci *
188c2ecf20Sopenharmony_ci **************************************************************************
198c2ecf20Sopenharmony_ci *
208c2ecf20Sopenharmony_ci * Notes on locking strategy for the Falcon architecture:
218c2ecf20Sopenharmony_ci *
228c2ecf20Sopenharmony_ci * Many CSRs are very wide and cannot be read or written atomically.
238c2ecf20Sopenharmony_ci * Writes from the host are buffered by the Bus Interface Unit (BIU)
248c2ecf20Sopenharmony_ci * up to 128 bits.  Whenever the host writes part of such a register,
258c2ecf20Sopenharmony_ci * the BIU collects the written value and does not write to the
268c2ecf20Sopenharmony_ci * underlying register until all 4 dwords have been written.  A
278c2ecf20Sopenharmony_ci * similar buffering scheme applies to host access to the NIC's 64-bit
288c2ecf20Sopenharmony_ci * SRAM.
298c2ecf20Sopenharmony_ci *
308c2ecf20Sopenharmony_ci * Writes to different CSRs and 64-bit SRAM words must be serialised,
318c2ecf20Sopenharmony_ci * since interleaved access can result in lost writes.  We use
328c2ecf20Sopenharmony_ci * efx_nic::biu_lock for this.
338c2ecf20Sopenharmony_ci *
348c2ecf20Sopenharmony_ci * We also serialise reads from 128-bit CSRs and SRAM with the same
358c2ecf20Sopenharmony_ci * spinlock.  This may not be necessary, but it doesn't really matter
368c2ecf20Sopenharmony_ci * as there are no such reads on the fast path.
378c2ecf20Sopenharmony_ci *
388c2ecf20Sopenharmony_ci * The DMA descriptor pointers (RX_DESC_UPD and TX_DESC_UPD) are
398c2ecf20Sopenharmony_ci * 128-bit but are special-cased in the BIU to avoid the need for
408c2ecf20Sopenharmony_ci * locking in the host:
418c2ecf20Sopenharmony_ci *
428c2ecf20Sopenharmony_ci * - They are write-only.
438c2ecf20Sopenharmony_ci * - The semantics of writing to these registers are such that
448c2ecf20Sopenharmony_ci *   replacing the low 96 bits with zero does not affect functionality.
458c2ecf20Sopenharmony_ci * - If the host writes to the last dword address of such a register
468c2ecf20Sopenharmony_ci *   (i.e. the high 32 bits) the underlying register will always be
478c2ecf20Sopenharmony_ci *   written.  If the collector and the current write together do not
488c2ecf20Sopenharmony_ci *   provide values for all 128 bits of the register, the low 96 bits
498c2ecf20Sopenharmony_ci *   will be written as zero.
508c2ecf20Sopenharmony_ci * - If the host writes to the address of any other part of such a
518c2ecf20Sopenharmony_ci *   register while the collector already holds values for some other
528c2ecf20Sopenharmony_ci *   register, the write is discarded and the collector maintains its
538c2ecf20Sopenharmony_ci *   current state.
548c2ecf20Sopenharmony_ci *
558c2ecf20Sopenharmony_ci * The EF10 architecture exposes very few registers to the host and
568c2ecf20Sopenharmony_ci * most of them are only 32 bits wide.  The only exceptions are the MC
578c2ecf20Sopenharmony_ci * doorbell register pair, which has its own latching, and
588c2ecf20Sopenharmony_ci * TX_DESC_UPD, which works in a similar way to the Falcon
598c2ecf20Sopenharmony_ci * architecture.
608c2ecf20Sopenharmony_ci */
618c2ecf20Sopenharmony_ci
628c2ecf20Sopenharmony_ci#if BITS_PER_LONG == 64
638c2ecf20Sopenharmony_ci#define EFX_USE_QWORD_IO 1
648c2ecf20Sopenharmony_ci#endif
658c2ecf20Sopenharmony_ci
668c2ecf20Sopenharmony_ci/* Hardware issue requires that only 64-bit naturally aligned writes
678c2ecf20Sopenharmony_ci * are seen by hardware. Its not strictly necessary to restrict to
688c2ecf20Sopenharmony_ci * x86_64 arch, but done for safety since unusual write combining behaviour
698c2ecf20Sopenharmony_ci * can break PIO.
708c2ecf20Sopenharmony_ci */
718c2ecf20Sopenharmony_ci#ifdef CONFIG_X86_64
728c2ecf20Sopenharmony_ci/* PIO is a win only if write-combining is possible */
738c2ecf20Sopenharmony_ci#ifdef ARCH_HAS_IOREMAP_WC
748c2ecf20Sopenharmony_ci#define EFX_USE_PIO 1
758c2ecf20Sopenharmony_ci#endif
768c2ecf20Sopenharmony_ci#endif
778c2ecf20Sopenharmony_ci
788c2ecf20Sopenharmony_cistatic inline u32 efx_reg(struct efx_nic *efx, unsigned int reg)
798c2ecf20Sopenharmony_ci{
808c2ecf20Sopenharmony_ci	return efx->reg_base + reg;
818c2ecf20Sopenharmony_ci}
828c2ecf20Sopenharmony_ci
838c2ecf20Sopenharmony_ci#ifdef EFX_USE_QWORD_IO
848c2ecf20Sopenharmony_cistatic inline void _efx_writeq(struct efx_nic *efx, __le64 value,
858c2ecf20Sopenharmony_ci				  unsigned int reg)
868c2ecf20Sopenharmony_ci{
878c2ecf20Sopenharmony_ci	__raw_writeq((__force u64)value, efx->membase + reg);
888c2ecf20Sopenharmony_ci}
898c2ecf20Sopenharmony_cistatic inline __le64 _efx_readq(struct efx_nic *efx, unsigned int reg)
908c2ecf20Sopenharmony_ci{
918c2ecf20Sopenharmony_ci	return (__force __le64)__raw_readq(efx->membase + reg);
928c2ecf20Sopenharmony_ci}
938c2ecf20Sopenharmony_ci#endif
948c2ecf20Sopenharmony_ci
958c2ecf20Sopenharmony_cistatic inline void _efx_writed(struct efx_nic *efx, __le32 value,
968c2ecf20Sopenharmony_ci				  unsigned int reg)
978c2ecf20Sopenharmony_ci{
988c2ecf20Sopenharmony_ci	__raw_writel((__force u32)value, efx->membase + reg);
998c2ecf20Sopenharmony_ci}
1008c2ecf20Sopenharmony_cistatic inline __le32 _efx_readd(struct efx_nic *efx, unsigned int reg)
1018c2ecf20Sopenharmony_ci{
1028c2ecf20Sopenharmony_ci	return (__force __le32)__raw_readl(efx->membase + reg);
1038c2ecf20Sopenharmony_ci}
1048c2ecf20Sopenharmony_ci
1058c2ecf20Sopenharmony_ci/* Write a normal 128-bit CSR, locking as appropriate. */
1068c2ecf20Sopenharmony_cistatic inline void efx_writeo(struct efx_nic *efx, const efx_oword_t *value,
1078c2ecf20Sopenharmony_ci			      unsigned int reg)
1088c2ecf20Sopenharmony_ci{
1098c2ecf20Sopenharmony_ci	unsigned long flags __attribute__ ((unused));
1108c2ecf20Sopenharmony_ci
1118c2ecf20Sopenharmony_ci	netif_vdbg(efx, hw, efx->net_dev,
1128c2ecf20Sopenharmony_ci		   "writing register %x with " EFX_OWORD_FMT "\n", reg,
1138c2ecf20Sopenharmony_ci		   EFX_OWORD_VAL(*value));
1148c2ecf20Sopenharmony_ci
1158c2ecf20Sopenharmony_ci	spin_lock_irqsave(&efx->biu_lock, flags);
1168c2ecf20Sopenharmony_ci#ifdef EFX_USE_QWORD_IO
1178c2ecf20Sopenharmony_ci	_efx_writeq(efx, value->u64[0], reg + 0);
1188c2ecf20Sopenharmony_ci	_efx_writeq(efx, value->u64[1], reg + 8);
1198c2ecf20Sopenharmony_ci#else
1208c2ecf20Sopenharmony_ci	_efx_writed(efx, value->u32[0], reg + 0);
1218c2ecf20Sopenharmony_ci	_efx_writed(efx, value->u32[1], reg + 4);
1228c2ecf20Sopenharmony_ci	_efx_writed(efx, value->u32[2], reg + 8);
1238c2ecf20Sopenharmony_ci	_efx_writed(efx, value->u32[3], reg + 12);
1248c2ecf20Sopenharmony_ci#endif
1258c2ecf20Sopenharmony_ci	spin_unlock_irqrestore(&efx->biu_lock, flags);
1268c2ecf20Sopenharmony_ci}
1278c2ecf20Sopenharmony_ci
1288c2ecf20Sopenharmony_ci/* Write 64-bit SRAM through the supplied mapping, locking as appropriate. */
1298c2ecf20Sopenharmony_cistatic inline void efx_sram_writeq(struct efx_nic *efx, void __iomem *membase,
1308c2ecf20Sopenharmony_ci				   const efx_qword_t *value, unsigned int index)
1318c2ecf20Sopenharmony_ci{
1328c2ecf20Sopenharmony_ci	unsigned int addr = index * sizeof(*value);
1338c2ecf20Sopenharmony_ci	unsigned long flags __attribute__ ((unused));
1348c2ecf20Sopenharmony_ci
1358c2ecf20Sopenharmony_ci	netif_vdbg(efx, hw, efx->net_dev,
1368c2ecf20Sopenharmony_ci		   "writing SRAM address %x with " EFX_QWORD_FMT "\n",
1378c2ecf20Sopenharmony_ci		   addr, EFX_QWORD_VAL(*value));
1388c2ecf20Sopenharmony_ci
1398c2ecf20Sopenharmony_ci	spin_lock_irqsave(&efx->biu_lock, flags);
1408c2ecf20Sopenharmony_ci#ifdef EFX_USE_QWORD_IO
1418c2ecf20Sopenharmony_ci	__raw_writeq((__force u64)value->u64[0], membase + addr);
1428c2ecf20Sopenharmony_ci#else
1438c2ecf20Sopenharmony_ci	__raw_writel((__force u32)value->u32[0], membase + addr);
1448c2ecf20Sopenharmony_ci	__raw_writel((__force u32)value->u32[1], membase + addr + 4);
1458c2ecf20Sopenharmony_ci#endif
1468c2ecf20Sopenharmony_ci	spin_unlock_irqrestore(&efx->biu_lock, flags);
1478c2ecf20Sopenharmony_ci}
1488c2ecf20Sopenharmony_ci
1498c2ecf20Sopenharmony_ci/* Write a 32-bit CSR or the last dword of a special 128-bit CSR */
1508c2ecf20Sopenharmony_cistatic inline void efx_writed(struct efx_nic *efx, const efx_dword_t *value,
1518c2ecf20Sopenharmony_ci			      unsigned int reg)
1528c2ecf20Sopenharmony_ci{
1538c2ecf20Sopenharmony_ci	netif_vdbg(efx, hw, efx->net_dev,
1548c2ecf20Sopenharmony_ci		   "writing register %x with "EFX_DWORD_FMT"\n",
1558c2ecf20Sopenharmony_ci		   reg, EFX_DWORD_VAL(*value));
1568c2ecf20Sopenharmony_ci
1578c2ecf20Sopenharmony_ci	/* No lock required */
1588c2ecf20Sopenharmony_ci	_efx_writed(efx, value->u32[0], reg);
1598c2ecf20Sopenharmony_ci}
1608c2ecf20Sopenharmony_ci
1618c2ecf20Sopenharmony_ci/* Read a 128-bit CSR, locking as appropriate. */
1628c2ecf20Sopenharmony_cistatic inline void efx_reado(struct efx_nic *efx, efx_oword_t *value,
1638c2ecf20Sopenharmony_ci			     unsigned int reg)
1648c2ecf20Sopenharmony_ci{
1658c2ecf20Sopenharmony_ci	unsigned long flags __attribute__ ((unused));
1668c2ecf20Sopenharmony_ci
1678c2ecf20Sopenharmony_ci	spin_lock_irqsave(&efx->biu_lock, flags);
1688c2ecf20Sopenharmony_ci	value->u32[0] = _efx_readd(efx, reg + 0);
1698c2ecf20Sopenharmony_ci	value->u32[1] = _efx_readd(efx, reg + 4);
1708c2ecf20Sopenharmony_ci	value->u32[2] = _efx_readd(efx, reg + 8);
1718c2ecf20Sopenharmony_ci	value->u32[3] = _efx_readd(efx, reg + 12);
1728c2ecf20Sopenharmony_ci	spin_unlock_irqrestore(&efx->biu_lock, flags);
1738c2ecf20Sopenharmony_ci
1748c2ecf20Sopenharmony_ci	netif_vdbg(efx, hw, efx->net_dev,
1758c2ecf20Sopenharmony_ci		   "read from register %x, got " EFX_OWORD_FMT "\n", reg,
1768c2ecf20Sopenharmony_ci		   EFX_OWORD_VAL(*value));
1778c2ecf20Sopenharmony_ci}
1788c2ecf20Sopenharmony_ci
1798c2ecf20Sopenharmony_ci/* Read 64-bit SRAM through the supplied mapping, locking as appropriate. */
1808c2ecf20Sopenharmony_cistatic inline void efx_sram_readq(struct efx_nic *efx, void __iomem *membase,
1818c2ecf20Sopenharmony_ci				  efx_qword_t *value, unsigned int index)
1828c2ecf20Sopenharmony_ci{
1838c2ecf20Sopenharmony_ci	unsigned int addr = index * sizeof(*value);
1848c2ecf20Sopenharmony_ci	unsigned long flags __attribute__ ((unused));
1858c2ecf20Sopenharmony_ci
1868c2ecf20Sopenharmony_ci	spin_lock_irqsave(&efx->biu_lock, flags);
1878c2ecf20Sopenharmony_ci#ifdef EFX_USE_QWORD_IO
1888c2ecf20Sopenharmony_ci	value->u64[0] = (__force __le64)__raw_readq(membase + addr);
1898c2ecf20Sopenharmony_ci#else
1908c2ecf20Sopenharmony_ci	value->u32[0] = (__force __le32)__raw_readl(membase + addr);
1918c2ecf20Sopenharmony_ci	value->u32[1] = (__force __le32)__raw_readl(membase + addr + 4);
1928c2ecf20Sopenharmony_ci#endif
1938c2ecf20Sopenharmony_ci	spin_unlock_irqrestore(&efx->biu_lock, flags);
1948c2ecf20Sopenharmony_ci
1958c2ecf20Sopenharmony_ci	netif_vdbg(efx, hw, efx->net_dev,
1968c2ecf20Sopenharmony_ci		   "read from SRAM address %x, got "EFX_QWORD_FMT"\n",
1978c2ecf20Sopenharmony_ci		   addr, EFX_QWORD_VAL(*value));
1988c2ecf20Sopenharmony_ci}
1998c2ecf20Sopenharmony_ci
2008c2ecf20Sopenharmony_ci/* Read a 32-bit CSR or SRAM */
2018c2ecf20Sopenharmony_cistatic inline void efx_readd(struct efx_nic *efx, efx_dword_t *value,
2028c2ecf20Sopenharmony_ci				unsigned int reg)
2038c2ecf20Sopenharmony_ci{
2048c2ecf20Sopenharmony_ci	value->u32[0] = _efx_readd(efx, reg);
2058c2ecf20Sopenharmony_ci	netif_vdbg(efx, hw, efx->net_dev,
2068c2ecf20Sopenharmony_ci		   "read from register %x, got "EFX_DWORD_FMT"\n",
2078c2ecf20Sopenharmony_ci		   reg, EFX_DWORD_VAL(*value));
2088c2ecf20Sopenharmony_ci}
2098c2ecf20Sopenharmony_ci
2108c2ecf20Sopenharmony_ci/* Write a 128-bit CSR forming part of a table */
2118c2ecf20Sopenharmony_cistatic inline void
2128c2ecf20Sopenharmony_ciefx_writeo_table(struct efx_nic *efx, const efx_oword_t *value,
2138c2ecf20Sopenharmony_ci		 unsigned int reg, unsigned int index)
2148c2ecf20Sopenharmony_ci{
2158c2ecf20Sopenharmony_ci	efx_writeo(efx, value, reg + index * sizeof(efx_oword_t));
2168c2ecf20Sopenharmony_ci}
2178c2ecf20Sopenharmony_ci
2188c2ecf20Sopenharmony_ci/* Read a 128-bit CSR forming part of a table */
2198c2ecf20Sopenharmony_cistatic inline void efx_reado_table(struct efx_nic *efx, efx_oword_t *value,
2208c2ecf20Sopenharmony_ci				     unsigned int reg, unsigned int index)
2218c2ecf20Sopenharmony_ci{
2228c2ecf20Sopenharmony_ci	efx_reado(efx, value, reg + index * sizeof(efx_oword_t));
2238c2ecf20Sopenharmony_ci}
2248c2ecf20Sopenharmony_ci
2258c2ecf20Sopenharmony_ci/* default VI stride (step between per-VI registers) is 8K on EF10 and
2268c2ecf20Sopenharmony_ci * 64K on EF100
2278c2ecf20Sopenharmony_ci */
2288c2ecf20Sopenharmony_ci#define EFX_DEFAULT_VI_STRIDE		0x2000
2298c2ecf20Sopenharmony_ci#define EF100_DEFAULT_VI_STRIDE		0x10000
2308c2ecf20Sopenharmony_ci
2318c2ecf20Sopenharmony_ci/* Calculate offset to page-mapped register */
2328c2ecf20Sopenharmony_cistatic inline unsigned int efx_paged_reg(struct efx_nic *efx, unsigned int page,
2338c2ecf20Sopenharmony_ci					 unsigned int reg)
2348c2ecf20Sopenharmony_ci{
2358c2ecf20Sopenharmony_ci	return page * efx->vi_stride + reg;
2368c2ecf20Sopenharmony_ci}
2378c2ecf20Sopenharmony_ci
2388c2ecf20Sopenharmony_ci/* Write the whole of RX_DESC_UPD or TX_DESC_UPD */
2398c2ecf20Sopenharmony_cistatic inline void _efx_writeo_page(struct efx_nic *efx, efx_oword_t *value,
2408c2ecf20Sopenharmony_ci				    unsigned int reg, unsigned int page)
2418c2ecf20Sopenharmony_ci{
2428c2ecf20Sopenharmony_ci	reg = efx_paged_reg(efx, page, reg);
2438c2ecf20Sopenharmony_ci
2448c2ecf20Sopenharmony_ci	netif_vdbg(efx, hw, efx->net_dev,
2458c2ecf20Sopenharmony_ci		   "writing register %x with " EFX_OWORD_FMT "\n", reg,
2468c2ecf20Sopenharmony_ci		   EFX_OWORD_VAL(*value));
2478c2ecf20Sopenharmony_ci
2488c2ecf20Sopenharmony_ci#ifdef EFX_USE_QWORD_IO
2498c2ecf20Sopenharmony_ci	_efx_writeq(efx, value->u64[0], reg + 0);
2508c2ecf20Sopenharmony_ci	_efx_writeq(efx, value->u64[1], reg + 8);
2518c2ecf20Sopenharmony_ci#else
2528c2ecf20Sopenharmony_ci	_efx_writed(efx, value->u32[0], reg + 0);
2538c2ecf20Sopenharmony_ci	_efx_writed(efx, value->u32[1], reg + 4);
2548c2ecf20Sopenharmony_ci	_efx_writed(efx, value->u32[2], reg + 8);
2558c2ecf20Sopenharmony_ci	_efx_writed(efx, value->u32[3], reg + 12);
2568c2ecf20Sopenharmony_ci#endif
2578c2ecf20Sopenharmony_ci}
2588c2ecf20Sopenharmony_ci#define efx_writeo_page(efx, value, reg, page)				\
2598c2ecf20Sopenharmony_ci	_efx_writeo_page(efx, value,					\
2608c2ecf20Sopenharmony_ci			 reg +						\
2618c2ecf20Sopenharmony_ci			 BUILD_BUG_ON_ZERO((reg) != 0x830 && (reg) != 0xa10), \
2628c2ecf20Sopenharmony_ci			 page)
2638c2ecf20Sopenharmony_ci
2648c2ecf20Sopenharmony_ci/* Write a page-mapped 32-bit CSR (EVQ_RPTR, EVQ_TMR (EF10), or the
2658c2ecf20Sopenharmony_ci * high bits of RX_DESC_UPD or TX_DESC_UPD)
2668c2ecf20Sopenharmony_ci */
2678c2ecf20Sopenharmony_cistatic inline void
2688c2ecf20Sopenharmony_ci_efx_writed_page(struct efx_nic *efx, const efx_dword_t *value,
2698c2ecf20Sopenharmony_ci		 unsigned int reg, unsigned int page)
2708c2ecf20Sopenharmony_ci{
2718c2ecf20Sopenharmony_ci	efx_writed(efx, value, efx_paged_reg(efx, page, reg));
2728c2ecf20Sopenharmony_ci}
2738c2ecf20Sopenharmony_ci#define efx_writed_page(efx, value, reg, page)				\
2748c2ecf20Sopenharmony_ci	_efx_writed_page(efx, value,					\
2758c2ecf20Sopenharmony_ci			 reg +						\
2768c2ecf20Sopenharmony_ci			 BUILD_BUG_ON_ZERO((reg) != 0x180 &&		\
2778c2ecf20Sopenharmony_ci					   (reg) != 0x200 &&		\
2788c2ecf20Sopenharmony_ci					   (reg) != 0x400 &&		\
2798c2ecf20Sopenharmony_ci					   (reg) != 0x420 &&		\
2808c2ecf20Sopenharmony_ci					   (reg) != 0x830 &&		\
2818c2ecf20Sopenharmony_ci					   (reg) != 0x83c &&		\
2828c2ecf20Sopenharmony_ci					   (reg) != 0xa18 &&		\
2838c2ecf20Sopenharmony_ci					   (reg) != 0xa1c),		\
2848c2ecf20Sopenharmony_ci			 page)
2858c2ecf20Sopenharmony_ci
2868c2ecf20Sopenharmony_ci/* Write TIMER_COMMAND.  This is a page-mapped 32-bit CSR, but a bug
2878c2ecf20Sopenharmony_ci * in the BIU means that writes to TIMER_COMMAND[0] invalidate the
2888c2ecf20Sopenharmony_ci * collector register.
2898c2ecf20Sopenharmony_ci */
2908c2ecf20Sopenharmony_cistatic inline void _efx_writed_page_locked(struct efx_nic *efx,
2918c2ecf20Sopenharmony_ci					   const efx_dword_t *value,
2928c2ecf20Sopenharmony_ci					   unsigned int reg,
2938c2ecf20Sopenharmony_ci					   unsigned int page)
2948c2ecf20Sopenharmony_ci{
2958c2ecf20Sopenharmony_ci	unsigned long flags __attribute__ ((unused));
2968c2ecf20Sopenharmony_ci
2978c2ecf20Sopenharmony_ci	if (page == 0) {
2988c2ecf20Sopenharmony_ci		spin_lock_irqsave(&efx->biu_lock, flags);
2998c2ecf20Sopenharmony_ci		efx_writed(efx, value, efx_paged_reg(efx, page, reg));
3008c2ecf20Sopenharmony_ci		spin_unlock_irqrestore(&efx->biu_lock, flags);
3018c2ecf20Sopenharmony_ci	} else {
3028c2ecf20Sopenharmony_ci		efx_writed(efx, value, efx_paged_reg(efx, page, reg));
3038c2ecf20Sopenharmony_ci	}
3048c2ecf20Sopenharmony_ci}
3058c2ecf20Sopenharmony_ci#define efx_writed_page_locked(efx, value, reg, page)			\
3068c2ecf20Sopenharmony_ci	_efx_writed_page_locked(efx, value,				\
3078c2ecf20Sopenharmony_ci				reg + BUILD_BUG_ON_ZERO((reg) != 0x420), \
3088c2ecf20Sopenharmony_ci				page)
3098c2ecf20Sopenharmony_ci
3108c2ecf20Sopenharmony_ci#endif /* EFX_IO_H */
311