]> err.no Git - linux-2.6/blobdiff - include/asm-sparc64/iommu.h
Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux...
[linux-2.6] / include / asm-sparc64 / iommu.h
index d8d98f8f747fcfa9857bf43221f8c89ff4f48ed9..46325ddee23b32f3677638e11d2b76ae7c8f4840 100644 (file)
@@ -1,7 +1,6 @@
-/* $Id: iommu.h,v 1.10 2001/03/08 09:55:56 davem Exp $
- * iommu.h: Definitions for the sun5 IOMMU.
+/* iommu.h: Definitions for the sun5 IOMMU.
  *
- * Copyright (C) 1996, 1999 David S. Miller (davem@caip.rutgers.edu)
+ * Copyright (C) 1996, 1999, 2007 David S. Miller (davem@davemloft.net)
  */
 #ifndef _SPARC64_IOMMU_H
 #define _SPARC64_IOMMU_H
@@ -24,4 +23,39 @@ struct iommu_arena {
        unsigned int    limit;
 };
 
-#endif /* !(_SPARC_IOMMU_H) */
+struct iommu {
+       spinlock_t              lock;
+       struct iommu_arena      arena;
+       void                    (*flush_all)(struct iommu *);
+       iopte_t                 *page_table;
+       u32                     page_table_map_base;
+       unsigned long           iommu_control;
+       unsigned long           iommu_tsbbase;
+       unsigned long           iommu_flush;
+       unsigned long           iommu_flushinv;
+       unsigned long           iommu_tags;
+       unsigned long           iommu_ctxflush;
+       unsigned long           write_complete_reg;
+       unsigned long           dummy_page;
+       unsigned long           dummy_page_pa;
+       unsigned long           ctx_lowest_free;
+       DECLARE_BITMAP(ctx_bitmap, IOMMU_NUM_CTXS);
+       u32                     dma_addr_mask;
+};
+
+struct strbuf {
+       int                     strbuf_enabled;
+       unsigned long           strbuf_control;
+       unsigned long           strbuf_pflush;
+       unsigned long           strbuf_fsync;
+       unsigned long           strbuf_ctxflush;
+       unsigned long           strbuf_ctxmatch_base;
+       unsigned long           strbuf_flushflag_pa;
+       volatile unsigned long *strbuf_flushflag;
+       volatile unsigned long  __flushflag_buf[(64+(64-1)) / sizeof(long)];
+};
+
+extern int iommu_table_init(struct iommu *iommu, int tsbsize,
+                           u32 dma_offset, u32 dma_addr_mask);
+
+#endif /* !(_SPARC64_IOMMU_H) */