fpga_manager.h 745 B

123456789101112131415161718192021222324252627282930313233
  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. #endif
  13. /* FPGA CD Ratio Value */
  14. #define CDRATIO_x1 0x0
  15. #define CDRATIO_x2 0x1
  16. #define CDRATIO_x4 0x2
  17. #define CDRATIO_x8 0x3
  18. #ifndef __ASSEMBLY__
  19. /* Common prototypes */
  20. int fpgamgr_get_mode(void);
  21. int fpgamgr_poll_fpga_ready(void);
  22. void fpgamgr_program_write(const void *rbf_data, size_t rbf_size);
  23. int fpgamgr_test_fpga_ready(void);
  24. int fpgamgr_dclkcnt_set(unsigned long cnt);
  25. #endif /* __ASSEMBLY__ */
  26. #endif /* _FPGA_MANAGER_H_ */