From b241f27b5d324585fc52797c1283dde650aa520d Mon Sep 17 00:00:00 2001 From: Jon Hunter Date: Fri, 17 Apr 2015 13:58:59 +0800 Subject: soc/tegra: Update Tegra Processor Power Model (PPM) Update the Tegra Processor Power Model for Linux v4.4. This is based upon the following work by Wei Ni : Reviewed-on: https://chromium-review.googlesource.com/269914 Reviewed-on: https://chromium-review.googlesource.com/283720 Bug 1811732 Change-Id: I9a847cccee322853096093b1ad5110bc4650f3f2 Signed-off-by: Jon Hunter Reviewed-on: http://git-master/r/1255679 GVS: Gerrit_Virtual_Submit Reviewed-by: Jon Mayo Reviewed-on: https://git-master.nvidia.com/r/1786276 Reviewed-by: mobile promotions Tested-by: mobile promotions --- include/linux/tegra_ppm.h | 81 ----------------------------------------------- 1 file changed, 81 deletions(-) delete mode 100644 include/linux/tegra_ppm.h (limited to 'include/linux') diff --git a/include/linux/tegra_ppm.h b/include/linux/tegra_ppm.h deleted file mode 100644 index 8e421bcbc..000000000 --- a/include/linux/tegra_ppm.h +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Copyright (c) 2014, 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 __TEGRA_PPM_H -#define __TEGRA_PPM_H - -#include -#include - -struct fv_relation; -struct fv_relation *fv_relation_create( - struct clk *, int, ssize_t, int (*)(struct clk *, long unsigned int)); -void fv_relation_destroy(struct fv_relation *); - -#define TEGRA_PPM_MAX_CORES 4 -struct tegra_ppm_params { - int n_cores; - - /* activity factor in nA/MHz (aka fF, femtofarads) */ - u32 dyn_consts_n[TEGRA_PPM_MAX_CORES]; - - /* leakage scaling factor based on number of cores. Expressed permill */ - u32 leakage_consts_n[TEGRA_PPM_MAX_CORES]; - - /* Coefficients to a tricubic model of leakage. Model inputs are: - * Voltage in Volts - * IDDQ in Amps - * Temperature in *deciCelcius* - * - * This unusual choice of units helps with the accuracy of fixed point - * calculations by keeping all of the coefficients near the same order - * of magnitude. - * - * All of the coefficients are expressed as ijk_scaled times their true - * value so that they fit nicely in 32-bit integers with minimal - * quantization error. - */ - s32 leakage_consts_ijk[4][4][4]; - u32 ijk_scaled; - - u32 leakage_min; /* minimum leakage current */ -}; - -struct tegra_ppm; -struct dt; - -struct tegra_ppm_params *of_read_tegra_ppm_params(struct device_node *np); - -struct tegra_ppm *tegra_ppm_create(const char *name, - struct fv_relation *fv, - struct tegra_ppm_params *params, - int iddq_ma, - struct dentry *debugfs_dir); -void tegra_ppm_destroy(struct tegra_ppm *doomed, - struct fv_relation **fv, - struct tegra_ppm_params **params); - -#define TEGRA_PPM_UNITS_MILLIAMPS 0 -#define TEGRA_PPM_UNITS_MILLIWATTS 1 - - -unsigned tegra_ppm_get_maxf(struct tegra_ppm *ctx, - unsigned int limit, int units, - int temp_c, int cores); - -void tegra_ppm_drop_cache(struct tegra_ppm *ctx); - -#endif -- cgit v1.2.2