| 57 | static const struct cpu_info* g_prefined_table[] = {&rk3399, &a63, &rk3288, &r40, &hikey960, &apq8096}; |
| 58 | |
| 59 | const struct cpu_info* get_predefined_cpu(const char* cpu_name) |
| 60 | { |
| 61 | int table_size = sizeof(g_prefined_table) / sizeof(struct cpu_info*); |
| 62 | |
| 63 | for(int i = 0; i < table_size; i++) |
| 64 | { |
| 65 | const struct cpu_info* p_info = g_prefined_table[i]; |
| 66 | if(!strcmp(p_info->cpu_name, cpu_name)) |
| 67 | return p_info; |
| 68 | } |
| 69 | |
| 70 | return nullptr; |
| 71 | } |