summaryrefslogtreecommitdiff
path: root/include/linux/nvhost_ioctl.h
diff options
context:
space:
mode:
authorMayuresh Kulkarni <mkulkarni@nvidia.com>2012-10-10 10:36:41 +0530
committerDan Willemsen <dwillemsen@nvidia.com>2013-09-14 01:26:54 -0700
commit5245db78d9ed3da418eb69d2910ba4170f854b77 (patch)
tree490ecc91153e9a30e8b4e52d8246a4a383a221e0 /include/linux/nvhost_ioctl.h
parentf9fe03e55a1e3fae34d73bc8d663ac03d18d8b05 (diff)
video: tegra: host: add per device module-reg-read-write ioctl
- currently, the ioctl NVHOST_IOCTL_CTRL_MODULE_REGRDWR is a part of nvhost-ctrl node - however, it doesn't deal with host1x. infact it read/write actual module registers - for this kernel needs to maintain a list of all nvhost_devices registered for a SoC. currently, this is encapsulated within nvhost_bus which provides a iterator to walk these device list - however, once we phase out nvhost_bus and adopt the platform_bus we do not have a way to know the list of these devices - this commit adds a new per-device ioctl for module register read-write functionality - all the new code should be using this new per device ioctl. the old will be removed as soon as all the clients are ready to use new ioctl bug 1154790 Change-Id: I0552aec61a4506243461de82ac0cf6e4c1f3b220 Signed-off-by: Mayuresh Kulkarni <mkulkarni@nvidia.com> Reviewed-on: http://git-master/r/141579 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Arto Merilainen <amerilainen@nvidia.com> Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com> GVS: Gerrit_Virtual_Submit Rebase-Id: Rd7de39e212b778f596666c7d111c825c05351840
Diffstat (limited to 'include/linux/nvhost_ioctl.h')
-rw-r--r--include/linux/nvhost_ioctl.h22
1 files changed, 12 insertions, 10 deletions
diff --git a/include/linux/nvhost_ioctl.h b/include/linux/nvhost_ioctl.h
index 5a7bcdd28489..028de39de0d2 100644
--- a/include/linux/nvhost_ioctl.h
+++ b/include/linux/nvhost_ioctl.h
@@ -113,6 +113,15 @@ struct nvhost_set_priority_args {
__u32 priority;
};
+struct nvhost_ctrl_module_regrdwr_args {
+ __u32 id;
+ __u32 num_offsets;
+ __u32 block_size;
+ __u32 *offsets;
+ __u32 *values;
+ __u32 write;
+};
+
#define NVHOST_IOCTL_CHANNEL_FLUSH \
_IOR(NVHOST_IOCTL_MAGIC, 1, struct nvhost_get_param_args)
#define NVHOST_IOCTL_CHANNEL_GET_SYNCPOINTS \
@@ -139,8 +148,10 @@ struct nvhost_set_priority_args {
_IOR(NVHOST_IOCTL_MAGIC, 12, struct nvhost_get_param_args)
#define NVHOST_IOCTL_CHANNEL_SET_PRIORITY \
_IOW(NVHOST_IOCTL_MAGIC, 13, struct nvhost_set_priority_args)
+#define NVHOST_IOCTL_CHANNEL_MODULE_REGRDWR \
+ _IOWR(NVHOST_IOCTL_MAGIC, 14, struct nvhost_ctrl_module_regrdwr_args)
#define NVHOST_IOCTL_CHANNEL_LAST \
- _IOC_NR(NVHOST_IOCTL_CHANNEL_SET_PRIORITY)
+ _IOC_NR(NVHOST_IOCTL_CHANNEL_MODULE_REGRDWR)
#define NVHOST_IOCTL_CHANNEL_MAX_ARG_SIZE sizeof(struct nvhost_submit_hdr_ext)
struct nvhost_ctrl_syncpt_read_args {
@@ -181,15 +192,6 @@ enum nvhost_module_id {
NVHOST_MODULE_TSEC,
};
-struct nvhost_ctrl_module_regrdwr_args {
- __u32 id;
- __u32 num_offsets;
- __u32 block_size;
- __u32 *offsets;
- __u32 *values;
- __u32 write;
-};
-
#define NVHOST_IOCTL_CTRL_SYNCPT_READ \
_IOWR(NVHOST_IOCTL_MAGIC, 1, struct nvhost_ctrl_syncpt_read_args)
#define NVHOST_IOCTL_CTRL_SYNCPT_INCR \