diff options
| author | Rohit Khanna <rokhanna@nvidia.com> | 2017-01-27 18:10:12 -0500 |
|---|---|---|
| committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-02-24 11:43:19 -0500 |
| commit | e8b83ca0aeac0d3a0365a69325cc7746fdfa4c62 (patch) | |
| tree | 5ad50944ea714ea0b01cd41f2b5123f08305c520 /include/linux/platform | |
| parent | ddcfffcf6a354492fccda77f75ad51667f661a40 (diff) | |
tegra: T194 cpu macro
Add a macro to detect if a CPU core is Carmel or not.
Bug 1814444
Bug 1827294
Change-Id: I5797f80ff990ffbbb59342a11f68ed22ea2b184c
Signed-off-by: Rohit Khanna <rokhanna@nvidia.com>
Reviewed-on: http://git-master/r/1295512
Reviewed-by: Krishna Sitaraman <ksitaraman@nvidia.com>
Tested-by: Krishna Sitaraman <ksitaraman@nvidia.com>
Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Alexander Van Brunt <avanbrunt@nvidia.com>
Diffstat (limited to 'include/linux/platform')
| -rw-r--r-- | include/linux/platform/tegra/tegra-cpu.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/include/linux/platform/tegra/tegra-cpu.h b/include/linux/platform/tegra/tegra-cpu.h new file mode 100644 index 000000000..a85c4ab9a --- /dev/null +++ b/include/linux/platform/tegra/tegra-cpu.h | |||
| @@ -0,0 +1,24 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (c) 2017, 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 | ||
| 9 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
| 10 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
| 11 | * more details. | ||
| 12 | */ | ||
| 13 | |||
| 14 | #include <asm/cputype.h> | ||
| 15 | #include <asm/cpu.h> | ||
| 16 | |||
| 17 | #define MIDR_CPU_MASK 0xFF0FFFF0 | ||
| 18 | #define MIDR_CPU_CARMEL 0x4E0F0040 | ||
| 19 | |||
| 20 | static inline u8 tegra_is_cpu_carmel(u8 cpu) | ||
| 21 | { | ||
| 22 | struct cpuinfo_arm64 *cpuinfo = &per_cpu(cpu_data, cpu); | ||
| 23 | return ((cpuinfo->reg_midr & MIDR_CPU_MASK) == MIDR_CPU_CARMEL); | ||
| 24 | } | ||
