summaryrefslogtreecommitdiff
path: root/arch/arm/mach-tegra/include/mach
diff options
context:
space:
mode:
authorGary King <gking@nvidia.com>2010-03-05 17:17:56 -0800
committerGary King <gking@nvidia.com>2010-03-05 17:31:44 -0800
commitda64ef9eab8bf0fc07cd8abbbdf494b67c9971f1 (patch)
treef523ccbe60bfa43d3939b02a1965099da2261a90 /arch/arm/mach-tegra/include/mach
parent3a5eff5302d66bd471c4a4778505f5211776ecd3 (diff)
[tegra iovmm] implement stubs for no-iovmm case
nvmap build fails when CONFIG_TEGRA_IOVMM is not selected. add stubs to allow that combination to work. Change-Id: Ie7e47a987feaeffd987996d11a594b2c8551311e Reviewed-on: http://git-master/r/785 Reviewed-by: Gary King <gking@nvidia.com> Tested-by: Gary King <gking@nvidia.com>
Diffstat (limited to 'arch/arm/mach-tegra/include/mach')
-rw-r--r--arch/arm/mach-tegra/include/mach/iovmm.h86
1 files changed, 86 insertions, 0 deletions
diff --git a/arch/arm/mach-tegra/include/mach/iovmm.h b/arch/arm/mach-tegra/include/mach/iovmm.h
index 1549e5b628fe..606c434da4cb 100644
--- a/arch/arm/mach-tegra/include/mach/iovmm.h
+++ b/arch/arm/mach-tegra/include/mach/iovmm.h
@@ -25,6 +25,9 @@
#include <linux/spinlock.h>
#include <linux/types.h>
+#ifndef _MACH_TEGRA_IOVMM_H_
+#define _MACH_TEGRA_IOVMM_H_
+
#if defined(CONFIG_ARCH_TEGRA_1x_SOC) || defined(CONFIG_ARCH_TEGRA_2x_SOC)
typedef u32 tegra_iovmm_addr_t;
#else
@@ -122,6 +125,7 @@ struct tegra_iovmm_area_ops {
void (*release)(struct tegra_iovmm_area *area, tegra_iovmm_addr_t offs);
};
+#ifdef CONFIG_TEGRA_IOVMM
/* called by clients to allocate an I/O VMM client mapping context which
* will be shared by all clients in the same share_group */
struct tegra_iovmm_client *tegra_iovmm_alloc_client(const char *name,
@@ -185,3 +189,85 @@ int tegra_iovmm_register(struct tegra_iovmm_device *dev);
/* called by drivers to remove an I/O VMM device from the system */
int tegra_iovmm_unregister(struct tegra_iovmm_device *dev);
+
+
+
+#else /* CONFIG_TEGRA_IOVMM */
+
+static inline struct tegra_iovmm_client *tegra_iovmm_alloc_client(
+ const char *name, const char *share_group)
+{
+ return NULL;
+}
+
+static inline size_t tegra_iovmm_get_vm_size(struct tegra_iovmm_client *client)
+{
+ return 0;
+}
+
+static inline void tegra_iovmm_free_client(struct tegra_iovmm_client *client)
+{}
+
+static inline int tegra_iovmm_client_lock(struct tegra_iovmm_client *client)
+{
+ return 0;
+}
+
+static inline int tegra_iovmm_client_trylock(struct tegra_iovmm_client *client)
+{
+ return 0;
+}
+
+static inline void tegra_iovmm_client_unlock(struct tegra_iovmm_client *client)
+{}
+
+static inline struct tegra_iovmm_area *tegra_iovmm_create_vm(
+ struct tegra_iovmm_client *client, struct tegra_iovmm_area_ops *ops,
+ unsigned long size, pgprot_t pgprot)
+{
+ return NULL;
+}
+
+static inline void tegra_iovmm_zap_vm(struct tegra_iovmm_area *vm) { }
+
+static inline void tegra_iovmm_unzap_vm(struct tegra_iovmm_area *vm) { }
+
+static inline void tegra_iovmm_free_vm(struct tegra_iovmm_area *vm) { }
+
+static inline void tegra_iovmm_vm_insert_pfn(struct tegra_iovmm_area *area,
+ tegra_iovmm_addr_t vaddr, unsigned long pfn) { }
+
+static inline struct tegra_iovmm_area *tegra_iovmm_find_area_get(
+ struct tegra_iovmm_client *client, tegra_iovmm_addr_t addr)
+{
+ return NULL;
+}
+
+static inline struct tegra_iovmm_area *tegra_iovmm_area_get(
+ struct tegra_iovmm_area *vm)
+{
+ return NULL;
+}
+
+static inline void tegra_iovmm_area_put(struct tegra_iovmm_area *vm) { }
+
+static inline int tegra_iovmm_domain_init(struct tegra_iovmm_domain *domain,
+ struct tegra_iovmm_device *dev, tegra_iovmm_addr_t start,
+ tegra_iovmm_addr_t end)
+{
+ return 0;
+}
+
+static inline int tegra_iovmm_register(struct tegra_iovmm_device *dev)
+{
+ return 0;
+}
+
+static inline int tegra_iovmm_unregister(struct tegra_iovmm_device *dev)
+{
+ return 0;
+}
+#endif /* CONFIG_TEGRA_IOVMM */
+
+
+#endif