linux/drivers/accel/ivpu/ivpu_hw_reg_io.h

/* SPDX-License-Identifier: GPL-2.0-only */
/*
 * Copyright (C) 2020-2023 Intel Corporation
 */

#ifndef __IVPU_HW_REG_IO_H__
#define __IVPU_HW_REG_IO_H__

#include <linux/bitfield.h>
#include <linux/io.h>
#include <linux/iopoll.h>

#include "ivpu_drv.h"

#define REG_POLL_SLEEP_US
#define REG_IO_ERROR

#define REGB_RD32(reg)
#define REGB_RD32_SILENT(reg)
#define REGB_RD64(reg)
#define REGB_WR32(reg, val)
#define REGB_WR64(reg, val)

#define REGV_RD32(reg)
#define REGV_RD32_SILENT(reg)
#define REGV_RD64(reg)
#define REGV_WR32(reg, val)
#define REGV_WR64(reg, val)

#define REGV_WR32I(reg, stride, index, val)

#define REG_FLD(REG, FLD)
#define REG_FLD_NUM(REG, FLD, num)
#define REG_GET_FLD(REG, FLD, val)
#define REG_CLR_FLD(REG, FLD, val)
#define REG_SET_FLD(REG, FLD, val)
#define REG_SET_FLD_NUM(REG, FLD, num, val)
#define REG_TEST_FLD(REG, FLD, val)
#define REG_TEST_FLD_NUM(REG, FLD, num, val)

#define REGB_POLL_FLD(reg, fld, val, timeout_us)

#define REGV_POLL_FLD(reg, fld, val, timeout_us)

static inline u32
ivpu_hw_reg_rd32(struct ivpu_device *vdev, void __iomem *base, u32 reg,
		 const char *name, const char *func)
{}

static inline u64
ivpu_hw_reg_rd64(struct ivpu_device *vdev, void __iomem *base, u32 reg,
		 const char *name, const char *func)
{}

static inline void
ivpu_hw_reg_wr32(struct ivpu_device *vdev, void __iomem *base, u32 reg, u32 val,
		 const char *name, const char *func)
{}

static inline void
ivpu_hw_reg_wr64(struct ivpu_device *vdev, void __iomem *base, u32 reg, u64 val,
		 const char *name, const char *func)
{}

static inline void
ivpu_hw_reg_wr32_index(struct ivpu_device *vdev, void __iomem *base, u32 reg,
		       u32 stride, u32 index, u32 val, const char *name,
		       const char *func)
{}

#endif /* __IVPU_HW_REG_IO_H__ */