From 02190c7597d3b1a04ebcbc746b41f949ab699a18 Mon Sep 17 00:00:00 2001 From: Mahantesh Kumbar Date: Tue, 31 Jan 2017 12:56:10 +0530 Subject: gpu: nvgpu: PMU interface headers reorganization Moved PMU/Falcon interface which are present in pmu_gk20a.h & pmu_common.h to new files as per feature nvgpu_gpmu_cmdif.h - Top-level header-file that defines the command/message interfaces used to communicate with PMU gpmuif_pmu.h - PMU Command/Message init interfaces gpmuif_cmn.h - Common definitions used by interfaces Jira NVGPU-19 Change-Id: Id8ea6075e4dbba7697036951dcb85487eb861710 Signed-off-by: Mahantesh Kumbar Reviewed-on: http://git-master/r/1296415 GVS: Gerrit_Virtual_Submit Reviewed-by: Vijayakumar Subbu --- drivers/gpu/nvgpu/pmuif/nvgpu_gpmu_cmdif.h | 85 ++++++++++++++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100644 drivers/gpu/nvgpu/pmuif/nvgpu_gpmu_cmdif.h (limited to 'drivers/gpu/nvgpu/pmuif/nvgpu_gpmu_cmdif.h') diff --git a/drivers/gpu/nvgpu/pmuif/nvgpu_gpmu_cmdif.h b/drivers/gpu/nvgpu/pmuif/nvgpu_gpmu_cmdif.h new file mode 100644 index 00000000..b21b3981 --- /dev/null +++ b/drivers/gpu/nvgpu/pmuif/nvgpu_gpmu_cmdif.h @@ -0,0 +1,85 @@ +/* + * Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify it + * under the terms and conditions of the GNU General Public License, + * version 2, as published by the Free Software Foundation. + * + * This program is distributed in the hope it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + */ +#ifndef _NVGPUGPMUCMDIF_H_ +#define _NVGPUGPMUCMDIF_H_ + +#include "gk20a/pmu_api.h" +#include "gk20a/pmu_common.h" +#include "gpmuif_cmn.h" +#include "gpmuif_pmu.h" +#include "gpmuifboardobj.h" +#include "gpmuifclk.h" +#include "gpmuifperf.h" +#include "gpmuifpmgr.h" +#include "gpmuifvolt.h" +#include "gpmuiftherm.h" + +struct pmu_cmd { + struct pmu_hdr hdr; + union { + struct pmu_perfmon_cmd perfmon; + struct pmu_pg_cmd pg; + struct pmu_zbc_cmd zbc; + struct pmu_acr_cmd acr; + struct pmu_lrf_tex_ltc_dram_cmd lrf_tex_ltc_dram; + struct nv_pmu_boardobj_cmd boardobj; + struct nv_pmu_perf_cmd perf; + struct nv_pmu_volt_cmd volt; + struct nv_pmu_clk_cmd clk; + struct nv_pmu_pmgr_cmd pmgr; + struct nv_pmu_therm_cmd therm; + } cmd; +}; + +struct pmu_msg { + struct pmu_hdr hdr; + union { + struct pmu_init_msg init; + struct pmu_perfmon_msg perfmon; + struct pmu_pg_msg pg; + struct pmu_rc_msg rc; + struct pmu_acr_msg acr; + struct pmu_lrf_tex_ltc_dram_msg lrf_tex_ltc_dram; + struct nv_pmu_boardobj_msg boardobj; + struct nv_pmu_perf_msg perf; + struct nv_pmu_volt_msg volt; + struct nv_pmu_clk_msg clk; + struct nv_pmu_pmgr_msg pmgr; + struct nv_pmu_therm_msg therm; + } msg; +}; + +#define PMU_UNIT_REWIND (0x00) +#define PMU_UNIT_PG (0x03) +#define PMU_UNIT_INIT (0x07) +#define PMU_UNIT_ACR (0x0A) +#define PMU_UNIT_PERFMON_T18X (0x11) +#define PMU_UNIT_PERFMON (0x12) +#define PMU_UNIT_PERF (0x13) +#define PMU_UNIT_RC (0x1F) +#define PMU_UNIT_FECS_MEM_OVERRIDE (0x1E) +#define PMU_UNIT_CLK (0x0D) +#define PMU_UNIT_THERM (0x14) +#define PMU_UNIT_PMGR (0x18) +#define PMU_UNIT_VOLT (0x0E) + +#define PMU_UNIT_END (0x23) + +#define PMU_UNIT_TEST_START (0xFE) +#define PMU_UNIT_END_SIM (0xFF) +#define PMU_UNIT_TEST_END (0xFF) + +#define PMU_UNIT_ID_IS_VALID(id) \ + (((id) < PMU_UNIT_END) || ((id) >= PMU_UNIT_TEST_START)) + +#endif /* _NVGPUGPMUCMDIF_H_*/ -- cgit v1.2.2