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>
This commit is contained in:
Lakshmanan M
2016-09-08 22:50:59 +05:30
committed by mobile promotions
parent bc9df802fe
commit 315d8c6caa
7 changed files with 589 additions and 0 deletions

View File

@@ -26,6 +26,7 @@
#include "pmuif/gpmuifboardobj.h"
#include "pmuif/gpmuifclk.h"
#include "pmuif/gpmuifperf.h"
#include "pmuif/gpmuifpmgr.h"
/* defined by pmu hw spec */
#define GK20A_PMU_VA_SIZE (512 * 1024 * 1024)
@@ -179,6 +180,7 @@ struct pmu_ucode_desc_v1 {
#define PMU_UNIT_RC (0x1F)
#define PMU_UNIT_FECS_MEM_OVERRIDE (0x1E)
#define PMU_UNIT_CLK (0x0D)
#define PMU_UNIT_PMGR (0x18)
#define PMU_UNIT_END (0x23)
@@ -358,6 +360,7 @@ struct pmu_cmd {
struct nv_pmu_boardobj_cmd boardobj;
struct nv_pmu_perf_cmd perf;
struct nv_pmu_clk_cmd clk;
struct nv_pmu_pmgr_cmd pmgr;
} cmd;
};
@@ -373,6 +376,7 @@ struct pmu_msg {
struct nv_pmu_boardobj_msg boardobj;
struct nv_pmu_perf_msg perf;
struct nv_pmu_clk_msg clk;
struct nv_pmu_pmgr_msg pmgr;
} msg;
};