speedo-tegra124.c (a02001086bbfb4da35d1228bebc2f1b442db455f) | speedo-tegra124.c (7e939de1b2bb26496e4967e5346619700245e7c0) |
---|---|
1/* 2 * Copyright (c) 2013-2014, NVIDIA CORPORATION. All rights reserved. 3 * 4 * This program is free software; you can redistribute it and/or modify it 5 * under the terms and conditions of the GNU General Public License, 6 * version 2, as published by the Free Software Foundation. 7 * 8 * This program is distributed in the hope it will be useful, but WITHOUT --- 108 unchanged lines hidden (view full) --- 117 118 BUILD_BUG_ON(ARRAY_SIZE(cpu_process_speedos) != 119 THRESHOLD_INDEX_COUNT); 120 BUILD_BUG_ON(ARRAY_SIZE(gpu_process_speedos) != 121 THRESHOLD_INDEX_COUNT); 122 BUILD_BUG_ON(ARRAY_SIZE(core_process_speedos) != 123 THRESHOLD_INDEX_COUNT); 124 | 1/* 2 * Copyright (c) 2013-2014, NVIDIA CORPORATION. All rights reserved. 3 * 4 * This program is free software; you can redistribute it and/or modify it 5 * under the terms and conditions of the GNU General Public License, 6 * version 2, as published by the Free Software Foundation. 7 * 8 * This program is distributed in the hope it will be useful, but WITHOUT --- 108 unchanged lines hidden (view full) --- 117 118 BUILD_BUG_ON(ARRAY_SIZE(cpu_process_speedos) != 119 THRESHOLD_INDEX_COUNT); 120 BUILD_BUG_ON(ARRAY_SIZE(gpu_process_speedos) != 121 THRESHOLD_INDEX_COUNT); 122 BUILD_BUG_ON(ARRAY_SIZE(core_process_speedos) != 123 THRESHOLD_INDEX_COUNT); 124 |
125 cpu_speedo_0_value = tegra30_fuse_readl(FUSE_CPU_SPEEDO_0); | 125 cpu_speedo_0_value = tegra_fuse_read_early(FUSE_CPU_SPEEDO_0); |
126 127 /* GPU Speedo is stored in CPU_SPEEDO_2 */ | 126 127 /* GPU Speedo is stored in CPU_SPEEDO_2 */ |
128 sku_info->gpu_speedo_value = tegra30_fuse_readl(FUSE_CPU_SPEEDO_2); | 128 sku_info->gpu_speedo_value = tegra_fuse_read_early(FUSE_CPU_SPEEDO_2); |
129 | 129 |
130 soc_speedo_0_value = tegra30_fuse_readl(FUSE_SOC_SPEEDO_0); | 130 soc_speedo_0_value = tegra_fuse_read_early(FUSE_SOC_SPEEDO_0); |
131 | 131 |
132 cpu_iddq_value = tegra30_fuse_readl(FUSE_CPU_IDDQ); 133 soc_iddq_value = tegra30_fuse_readl(FUSE_SOC_IDDQ); 134 gpu_iddq_value = tegra30_fuse_readl(FUSE_GPU_IDDQ); | 132 cpu_iddq_value = tegra_fuse_read_early(FUSE_CPU_IDDQ); 133 soc_iddq_value = tegra_fuse_read_early(FUSE_SOC_IDDQ); 134 gpu_iddq_value = tegra_fuse_read_early(FUSE_GPU_IDDQ); |
135 136 sku_info->cpu_speedo_value = cpu_speedo_0_value; 137 138 if (sku_info->cpu_speedo_value == 0) { 139 pr_warn("Tegra Warning: Speedo value not fused.\n"); 140 WARN_ON(1); 141 return; 142 } 143 144 rev_sku_to_speedo_ids(sku_info, &threshold); 145 | 135 136 sku_info->cpu_speedo_value = cpu_speedo_0_value; 137 138 if (sku_info->cpu_speedo_value == 0) { 139 pr_warn("Tegra Warning: Speedo value not fused.\n"); 140 WARN_ON(1); 141 return; 142 } 143 144 rev_sku_to_speedo_ids(sku_info, &threshold); 145 |
146 sku_info->cpu_iddq_value = tegra30_fuse_readl(FUSE_CPU_IDDQ); | 146 sku_info->cpu_iddq_value = tegra_fuse_read_early(FUSE_CPU_IDDQ); |
147 148 for (i = 0; i < GPU_PROCESS_CORNERS; i++) 149 if (sku_info->gpu_speedo_value < 150 gpu_process_speedos[threshold][i]) 151 break; 152 sku_info->gpu_process_id = i; 153 154 for (i = 0; i < CPU_PROCESS_CORNERS; i++) --- 14 unchanged lines hidden --- | 147 148 for (i = 0; i < GPU_PROCESS_CORNERS; i++) 149 if (sku_info->gpu_speedo_value < 150 gpu_process_speedos[threshold][i]) 151 break; 152 sku_info->gpu_process_id = i; 153 154 for (i = 0; i < CPU_PROCESS_CORNERS; i++) --- 14 unchanged lines hidden --- |