diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2007-05-03 08:28:32 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2007-05-07 06:31:14 -0400 |
commit | 7e11580b362fc64693de7ad5c11fbf3d1d9d0e50 (patch) | |
tree | 8f1c12a24bec21ce5a5912f6b75d58c1ffc1ddd0 /include/asm-powerpc/iommu.h | |
parent | 55b61fec22caa3e7872caea6c4100fc75cb8f49b (diff) |
[POWERPC] DART iommu suspend
This implements save and restore hooks for IOMMUs and implements
it the DART iommu.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Olof Johansson <olof@lixom.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'include/asm-powerpc/iommu.h')
-rw-r--r-- | include/asm-powerpc/iommu.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/asm-powerpc/iommu.h b/include/asm-powerpc/iommu.h index b2e56b30306a..870967e47204 100644 --- a/include/asm-powerpc/iommu.h +++ b/include/asm-powerpc/iommu.h | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/spinlock.h> | 26 | #include <linux/spinlock.h> |
27 | #include <linux/device.h> | 27 | #include <linux/device.h> |
28 | #include <linux/dma-mapping.h> | 28 | #include <linux/dma-mapping.h> |
29 | #include <asm/machdep.h> | ||
29 | #include <asm/types.h> | 30 | #include <asm/types.h> |
30 | #include <asm/bitops.h> | 31 | #include <asm/bitops.h> |
31 | 32 | ||
@@ -109,6 +110,19 @@ static inline void pci_iommu_init(void) { } | |||
109 | #endif | 110 | #endif |
110 | 111 | ||
111 | extern void alloc_dart_table(void); | 112 | extern void alloc_dart_table(void); |
113 | #if defined(CONFIG_PPC64) && defined(CONFIG_PM) | ||
114 | static inline void iommu_save(void) | ||
115 | { | ||
116 | if (ppc_md.iommu_save) | ||
117 | ppc_md.iommu_save(); | ||
118 | } | ||
119 | |||
120 | static inline void iommu_restore(void) | ||
121 | { | ||
122 | if (ppc_md.iommu_restore) | ||
123 | ppc_md.iommu_restore(); | ||
124 | } | ||
125 | #endif | ||
112 | 126 | ||
113 | #endif /* __KERNEL__ */ | 127 | #endif /* __KERNEL__ */ |
114 | #endif /* _ASM_IOMMU_H */ | 128 | #endif /* _ASM_IOMMU_H */ |