1 /* 2 * Copyright (c) 2017-2019, STMicroelectronics - All Rights Reserved 3 * 4 * SPDX-License-Identifier: BSD-3-Clause 5 */ 6 7 #ifndef STM32MP_CLKFUNC_H 8 #define STM32MP_CLKFUNC_H 9 10 #include <stdbool.h> 11 12 #include <libfdt.h> 13 14 #include <platform_def.h> 15 16 int fdt_osc_read_freq(const char *name, uint32_t *freq); 17 bool fdt_osc_read_bool(enum stm32mp_osc_id osc_id, const char *prop_name); 18 uint32_t fdt_osc_read_uint32_default(enum stm32mp_osc_id osc_id, 19 const char *prop_name, 20 uint32_t dflt_value); 21 22 int fdt_get_rcc_node(void *fdt); 23 uint32_t fdt_rcc_read_addr(void); 24 int fdt_rcc_read_uint32_array(const char *prop_name, 25 uint32_t *array, uint32_t count); 26 int fdt_rcc_subnode_offset(const char *name); 27 const fdt32_t *fdt_rcc_read_prop(const char *prop_name, int *lenp); 28 bool fdt_get_rcc_secure_status(void); 29 30 uintptr_t fdt_get_stgen_base(void); 31 int fdt_get_clock_id(int node); 32 33 #endif /* STM32MP_CLKFUNC_H */ 34