setup.c 711 B

1234567891011121314151617181920212223242526272829
  1. /*
  2. * Copyright (c) 2011 Zhang, Keguang <keguang.zhang@gmail.com>
  3. *
  4. * This program is free software; you can redistribute it and/or modify it
  5. * under the terms of the GNU General Public License as published by the
  6. * Free Software Foundation; either version 2 of the License, or (at your
  7. * option) any later version.
  8. */
  9. #include <asm/bootinfo.h>
  10. #include <prom.h>
  11. void __init plat_mem_setup(void)
  12. {
  13. add_memory_region(0x0, (memsize << 20), BOOT_MEM_RAM);
  14. }
  15. const char *get_system_type(void)
  16. {
  17. unsigned int processor_id = (&current_cpu_data)->processor_id;
  18. switch (processor_id & PRID_REV_MASK) {
  19. case PRID_REV_LOONGSON1B:
  20. return "LOONGSON LS1B";
  21. default:
  22. return "LOONGSON (unknown)";
  23. }
  24. }