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