summaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorYogesh <ybhosale@nvidia.com>2015-08-05 17:29:25 -0400
committerTerje Bergstrom <tbergstrom@nvidia.com>2015-08-19 16:10:03 -0400
commit2fcd4d03a2110ef0499be12dccff2f1d04e51ffa (patch)
treeb78332b85c530381a4a57018b73e72c9192c8f31 /include/linux
parentefe0734a409abcc8bc0fcaa14395480a89028243 (diff)
video: tegra: host: Introduce a function ptr
This patch introduces a function pointer inside nvhost device data structure, which can later be filled by appropriate function address from nvgpu module, which is going to be dynamically loaded. Bug 1476801 Change-Id: I56541c488a116427d666d29fb5b4eba10652711a Signed-off-by: Yogesh Bhosale <ybhosale@nvidia.com> Reviewed-on: http://git-master/r/779457 Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com> Tested-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/nvhost.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/nvhost.h b/include/linux/nvhost.h
index 7a9025854..c96ad2df3 100644
--- a/include/linux/nvhost.h
+++ b/include/linux/nvhost.h
@@ -321,6 +321,10 @@ struct nvhost_device_data {
321 321
322 /* reset control for this device */ 322 /* reset control for this device */
323 struct reset_control *reset_control; 323 struct reset_control *reset_control;
324
325 /* For loadable nvgpu module, we dynamically assign function
326 * pointer of gk20a_debug_dump_device once the module loads */
327 void (*debug_dump_device)(struct platform_device *pdev);
324}; 328};
325 329
326 330
@@ -342,6 +346,11 @@ struct nvhost_device_power_attr {
342 struct kobj_attribute power_attr[NVHOST_POWER_SYSFS_ATTRIB_MAX]; 346 struct kobj_attribute power_attr[NVHOST_POWER_SYSFS_ATTRIB_MAX];
343}; 347};
344 348
349void nvhost_register_dump_device(
350 struct platform_device *dev,
351 void (*nvgpu_debug_dump_device)(struct platform_device *));
352void nvhost_unregister_dump_device(struct platform_device *dev);
353
345void host1x_writel(struct platform_device *dev, u32 r, u32 v); 354void host1x_writel(struct platform_device *dev, u32 r, u32 v);
346u32 host1x_readl(struct platform_device *dev, u32 r); 355u32 host1x_readl(struct platform_device *dev, u32 r);
347 356