linux/drivers/iommu/omap-iopgtable.h

/* SPDX-License-Identifier: GPL-2.0-only */
/*
 * omap iommu: pagetable definitions
 *
 * Copyright (C) 2008-2010 Nokia Corporation
 *
 * Written by Hiroshi DOYU <[email protected]>
 */

#ifndef _OMAP_IOPGTABLE_H
#define _OMAP_IOPGTABLE_H

#include <linux/bitops.h>

/*
 * "L2 table" address mask and size definitions.
 */
#define IOPGD_SHIFT
#define IOPGD_SIZE
#define IOPGD_MASK

/*
 * "section" address mask and size definitions.
 */
#define IOSECTION_SHIFT
#define IOSECTION_SIZE
#define IOSECTION_MASK

/*
 * "supersection" address mask and size definitions.
 */
#define IOSUPER_SHIFT
#define IOSUPER_SIZE
#define IOSUPER_MASK

#define PTRS_PER_IOPGD
#define IOPGD_TABLE_SIZE

/*
 * "small page" address mask and size definitions.
 */
#define IOPTE_SHIFT
#define IOPTE_SIZE
#define IOPTE_MASK

/*
 * "large page" address mask and size definitions.
 */
#define IOLARGE_SHIFT
#define IOLARGE_SIZE
#define IOLARGE_MASK

#define PTRS_PER_IOPTE
#define IOPTE_TABLE_SIZE

#define IOPAGE_MASK

/**
 * omap_iommu_translate() - va to pa translation
 * @d:		omap iommu descriptor
 * @va:		virtual address
 * @mask:	omap iommu descriptor mask
 *
 * va to pa translation
 */
static inline phys_addr_t omap_iommu_translate(unsigned long d, dma_addr_t va,
					       dma_addr_t mask)
{}

/*
 * some descriptor attributes.
 */
#define IOPGD_TABLE
#define IOPGD_SECTION
#define IOPGD_SUPER

#define iopgd_is_table(x)
#define iopgd_is_section(x)
#define iopgd_is_super(x)

#define IOPTE_SMALL
#define IOPTE_LARGE

#define iopte_is_small(x)
#define iopte_is_large(x)

/* to find an entry in a page-table-directory */
#define iopgd_index(da)
#define iopgd_offset(obj, da)

#define iopgd_page_paddr(iopgd)
#define iopgd_page_vaddr(iopgd)

/* to find an entry in the second-level page table. */
#define iopte_index(da)
#define iopte_offset(iopgd, da)

#endif /* _OMAP_IOPGTABLE_H */