fpga_manager.h 833 B

1234567891011121314151617181920212223242526272829303132333435
  1. /*
  2. * Copyright (C) 2012-2017 Altera Corporation <www.altera.com>
  3. * All rights reserved.
  4. *
  5. * SPDX-License-Identifier: BSD-3-Clause
  6. */
  7. #ifndef _FPGA_MANAGER_H_
  8. #define _FPGA_MANAGER_H_
  9. #include <altera.h>
  10. #if defined(CONFIG_TARGET_SOCFPGA_GEN5)
  11. #include <asm/arch/fpga_manager_gen5.h>
  12. #elif defined(CONFIG_TARGET_SOCFPGA_ARRIA10)
  13. #include <asm/arch/fpga_manager_arria10.h>
  14. #endif
  15. /* FPGA CD Ratio Value */
  16. #define CDRATIO_x1 0x0
  17. #define CDRATIO_x2 0x1
  18. #define CDRATIO_x4 0x2
  19. #define CDRATIO_x8 0x3
  20. #ifndef __ASSEMBLY__
  21. /* Common prototypes */
  22. int fpgamgr_get_mode(void);
  23. int fpgamgr_poll_fpga_ready(void);
  24. void fpgamgr_program_write(const void *rbf_data, size_t rbf_size);
  25. int fpgamgr_test_fpga_ready(void);
  26. int fpgamgr_dclkcnt_set(unsigned long cnt);
  27. #endif /* __ASSEMBLY__ */
  28. #endif /* _FPGA_MANAGER_H_ */