stm32mp_clkfunc.h 955 B

12345678910111213141516171819202122232425262728293031323334
  1. /*
  2. * Copyright (c) 2017-2024, STMicroelectronics - All Rights Reserved
  3. *
  4. * SPDX-License-Identifier: BSD-3-Clause
  5. */
  6. #ifndef STM32MP_CLKFUNC_H
  7. #define STM32MP_CLKFUNC_H
  8. #include <stdbool.h>
  9. #include <libfdt.h>
  10. #include <platform_def.h>
  11. int fdt_osc_read_freq(const char *name, uint32_t *freq);
  12. bool fdt_clk_read_bool(const char *node_label, const char *prop_name);
  13. uint32_t fdt_clk_read_uint32_default(const char *node_label,
  14. const char *prop_name,
  15. uint32_t dflt_value);
  16. int fdt_rcc_read_uint32_array(const char *prop_name, uint32_t count,
  17. uint32_t *array);
  18. int fdt_rcc_subnode_offset(const char *name);
  19. const fdt32_t *fdt_rcc_read_prop(const char *prop_name, int *lenp);
  20. bool fdt_get_rcc_secure_state(void);
  21. int fdt_get_clock_id(int node);
  22. unsigned long fdt_get_uart_clock_freq(uintptr_t instance);
  23. void stm32mp_stgen_config(unsigned long rate);
  24. void stm32mp_stgen_restore_rate(void);
  25. #endif /* STM32MP_CLKFUNC_H */