summaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/nvmap.h16
-rw-r--r--include/linux/nvmap_t19x.h5
2 files changed, 19 insertions, 2 deletions
diff --git a/include/linux/nvmap.h b/include/linux/nvmap.h
index 1b8020e9b..6e441aad8 100644
--- a/include/linux/nvmap.h
+++ b/include/linux/nvmap.h
@@ -69,6 +69,21 @@ ulong nvmap_iovmm_get_used_pages(void);
69int nvmap_register_vidmem_carveout(struct device *dma_dev, 69int nvmap_register_vidmem_carveout(struct device *dma_dev,
70 phys_addr_t base, size_t size); 70 phys_addr_t base, size_t size);
71 71
72/*
73 * A heap can be mapped to memory other than DRAM.
74 * The HW, controls the memory, can be power gated/ungated
75 * based upon the clients using the memory.
76 * if no client/alloc happens from the memory, the HW needs
77 * to be power gated. Similarly it should power ungated if
78 * alloc happens from the memory.
79 * int (*busy)(void) - trigger runtime power ungate
80 * int (*idle)(void) - trigger runtime power gate
81 */
82struct nvmap_pm_ops {
83 int (*busy)(void);
84 int (*idle)(void);
85};
86
72struct nvmap_platform_carveout { 87struct nvmap_platform_carveout {
73 const char *name; 88 const char *name;
74 unsigned int usage_mask; 89 unsigned int usage_mask;
@@ -87,6 +102,7 @@ struct nvmap_platform_carveout {
87 bool disable_dynamic_dma_map; 102 bool disable_dynamic_dma_map;
88 bool no_cpu_access; /* carveout can't be accessed from cpu at all */ 103 bool no_cpu_access; /* carveout can't be accessed from cpu at all */
89 bool init_done; /* FIXME: remove once all caveouts use reserved-memory */ 104 bool init_done; /* FIXME: remove once all caveouts use reserved-memory */
105 struct nvmap_pm_ops pm_ops;
90}; 106};
91 107
92struct nvmap_platform_data { 108struct nvmap_platform_data {
diff --git a/include/linux/nvmap_t19x.h b/include/linux/nvmap_t19x.h
index 86e7271e3..0820e0618 100644
--- a/include/linux/nvmap_t19x.h
+++ b/include/linux/nvmap_t19x.h
@@ -3,7 +3,7 @@
3 * 3 *
4 * structure declarations for nvmem and nvmap user-space ioctls 4 * structure declarations for nvmem and nvmap user-space ioctls
5 * 5 *
6 * Copyright (c) 2009-2017, NVIDIA CORPORATION. All rights reserved. 6 * Copyright (c) 2009-2018, NVIDIA CORPORATION. All rights reserved.
7 * 7 *
8 * This program is free software; you can redistribute it and/or modify it 8 * This program is free software; you can redistribute it and/or modify it
9 * under the terms and conditions of the GNU General Public License, 9 * under the terms and conditions of the GNU General Public License,
@@ -25,7 +25,8 @@
25#define NVMAP_HEAP_CARVEOUT_GOS (1ul<<24) 25#define NVMAP_HEAP_CARVEOUT_GOS (1ul<<24)
26 26
27int nvmap_register_cvsram_carveout(struct device *dma_dev, 27int nvmap_register_cvsram_carveout(struct device *dma_dev,
28 phys_addr_t base, size_t size); 28 phys_addr_t base, size_t size,
29 int (*pmops_busy)(void), int (*pmops_idle)(void));
29 30
30struct cv_dev_info { 31struct cv_dev_info {
31 struct device_node *np; 32 struct device_node *np;