1// SPDX-License-Identifier: GPL-2.0-or-later 2/* 3 * Copyright (c) 2011 Zhang, Keguang <keguang.zhang@gmail.com> 4 */ 5 6#include <linux/io.h> 7#include <linux/init.h> 8#include <linux/smp.h> 9#include <asm/cpu-info.h> 10#include <asm/bootinfo.h> 11 12const char *get_system_type(void) 13{ 14 unsigned int processor_id = (¤t_cpu_data)->processor_id; 15 16 switch (processor_id & PRID_REV_MASK) { 17 case PRID_REV_LOONGSON1B: 18#if defined(CONFIG_LOONGSON1_LS1B) 19 return "LOONGSON LS1B"; 20#elif defined(CONFIG_LOONGSON1_LS1C) 21 return "LOONGSON LS1C"; 22#endif 23 default: 24 return "LOONGSON (unknown)"; 25 } 26} 27