mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-08-16 09:27:01 +02:00
The device tree parsing code for the STM32 platform is using its own FDT helper functions, some of them being rather generic. In particular the existing fdt_read_uint32_array() implementation is now almost identical to the new generic code in fdt_wrappers.c, so we can remove the ST specific version and adjust the existing callers. Compared to the original ST implementation the new version takes a pointer to the DTB as the first argument, and also swaps the order of the number of cells and the pointer. Change-Id: Id06b0f1ba4db1ad1f733be40e82c34f46638551a Signed-off-by: Andre Przywara <andre.przywara@arm.com>
34 lines
921 B
C
34 lines
921 B
C
/*
|
|
* Copyright (c) 2017-2019, STMicroelectronics - All Rights Reserved
|
|
*
|
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
*/
|
|
|
|
#ifndef STM32MP_CLKFUNC_H
|
|
#define STM32MP_CLKFUNC_H
|
|
|
|
#include <stdbool.h>
|
|
|
|
#include <libfdt.h>
|
|
|
|
#include <platform_def.h>
|
|
|
|
int fdt_osc_read_freq(const char *name, uint32_t *freq);
|
|
bool fdt_osc_read_bool(enum stm32mp_osc_id osc_id, const char *prop_name);
|
|
uint32_t fdt_osc_read_uint32_default(enum stm32mp_osc_id osc_id,
|
|
const char *prop_name,
|
|
uint32_t dflt_value);
|
|
|
|
int fdt_get_rcc_node(void *fdt);
|
|
uint32_t fdt_rcc_read_addr(void);
|
|
int fdt_rcc_read_uint32_array(const char *prop_name, uint32_t count,
|
|
uint32_t *array);
|
|
int fdt_rcc_subnode_offset(const char *name);
|
|
const fdt32_t *fdt_rcc_read_prop(const char *prop_name, int *lenp);
|
|
bool fdt_get_rcc_secure_status(void);
|
|
|
|
uintptr_t fdt_get_stgen_base(void);
|
|
int fdt_get_clock_id(int node);
|
|
|
|
#endif /* STM32MP_CLKFUNC_H */
|