#include <linux/bitfield.h>
#include <linux/delay.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/slab.h>
#include <soc/tegra/mc.h>
#include "arm-smmu.h"
#define MAX_SMMU_INSTANCES …
struct nvidia_smmu { … };
static inline struct nvidia_smmu *to_nvidia_smmu(struct arm_smmu_device *smmu)
{ … }
static inline void __iomem *nvidia_smmu_page(struct arm_smmu_device *smmu,
unsigned int inst, int page)
{ … }
static u32 nvidia_smmu_read_reg(struct arm_smmu_device *smmu,
int page, int offset)
{ … }
static void nvidia_smmu_write_reg(struct arm_smmu_device *smmu,
int page, int offset, u32 val)
{ … }
static u64 nvidia_smmu_read_reg64(struct arm_smmu_device *smmu,
int page, int offset)
{ … }
static void nvidia_smmu_write_reg64(struct arm_smmu_device *smmu,
int page, int offset, u64 val)
{ … }
static void nvidia_smmu_tlb_sync(struct arm_smmu_device *smmu, int page,
int sync, int status)
{ … }
static int nvidia_smmu_reset(struct arm_smmu_device *smmu)
{ … }
static irqreturn_t nvidia_smmu_global_fault_inst(int irq,
struct arm_smmu_device *smmu,
int inst)
{ … }
static irqreturn_t nvidia_smmu_global_fault(int irq, void *dev)
{ … }
static irqreturn_t nvidia_smmu_context_fault_bank(int irq,
struct arm_smmu_device *smmu,
int idx, int inst)
{ … }
static irqreturn_t nvidia_smmu_context_fault(int irq, void *dev)
{ … }
static void nvidia_smmu_probe_finalize(struct arm_smmu_device *smmu, struct device *dev)
{ … }
static int nvidia_smmu_init_context(struct arm_smmu_domain *smmu_domain,
struct io_pgtable_cfg *pgtbl_cfg,
struct device *dev)
{ … }
static const struct arm_smmu_impl nvidia_smmu_impl = …;
static const struct arm_smmu_impl nvidia_smmu_single_impl = …;
struct arm_smmu_device *nvidia_smmu_impl_init(struct arm_smmu_device *smmu)
{ … }