blob: e5677fcfd77f8504bff415b778966643a1580600 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
/* SPDX-License-Identifier: GPL-2.0-only */
#include <cpu/cpu.h>
#include <soc/cpu.h>
#include <soc/soc_util.h>
#include <types.h>
enum soc_type get_soc_type(void)
{
uint32_t cpuid = cpuid_eax(1);
if (cpuid_match(cpuid, PHOENIX_A0_CPUID, CPUID_ALL_STEPPINGS_MASK))
return SOC_PHOENIX;
if (cpuid_match(cpuid, PHOENIX2_A0_CPUID, CPUID_ALL_STEPPINGS_MASK))
return SOC_PHOENIX2;
return SOC_UNKNOWN;
}
|