init.c 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /*
  2. * Copyright (C) 2009 Lemote Inc.
  3. * Author: Wu Zhangjin, wuzhangjin@gmail.com
  4. *
  5. * This program is free software; you can redistribute it and/or modify it
  6. * under the terms of the GNU General Public License as published by the
  7. * Free Software Foundation; either version 2 of the License, or (at your
  8. * option) any later version.
  9. */
  10. #include <linux/bootmem.h>
  11. #include <asm/smp-ops.h>
  12. #include <loongson.h>
  13. /* Loongson CPU address windows config space base address */
  14. unsigned long __maybe_unused _loongson_addrwincfg_base;
  15. void __init prom_init(void)
  16. {
  17. #ifdef CONFIG_CPU_SUPPORTS_ADDRWINCFG
  18. _loongson_addrwincfg_base = (unsigned long)
  19. ioremap(LOONGSON_ADDRWINCFG_BASE, LOONGSON_ADDRWINCFG_SIZE);
  20. #endif
  21. prom_init_cmdline();
  22. prom_init_env();
  23. /* init base address of io space */
  24. set_io_port_base((unsigned long)
  25. ioremap(LOONGSON_PCIIO_BASE, LOONGSON_PCIIO_SIZE));
  26. #ifdef CONFIG_NUMA
  27. prom_init_numa_memory();
  28. #else
  29. prom_init_memory();
  30. #endif
  31. /*init the uart base address */
  32. prom_init_uart_base();
  33. register_smp_ops(&loongson3_smp_ops);
  34. }
  35. void __init prom_free_prom_memory(void)
  36. {
  37. }