xref: /linux/drivers/net/ethernet/intel/idpf/idpf_mem.h (revision c532de5a67a70f8533d495f8f2aaa9a0491c3ad0)
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /* Copyright (C) 2023 Intel Corporation */
3 
4 #ifndef _IDPF_MEM_H_
5 #define _IDPF_MEM_H_
6 
7 #include <linux/io.h>
8 
9 struct idpf_dma_mem {
10 	void *va;
11 	dma_addr_t pa;
12 	size_t size;
13 };
14 
15 #define wr32(a, reg, value)	writel((value), ((a)->hw_addr + (reg)))
16 #define rd32(a, reg)		readl((a)->hw_addr + (reg))
17 #define wr64(a, reg, value)	writeq((value), ((a)->hw_addr + (reg)))
18 #define rd64(a, reg)		readq((a)->hw_addr + (reg))
19 
20 #endif /* _IDPF_MEM_H_ */
21