summaryrefslogtreecommitdiffstats
path: root/include/linux/tegra-cpu.h
blob: 38c48cbb5d47e31f6412b1825650f08346f31ab8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/*
 * Copyright (c) 2015-2016, 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 <http://www.gnu.org/licenses/>.
 */

#ifndef _LINUX_TEGRA_CPU_H
#define _LINUX_TEGRA_CPU_H

#include <asm/cputype.h>

static inline int tegra_is_this_cpu_denver(void)
{
	return read_cpuid_implementor() == ARM_CPU_IMP_NVIDIA;
}

static inline int tegra_is_this_cpu_arm(void)
{
	return read_cpuid_implementor() == ARM_CPU_IMP_ARM;
}
int tegra_get_clk_counter(u32 mpidr, u32 midr, u32 *coreclk,
	u32 *refclk);
#endif