| 1 | /* 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 | |
| 8 | enum 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 | } |