quark.c 659 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /*
  2. * Copyright (C) 2015, Bin Meng <bmeng.cn@gmail.com>
  3. *
  4. * SPDX-License-Identifier: GPL-2.0+
  5. */
  6. #include <common.h>
  7. #include <asm/io.h>
  8. #include <asm/pci.h>
  9. #include <asm/post.h>
  10. #include <asm/processor.h>
  11. int arch_cpu_init(void)
  12. {
  13. struct pci_controller *hose;
  14. int ret;
  15. post_code(POST_CPU_INIT);
  16. #ifdef CONFIG_SYS_X86_TSC_TIMER
  17. timer_set_base(rdtsc());
  18. #endif
  19. ret = x86_cpu_init_f();
  20. if (ret)
  21. return ret;
  22. ret = pci_early_init_hose(&hose);
  23. if (ret)
  24. return ret;
  25. return 0;
  26. }
  27. int print_cpuinfo(void)
  28. {
  29. post_code(POST_CPU_INFO);
  30. return default_print_cpuinfo();
  31. }
  32. void reset_cpu(ulong addr)
  33. {
  34. /* cold reset */
  35. outb(0x08, PORT_RESET);
  36. }