summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/boardobj/boardobjgrp.h
diff options
context:
space:
mode:
authorLakshmanan M <lm@nvidia.com>2016-09-08 13:20:59 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2016-10-27 05:50:54 -0400
commit315d8c6caa3a149b83c9894e94da852a50310c2d (patch)
treedac221b8c28e6eac255df34336c252d92c88a6a4 /drivers/gpu/nvgpu/boardobj/boardobjgrp.h
parentbc9df802feaeff0b1d7d1a2fc964267ebd10058d (diff)
gpu: nvgpu: Add pmgr support
This CL covers the following implementation, 1) Power Sensor Table parsing. 2) Power Topology Table parsing. 3) Add debugfs interface to get the current power(mW), current(mA) and voltage(uV) information from PMU. 4) Power Policy Table Parsing 5) Implement PMU boardobj interface for pmgr module. 6) Over current protection. JIRA DNVGPU-47 Change-Id: I620f4470aa704f1cc920e03947831440fbb0eb05 Signed-off-by: Lakshmanan M <lm@nvidia.com> Reviewed-on: http://git-master/r/1217176 (cherry picked from commit ed56743c2ac8dc325c75f85a82271d2d5ed8d96a) Reviewed-on: http://git-master/r/1241952 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/boardobj/boardobjgrp.h')
-rw-r--r--drivers/gpu/nvgpu/boardobj/boardobjgrp.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/boardobj/boardobjgrp.h b/drivers/gpu/nvgpu/boardobj/boardobjgrp.h
index 6527bbdc..7baa5bea 100644
--- a/drivers/gpu/nvgpu/boardobj/boardobjgrp.h
+++ b/drivers/gpu/nvgpu/boardobj/boardobjgrp.h
@@ -254,6 +254,19 @@ struct boardobjgrp {
254#define BOARDOBJGRP_FOR_EACH(_pgrp, _ptype, _pobj, _index) \ 254#define BOARDOBJGRP_FOR_EACH(_pgrp, _ptype, _pobj, _index) \
255 BOARDOBJGRP_ITERATOR(_pgrp, _ptype, _pobj, _index, NULL) 255 BOARDOBJGRP_ITERATOR(_pgrp, _ptype, _pobj, _index, NULL)
256 256
257#define BOARDOBJGRP_FOR_EACH_INDEX_IN_MASK(mask_width, index, mask) \
258{ \
259 u##mask_width lcl_msk = (u##mask_width)(mask); \
260 for (index = 0; lcl_msk != 0; index++, lcl_msk >>= 1) { \
261 if (((u##mask_width)((u64)1) & lcl_msk) == 0) { \
262 continue; \
263 }
264
265#define BOARDOBJGRP_FOR_EACH_INDEX_IN_MASK_END \
266 } \
267}
268
269
257/*! 270/*!
258* Invalid UNIT_ID. Used to indicate that the implementing class has not set 271* Invalid UNIT_ID. Used to indicate that the implementing class has not set
259* @ref BOARDOBJGRP::unitId and, thus, certain BOARDOBJGRP PMU interfaces are 272* @ref BOARDOBJGRP::unitId and, thus, certain BOARDOBJGRP PMU interfaces are