From ddcfffcf6a354492fccda77f75ad51667f661a40 Mon Sep 17 00:00:00 2001 From: Krishna Sitaraman Date: Wed, 4 Jan 2017 16:44:39 -0800 Subject: t19x: mce: add mce driver This patch adds the initial driver for sw interface with the mts/mce in t19x. The driver provides api's and debugfs nodes for interaction with the mts/mce. JIRA TPM-1062 Change-Id: I4a682457a8e28e9b8db2a6a370a756f0d0524830 Signed-off-by: Krishna Sitaraman Reviewed-on: http://git-master/r/1280452 Reviewed-by: svccoveritychecker GVS: Gerrit_Virtual_Submit Reviewed-by: Alexander Van Brunt --- include/linux/t19x_mce.h | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 include/linux/t19x_mce.h (limited to 'include/linux') diff --git a/include/linux/t19x_mce.h b/include/linux/t19x_mce.h new file mode 100644 index 000000000..fcd611d94 --- /dev/null +++ b/include/linux/t19x_mce.h @@ -0,0 +1,35 @@ +/* + * 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. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifndef _LINUX_TEGRA_MCE_H +#define _LINUX_TEGRA_MCE_H + +#define NVG_STAT_MAX_ENTRIES 5 + +int t19x_mce_enter_cstate(u32 state, u32 wake_time); +int t19x_mce_update_cstate_info(u32 cluster, u32 ccplex, + u32 system, u8 force, u32 wake_mask, bool valid); +int t19x_mce_update_crossover_time(u32 type, u32 time); +int t19x_mce_read_cstate_stats(u32 state, u32 *stats); +int t19x_mce_write_cstate_stats(u32 state, u32 stats); +int t19x_mce_is_sc7_allowed(u32 state, u32 wake, u32 *allowed); +int t19x_mce_online_core(int cpu); +int t19x_mce_cc3_ctrl(u32 freq, u32 volt, u8 enable); +int t19x_mce_echo_data(u32 data, int *matched); +int t19x_mce_read_versions(u32 *major, u32 *minor); +int t19x_mce_enum_features(u64 *features); + +#endif -- cgit v1.2.2