mtd: spear_smi: Fix Write Burst mode
[linux/fpc-iii.git] / arch / x86 / include / asm / tce.h
blob6ed2deacf1d0edae1ab5315cce42106c61129608
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 /*
3 * This file is derived from asm-powerpc/tce.h.
5 * Copyright (C) IBM Corporation, 2006
7 * Author: Muli Ben-Yehuda <muli@il.ibm.com>
8 * Author: Jon Mason <jdmason@us.ibm.com>
9 */
11 #ifndef _ASM_X86_TCE_H
12 #define _ASM_X86_TCE_H
14 extern unsigned int specified_table_size;
15 struct iommu_table;
17 #define TCE_ENTRY_SIZE 8 /* in bytes */
19 #define TCE_READ_SHIFT 0
20 #define TCE_WRITE_SHIFT 1
21 #define TCE_HUBID_SHIFT 2 /* unused */
22 #define TCE_RSVD_SHIFT 8 /* unused */
23 #define TCE_RPN_SHIFT 12
24 #define TCE_UNUSED_SHIFT 48 /* unused */
26 #define TCE_RPN_MASK 0x0000fffffffff000ULL
28 extern void tce_build(struct iommu_table *tbl, unsigned long index,
29 unsigned int npages, unsigned long uaddr, int direction);
30 extern void tce_free(struct iommu_table *tbl, long index, unsigned int npages);
31 extern void * __init alloc_tce_table(void);
32 extern void __init free_tce_table(void *tbl);
33 extern int __init build_tce_table(struct pci_dev *dev, void __iomem *bbar);
35 #endif /* _ASM_X86_TCE_H */