misc.h 917 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. /*
  3. * Copyright (C) 2016-2017 Intel Corporation
  4. */
  5. #ifndef _MISC_H_
  6. #define _MISC_H_
  7. #include <asm/sections.h>
  8. void dwmac_deassert_reset(const unsigned int of_reset_id, const u32 phymode);
  9. struct bsel {
  10. const char *mode;
  11. const char *name;
  12. };
  13. extern struct bsel bsel_str[];
  14. #ifdef CONFIG_FPGA
  15. void socfpga_fpga_add(void *fpga_desc);
  16. #else
  17. inline void socfpga_fpga_add(void *fpga_desc) {}
  18. #endif
  19. #ifdef CONFIG_TARGET_SOCFPGA_GEN5
  20. void socfpga_sdram_remap_zero(void);
  21. static inline bool socfpga_is_booting_from_fpga(void)
  22. {
  23. if ((__image_copy_start >= (char *)SOCFPGA_FPGA_SLAVES_ADDRESS) &&
  24. (__image_copy_start < (char *)SOCFPGA_STM_ADDRESS))
  25. return true;
  26. return false;
  27. }
  28. #endif
  29. #ifdef CONFIG_TARGET_SOCFPGA_ARRIA10
  30. void socfpga_init_security_policies(void);
  31. void socfpga_sdram_remap_zero(void);
  32. #endif
  33. void do_bridge_reset(int enable);
  34. #endif /* _MISC_H_ */