From 2fcd4d03a2110ef0499be12dccff2f1d04e51ffa Mon Sep 17 00:00:00 2001 From: Yogesh Date: Wed, 5 Aug 2015 14:29:25 -0700 Subject: 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 Reviewed-on: http://git-master/r/779457 Reviewed-by: Terje Bergstrom Tested-by: Terje Bergstrom --- include/linux/nvhost.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'include/linux') 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 { /* reset control for this device */ struct reset_control *reset_control; + + /* For loadable nvgpu module, we dynamically assign function + * pointer of gk20a_debug_dump_device once the module loads */ + void (*debug_dump_device)(struct platform_device *pdev); }; @@ -342,6 +346,11 @@ struct nvhost_device_power_attr { struct kobj_attribute power_attr[NVHOST_POWER_SYSFS_ATTRIB_MAX]; }; +void nvhost_register_dump_device( + struct platform_device *dev, + void (*nvgpu_debug_dump_device)(struct platform_device *)); +void nvhost_unregister_dump_device(struct platform_device *dev); + void host1x_writel(struct platform_device *dev, u32 r, u32 v); u32 host1x_readl(struct platform_device *dev, u32 r); -- cgit v1.2.2