fsp_common.c 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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. }
  41. int x86_fsp_init(void)
  42. {
  43. if (!gd->arch.hob_list)
  44. fsp_init(CONFIG_FSP_TEMP_RAM_ADDR, BOOT_FULL_CONFIG, NULL);
  45. return 0;
  46. }