setup.c 584 B

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