12874c5fdSThomas Gleixner // SPDX-License-Identifier: GPL-2.0-or-later 230ad29bbSHuacai Chen /* 330ad29bbSHuacai Chen * Copyright (c) 2011 Zhang, Keguang <keguang.zhang@gmail.com> 430ad29bbSHuacai Chen */ 530ad29bbSHuacai Chen 6*75cac781SJiaxun Yang #include <linux/io.h> 7*75cac781SJiaxun Yang #include <linux/init.h> 8*75cac781SJiaxun Yang #include <linux/smp.h> 9*75cac781SJiaxun Yang #include <asm/cpu-info.h> 1030ad29bbSHuacai Chen #include <asm/bootinfo.h> 1130ad29bbSHuacai Chen get_system_type(void)1230ad29bbSHuacai Chenconst char *get_system_type(void) 1330ad29bbSHuacai Chen { 1430ad29bbSHuacai Chen unsigned int processor_id = (¤t_cpu_data)->processor_id; 1530ad29bbSHuacai Chen 1630ad29bbSHuacai Chen switch (processor_id & PRID_REV_MASK) { 1730ad29bbSHuacai Chen case PRID_REV_LOONGSON1B: 1812e3280bSYang Ling #if defined(CONFIG_LOONGSON1_LS1B) 1930ad29bbSHuacai Chen return "LOONGSON LS1B"; 2012e3280bSYang Ling #elif defined(CONFIG_LOONGSON1_LS1C) 2112e3280bSYang Ling return "LOONGSON LS1C"; 2212e3280bSYang Ling #endif 2330ad29bbSHuacai Chen default: 2430ad29bbSHuacai Chen return "LOONGSON (unknown)"; 2530ad29bbSHuacai Chen } 2630ad29bbSHuacai Chen } 27