1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(c) 2018-2021 Beijing WangXun Technology Co., Ltd.
3 * Copyright(c) 2010-2017 Intel Corporation
6 #ifndef _NGBE_REGS_GROUP_H_
7 #define _NGBE_REGS_GROUP_H_
9 #include "ngbe_ethdev.h"
20 ngbe_read_regs(struct ngbe_hw *hw, const struct reg_info *reg,
25 for (i = 0; i < reg->count; i++)
26 reg_buf[i] = rd32(hw, reg->base_addr + i * reg->stride);
31 ngbe_regs_group_count(const struct reg_info *regs)
37 count += regs[i++].count;
42 ngbe_read_regs_group(struct rte_eth_dev *dev, uint32_t *reg_buf,
43 const struct reg_info *regs)
47 struct ngbe_hw *hw = ngbe_dev_hw(dev);
50 count += ngbe_read_regs(hw, ®s[i++], ®_buf[count]);
54 #endif /* _NGBE_REGS_GROUP_H_ */