summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--arch/arm/mach-tegra/board-aruba-panel.c4
-rw-r--r--arch/arm/mach-tegra/board-cardhu-panel.c2
-rw-r--r--arch/arm/mach-tegra/board-enterprise-panel.c2
-rw-r--r--arch/arm/mach-tegra/board-harmony-panel.c3
-rw-r--r--arch/arm/mach-tegra/board-ventana-panel.c4
-rw-r--r--arch/arm/mach-tegra/board-whistler-panel.c4
-rw-r--r--arch/arm/mach-tegra/include/mach/tegra_dc_ext.h2
-rw-r--r--drivers/video/tegra/dc/dc.c2
-rw-r--r--drivers/video/tegra/dc/dsi.c2
-rw-r--r--drivers/video/tegra/dc/hdmi.c2
-rw-r--r--drivers/video/tegra/dc/nvhdcp.c1
-rw-r--r--drivers/video/tegra/dc/overlay.c2
-rw-r--r--drivers/video/tegra/fb.c2
-rw-r--r--drivers/video/tegra/host/bus.c9
-rw-r--r--drivers/video/tegra/host/chip_support.h1
-rw-r--r--drivers/video/tegra/host/dev.c3
-rw-r--r--drivers/video/tegra/host/nvhost_cdma.h2
-rw-r--r--drivers/video/tegra/host/nvhost_channel.h3
-rw-r--r--drivers/video/tegra/host/nvhost_hwctx.h2
-rw-r--r--drivers/video/tegra/host/nvhost_syncpt.c3
-rw-r--r--drivers/video/tegra/host/nvhost_syncpt.h7
-rw-r--r--drivers/video/tegra/host/t20/syncpt_t20.c1
-rw-r--r--include/linux/nvhost.h73
-rw-r--r--include/linux/nvhost_ioctl.h (renamed from arch/arm/mach-tegra/include/mach/nvhost.h)54
-rw-r--r--include/trace/events/nvhost.h (renamed from arch/arm/mach-tegra/include/trace/events/nvhost.h)0
25 files changed, 113 insertions, 77 deletions
diff --git a/arch/arm/mach-tegra/board-aruba-panel.c b/arch/arm/mach-tegra/board-aruba-panel.c
index deb2a089560a..a0adfca052e1 100644
--- a/arch/arm/mach-tegra/board-aruba-panel.c
+++ b/arch/arm/mach-tegra/board-aruba-panel.c
@@ -1,7 +1,7 @@
/*
* arch/arm/mach-tegra/board-aruba-panel.c
*
- * Copyright (c) 2010, NVIDIA Corporation.
+ * Copyright (c) 2010-2011, NVIDIA Corporation.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -25,7 +25,7 @@
#include <asm/mach-types.h>
#include <linux/platform_device.h>
#include <linux/pwm_backlight.h>
-#include <mach/nvhost.h>
+#include <linux/nvhost.h>
#include <mach/nvmap.h>
#include <mach/irqs.h>
#include <mach/iomap.h>
diff --git a/arch/arm/mach-tegra/board-cardhu-panel.c b/arch/arm/mach-tegra/board-cardhu-panel.c
index b5ea8a41ae59..db88f30b1519 100644
--- a/arch/arm/mach-tegra/board-cardhu-panel.c
+++ b/arch/arm/mach-tegra/board-cardhu-panel.c
@@ -26,7 +26,7 @@
#include <linux/platform_device.h>
#include <linux/pwm_backlight.h>
#include <asm/atomic.h>
-#include <mach/nvhost.h>
+#include <linux/nvhost.h>
#include <mach/nvmap.h>
#include <mach/irqs.h>
#include <mach/iomap.h>
diff --git a/arch/arm/mach-tegra/board-enterprise-panel.c b/arch/arm/mach-tegra/board-enterprise-panel.c
index ab5c88f80e08..b0b749a3404a 100644
--- a/arch/arm/mach-tegra/board-enterprise-panel.c
+++ b/arch/arm/mach-tegra/board-enterprise-panel.c
@@ -26,7 +26,7 @@
#include <linux/platform_device.h>
#include <linux/tegra_pwm_bl.h>
#include <asm/atomic.h>
-#include <mach/nvhost.h>
+#include <linux/nvhost.h>
#include <mach/nvmap.h>
#include <mach/irqs.h>
#include <mach/iomap.h>
diff --git a/arch/arm/mach-tegra/board-harmony-panel.c b/arch/arm/mach-tegra/board-harmony-panel.c
index a7890a797e92..46539a4862ea 100644
--- a/arch/arm/mach-tegra/board-harmony-panel.c
+++ b/arch/arm/mach-tegra/board-harmony-panel.c
@@ -1,7 +1,7 @@
/*
* arch/arm/mach-tegra/board-harmony-panel.c
*
- * Copyright (C) 2010 Google, Inc.
+ * Copyright (c) 2010-2011, NVIDIA Corporation.
*
* This software is licensed under the terms of the GNU General Public
* License version 2, as published by the Free Software Foundation, and
@@ -17,6 +17,7 @@
#include <linux/resource.h>
#include <linux/platform_device.h>
#include <asm/mach-types.h>
+#include <linux/nvhost.h>
#include <mach/irqs.h>
#include <mach/iomap.h>
#include <mach/tegra_fb.h>
diff --git a/arch/arm/mach-tegra/board-ventana-panel.c b/arch/arm/mach-tegra/board-ventana-panel.c
index 65ba1f4f96cc..6a091203f4d5 100644
--- a/arch/arm/mach-tegra/board-ventana-panel.c
+++ b/arch/arm/mach-tegra/board-ventana-panel.c
@@ -1,7 +1,7 @@
/*
* arch/arm/mach-tegra/board-ventana-panel.c
*
- * Copyright (c) 2010, NVIDIA Corporation.
+ * Copyright (c) 2010-2011, NVIDIA Corporation.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -25,7 +25,7 @@
#include <asm/mach-types.h>
#include <linux/platform_device.h>
#include <linux/pwm_backlight.h>
-#include <mach/nvhost.h>
+#include <linux/nvhost.h>
#include <mach/nvmap.h>
#include <mach/irqs.h>
#include <mach/iomap.h>
diff --git a/arch/arm/mach-tegra/board-whistler-panel.c b/arch/arm/mach-tegra/board-whistler-panel.c
index ef46b51ea75c..b01400ed4d50 100644
--- a/arch/arm/mach-tegra/board-whistler-panel.c
+++ b/arch/arm/mach-tegra/board-whistler-panel.c
@@ -1,7 +1,7 @@
/*
* arch/arm/mach-tegra/board-whistler-panel.c
*
- * Copyright (c) 2010, NVIDIA Corporation.
+ * Copyright (c) 2010-2011, NVIDIA Corporation.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -26,7 +26,7 @@
#include <linux/platform_device.h>
#include <linux/pwm_backlight.h>
#include <linux/tegra_pwm_bl.h>
-#include <mach/nvhost.h>
+#include <linux/nvhost.h>
#include <mach/nvmap.h>
#include <mach/irqs.h>
#include <mach/iomap.h>
diff --git a/arch/arm/mach-tegra/include/mach/tegra_dc_ext.h b/arch/arm/mach-tegra/include/mach/tegra_dc_ext.h
index f94626f5a980..559bc129c082 100644
--- a/arch/arm/mach-tegra/include/mach/tegra_dc_ext.h
+++ b/arch/arm/mach-tegra/include/mach/tegra_dc_ext.h
@@ -19,8 +19,6 @@
#ifndef __MACH_TEGRA_DC_EXT_H
#define __MACH_TEGRA_DC_EXT_H
-#include <mach/nvhost.h>
-
struct tegra_dc_ext;
#ifdef CONFIG_TEGRA_DC_EXTENSIONS
diff --git a/drivers/video/tegra/dc/dc.c b/drivers/video/tegra/dc/dc.c
index f7c0ec81f5f3..cba700940da6 100644
--- a/drivers/video/tegra/dc/dc.c
+++ b/drivers/video/tegra/dc/dc.c
@@ -40,7 +40,7 @@
#include <mach/dc.h>
#include <mach/fb.h>
#include <mach/mc.h>
-#include <mach/nvhost.h>
+#include <linux/nvhost.h>
#include <mach/latency_allowance.h>
#include "dc_reg.h"
diff --git a/drivers/video/tegra/dc/dsi.c b/drivers/video/tegra/dc/dsi.c
index 68dd07be041c..c83b6151d380 100644
--- a/drivers/video/tegra/dc/dsi.c
+++ b/drivers/video/tegra/dc/dsi.c
@@ -28,7 +28,7 @@
#include <mach/clk.h>
#include <mach/dc.h>
#include <mach/fb.h>
-#include <mach/nvhost.h>
+#include <linux/nvhost.h>
#include <../gpio-names.h>
#include "dc_reg.h"
diff --git a/drivers/video/tegra/dc/hdmi.c b/drivers/video/tegra/dc/hdmi.c
index 4672ca1ebc0b..71163b274289 100644
--- a/drivers/video/tegra/dc/hdmi.c
+++ b/drivers/video/tegra/dc/hdmi.c
@@ -33,7 +33,7 @@
#include <mach/clk.h>
#include <mach/dc.h>
#include <mach/fb.h>
-#include <mach/nvhost.h>
+#include <linux/nvhost.h>
#include <mach/hdmi-audio.h>
#include <video/tegrafb.h>
diff --git a/drivers/video/tegra/dc/nvhdcp.c b/drivers/video/tegra/dc/nvhdcp.c
index bac87781bb9d..5ff53949864e 100644
--- a/drivers/video/tegra/dc/nvhdcp.c
+++ b/drivers/video/tegra/dc/nvhdcp.c
@@ -26,7 +26,6 @@
#include <asm/atomic.h>
#include <mach/dc.h>
-#include <mach/nvhost.h>
#include <mach/kfuse.h>
#include <video/nvhdcp.h>
diff --git a/drivers/video/tegra/dc/overlay.c b/drivers/video/tegra/dc/overlay.c
index 6f42242a7102..c8a49c8ed3b3 100644
--- a/drivers/video/tegra/dc/overlay.c
+++ b/drivers/video/tegra/dc/overlay.c
@@ -33,7 +33,7 @@
#include <mach/dc.h>
#include <mach/fb.h>
-#include <mach/nvhost.h>
+#include <linux/nvhost.h>
#include "dc_priv.h"
#include "../nvmap/nvmap.h"
diff --git a/drivers/video/tegra/fb.c b/drivers/video/tegra/fb.c
index 6aff1cab30d4..0787131d8dd8 100644
--- a/drivers/video/tegra/fb.c
+++ b/drivers/video/tegra/fb.c
@@ -36,7 +36,7 @@
#include <mach/dc.h>
#include <mach/fb.h>
-#include <mach/nvhost.h>
+#include <linux/nvhost.h>
#include <mach/nvmap.h>
#include "host/dev.h"
diff --git a/drivers/video/tegra/host/bus.c b/drivers/video/tegra/host/bus.c
index a633950aeaff..0ba30dd99ffa 100644
--- a/drivers/video/tegra/host/bus.c
+++ b/drivers/video/tegra/host/bus.c
@@ -2,11 +2,9 @@
* drivers/video/tegra/host/bus.c
*
* Copyright (C) 2010 Google, Inc.
+ * Author: Erik Gilling <konkers@google.com>
*
- * Author:
- * Erik Gilling <konkers@google.com>
- *
- * based heavily on drivers/base/platform.c
+ * Copyright (C) 2010-2011 NVIDIA Corporation
*
* This software is licensed under the terms of the GNU General Public
* License version 2, as published by the Free Software Foundation, and
@@ -20,8 +18,7 @@
*/
#include <linux/pm_runtime.h>
-
-#include <mach/nvhost.h>
+#include <linux/nvhost.h>
#include "dev.h"
diff --git a/drivers/video/tegra/host/chip_support.h b/drivers/video/tegra/host/chip_support.h
index c63200189b34..a0b0f0278a0f 100644
--- a/drivers/video/tegra/host/chip_support.h
+++ b/drivers/video/tegra/host/chip_support.h
@@ -23,6 +23,7 @@
#define _NVHOST_CHIP_SUPPORT_H_
struct output;
+struct nvhost_waitchk;
struct nvhost_chip_support {
struct {
diff --git a/drivers/video/tegra/host/dev.c b/drivers/video/tegra/host/dev.c
index 16479962127d..37d18bc2d175 100644
--- a/drivers/video/tegra/host/dev.c
+++ b/drivers/video/tegra/host/dev.c
@@ -37,7 +37,8 @@
#include <asm/io.h>
-#include <mach/nvhost.h>
+#include <linux/nvhost.h>
+#include <linux/nvhost_ioctl.h>
#include <mach/nvmap.h>
#include <mach/gpufuse.h>
diff --git a/drivers/video/tegra/host/nvhost_cdma.h b/drivers/video/tegra/host/nvhost_cdma.h
index 64d17249f6af..e48d733850a9 100644
--- a/drivers/video/tegra/host/nvhost_cdma.h
+++ b/drivers/video/tegra/host/nvhost_cdma.h
@@ -26,7 +26,7 @@
#include <linux/sched.h>
#include <linux/semaphore.h>
-#include <mach/nvhost.h>
+#include <linux/nvhost.h>
#include <mach/nvmap.h>
#include "nvhost_acm.h"
diff --git a/drivers/video/tegra/host/nvhost_channel.h b/drivers/video/tegra/host/nvhost_channel.h
index e108a2078911..c939a19d3fad 100644
--- a/drivers/video/tegra/host/nvhost_channel.h
+++ b/drivers/video/tegra/host/nvhost_channel.h
@@ -3,7 +3,7 @@
*
* Tegra Graphics Host Channel
*
- * Copyright (c) 2010, NVIDIA Corporation.
+ * Copyright (c) 2010-2011, NVIDIA Corporation.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -35,6 +35,7 @@
#define NVHOST_MAX_HANDLES 1280
struct nvhost_master;
+struct nvhost_waitchk;
struct nvhost_channeldesc {
const char *name;
diff --git a/drivers/video/tegra/host/nvhost_hwctx.h b/drivers/video/tegra/host/nvhost_hwctx.h
index 83d93bd871eb..06df90e58fb5 100644
--- a/drivers/video/tegra/host/nvhost_hwctx.h
+++ b/drivers/video/tegra/host/nvhost_hwctx.h
@@ -26,7 +26,7 @@
#include <linux/string.h>
#include <linux/kref.h>
-#include <mach/nvhost.h>
+#include <linux/nvhost.h>
#include <mach/nvmap.h>
struct nvhost_channel;
diff --git a/drivers/video/tegra/host/nvhost_syncpt.c b/drivers/video/tegra/host/nvhost_syncpt.c
index 71233096c0c6..6236dedf5f88 100644
--- a/drivers/video/tegra/host/nvhost_syncpt.c
+++ b/drivers/video/tegra/host/nvhost_syncpt.c
@@ -3,7 +3,7 @@
*
* Tegra Graphics Host Syncpoints
*
- * Copyright (c) 2010, NVIDIA Corporation.
+ * Copyright (c) 2010-2011, NVIDIA Corporation.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -20,6 +20,7 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
+#include <linux/nvhost_ioctl.h>
#include "nvhost_syncpt.h"
#include "dev.h"
diff --git a/drivers/video/tegra/host/nvhost_syncpt.h b/drivers/video/tegra/host/nvhost_syncpt.h
index b6db72e915a9..c8f8b4bb1262 100644
--- a/drivers/video/tegra/host/nvhost_syncpt.h
+++ b/drivers/video/tegra/host/nvhost_syncpt.h
@@ -3,7 +3,7 @@
*
* Tegra Graphics Host Syncpoints
*
- * Copyright (c) 2010, NVIDIA Corporation.
+ * Copyright (c) 2010-2011, NVIDIA Corporation.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -25,10 +25,13 @@
#include <linux/kernel.h>
#include <linux/sched.h>
-#include <mach/nvhost.h>
+#include <linux/nvhost.h>
#include <mach/nvmap.h>
#include <asm/atomic.h>
+struct nvhost_syncpt;
+struct nvhost_waitchk;
+
/* host managed and invalid syncpt id */
#define NVSYNCPT_GRAPHICS_HOST (0)
#define NVSYNCPT_INVALID (-1)
diff --git a/drivers/video/tegra/host/t20/syncpt_t20.c b/drivers/video/tegra/host/t20/syncpt_t20.c
index ade896e6299e..781654b656da 100644
--- a/drivers/video/tegra/host/t20/syncpt_t20.c
+++ b/drivers/video/tegra/host/t20/syncpt_t20.c
@@ -20,6 +20,7 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
+#include <linux/nvhost_ioctl.h>
#include "../nvhost_syncpt.h"
#include "../dev.h"
diff --git a/include/linux/nvhost.h b/include/linux/nvhost.h
new file mode 100644
index 000000000000..a1d211de1ef1
--- /dev/null
+++ b/include/linux/nvhost.h
@@ -0,0 +1,73 @@
+/*
+ * include/linux/nvhost.h
+ *
+ * Tegra graphics host driver
+ *
+ * Copyright (c) 2009-2011, NVIDIA Corporation.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifndef __LINUX_NVHOST_H
+#define __LINUX_NVHOST_H
+
+#include <linux/device.h>
+#include <linux/types.h>
+
+struct nvhost_master;
+
+struct nvhost_device {
+ const char *name;
+ struct device dev;
+ int id;
+ u32 num_resources;
+ struct resource *resource;
+
+ struct nvhost_master *host;
+};
+
+extern int nvhost_device_register(struct nvhost_device *);
+extern void nvhost_device_unregister(struct nvhost_device *);
+
+extern struct bus_type nvhost_bus_type;
+
+struct nvhost_driver {
+ int (*probe)(struct nvhost_device *);
+ int (*remove)(struct nvhost_device *);
+ void (*shutdown)(struct nvhost_device *);
+ int (*suspend)(struct nvhost_device *, pm_message_t state);
+ int (*resume)(struct nvhost_device *);
+ struct device_driver driver;
+};
+
+extern int nvhost_driver_register(struct nvhost_driver *);
+extern void nvhost_driver_unregister(struct nvhost_driver *);
+extern struct resource *nvhost_get_resource(struct nvhost_device *,
+ unsigned int, unsigned int);
+extern int nvhost_get_irq(struct nvhost_device *, unsigned int);
+extern struct resource *nvhost_get_resource_byname(struct nvhost_device *,
+ unsigned int, const char *);
+extern int nvhost_get_irq_byname(struct nvhost_device *, const char *);
+
+#define to_nvhost_device(x) container_of((x), struct nvhost_device, dev)
+#define to_nvhost_driver(drv) (container_of((drv), struct nvhost_driver, \
+ driver))
+
+#define nvhost_get_drvdata(_dev) dev_get_drvdata(&(_dev)->dev)
+#define nvhost_set_drvdata(_dev, data) dev_set_drvdata(&(_dev)->dev, (data))
+
+int nvhost_bus_register(struct nvhost_master *host);
+
+#endif
diff --git a/arch/arm/mach-tegra/include/mach/nvhost.h b/include/linux/nvhost_ioctl.h
index 8d7031791eab..6e49827b873c 100644
--- a/arch/arm/mach-tegra/include/mach/nvhost.h
+++ b/include/linux/nvhost_ioctl.h
@@ -1,5 +1,5 @@
/*
- * include/linux/nvhost.h
+ * include/linux/nvhost_ioctl.h
*
* Tegra graphics host driver
*
@@ -20,60 +20,19 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#ifndef __LINUX_NVHOST_H
-#define __LINUX_NVHOST_H
+#ifndef __LINUX_NVHOST_IOCTL_H
+#define __LINUX_NVHOST_IOCTL_H
-#include <linux/device.h>
#include <linux/ioctl.h>
#include <linux/types.h>
-struct nvhost_master;
-
-struct nvhost_device {
- const char *name;
- struct device dev;
- int id;
- u32 num_resources;
- struct resource *resource;
-
- struct nvhost_master *host;
-};
-
-extern int nvhost_device_register(struct nvhost_device *);
-extern void nvhost_device_unregister(struct nvhost_device *);
-
-extern struct bus_type nvhost_bus_type;
-
-struct nvhost_driver {
- int (*probe)(struct nvhost_device *);
- int (*remove)(struct nvhost_device *);
- void (*shutdown)(struct nvhost_device *);
- int (*suspend)(struct nvhost_device *, pm_message_t state);
- int (*resume)(struct nvhost_device *);
- struct device_driver driver;
-};
-
-extern int nvhost_driver_register(struct nvhost_driver *);
-extern void nvhost_driver_unregister(struct nvhost_driver *);
-extern struct resource *nvhost_get_resource(struct nvhost_device *, unsigned int, unsigned int);
-extern int nvhost_get_irq(struct nvhost_device *, unsigned int);
-extern struct resource *nvhost_get_resource_byname(struct nvhost_device *, unsigned int, const char *);
-extern int nvhost_get_irq_byname(struct nvhost_device *, const char *);
-
-#define to_nvhost_device(x) container_of((x), struct nvhost_device, dev)
-#define to_nvhost_driver(drv) (container_of((drv), struct nvhost_driver, \
- driver))
-
-#define nvhost_get_drvdata(_dev) dev_get_drvdata(&(_dev)->dev)
-#define nvhost_set_drvdata(_dev,data) dev_set_drvdata(&(_dev)->dev, (data))
-
-int nvhost_bus_register(struct nvhost_master *host);
-
#if !defined(__KERNEL__)
#define __user
#endif
+#define NVHOST_INVALID_SYNCPOINT 0xFFFFFFFF
#define NVHOST_NO_TIMEOUT (-1)
+#define NVHOST_NO_CONTEXT 0x0
#define NVHOST_IOCTL_MAGIC 'H'
/* version 0 header (used with write() submit interface) */
@@ -214,6 +173,7 @@ struct nvhost_ctrl_module_regrdwr_args {
#define NVHOST_IOCTL_CTRL_LAST \
_IOC_NR(NVHOST_IOCTL_CTRL_SYNCPT_WAITEX)
-#define NVHOST_IOCTL_CTRL_MAX_ARG_SIZE sizeof(struct nvhost_ctrl_module_regrdwr_args)
+#define NVHOST_IOCTL_CTRL_MAX_ARG_SIZE \
+ sizeof(struct nvhost_ctrl_module_regrdwr_args)
#endif
diff --git a/arch/arm/mach-tegra/include/trace/events/nvhost.h b/include/trace/events/nvhost.h
index 2a1845950ed5..2a1845950ed5 100644
--- a/arch/arm/mach-tegra/include/trace/events/nvhost.h
+++ b/include/trace/events/nvhost.h