fsp_common.c 925 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /*
  2. * Copyright (C) 2014, Bin Meng <bmeng.cn@gmail.com>
  3. *
  4. * SPDX-License-Identifier: GPL-2.0+
  5. */
  6. #include <common.h>
  7. #include <errno.h>
  8. #include <asm/io.h>
  9. #include <asm/post.h>
  10. #include <asm/processor.h>
  11. #include <asm/fsp/fsp_support.h>
  12. int print_cpuinfo(void)
  13. {
  14. post_code(POST_CPU_INFO);
  15. return default_print_cpuinfo();
  16. }
  17. int board_pci_post_scan(struct pci_controller *hose)
  18. {
  19. u32 status;
  20. /* call into FspNotify */
  21. debug("Calling into FSP (notify phase INIT_PHASE_PCI): ");
  22. status = fsp_notify(NULL, INIT_PHASE_PCI);
  23. if (status != FSP_SUCCESS)
  24. debug("fail, error code %x\n", status);
  25. else
  26. debug("OK\n");
  27. return 0;
  28. }
  29. void board_final_cleanup(void)
  30. {
  31. u32 status;
  32. /* call into FspNotify */
  33. debug("Calling into FSP (notify phase INIT_PHASE_BOOT): ");
  34. status = fsp_notify(NULL, INIT_PHASE_BOOT);
  35. if (status != FSP_SUCCESS)
  36. debug("fail, error code %x\n", status);
  37. else
  38. debug("OK\n");
  39. return;
  40. }