mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-17 01:54:22 +00:00

This is mainly a clock interface with clk_ops callbacks. Those callbacks are: enable, disable, get_rate, set_parent, and is_enabled. This framework is compiled for STM32MP1. Change-Id: I5119a2aeaf103ceaae7a60d9e423caf0c148d794 Signed-off-by: Ludovic Barre <ludovic.barre@st.com> Signed-off-by: Gabriel Fernandez <gabriel.fernandez@st.com>
28 lines
641 B
C
28 lines
641 B
C
/*
|
|
* Copyright (c) 2021, STMicroelectronics - All Rights Reserved
|
|
*
|
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
*/
|
|
|
|
#ifndef CLK_H
|
|
#define CLK_H
|
|
|
|
#include <stdbool.h>
|
|
|
|
struct clk_ops {
|
|
int (*enable)(unsigned long id);
|
|
void (*disable)(unsigned long id);
|
|
unsigned long (*get_rate)(unsigned long id);
|
|
int (*get_parent)(unsigned long id);
|
|
bool (*is_enabled)(unsigned long id);
|
|
};
|
|
|
|
int clk_enable(unsigned long id);
|
|
void clk_disable(unsigned long id);
|
|
unsigned long clk_get_rate(unsigned long id);
|
|
bool clk_is_enabled(unsigned long id);
|
|
int clk_get_parent(unsigned long id);
|
|
|
|
void clk_register(const struct clk_ops *ops);
|
|
|
|
#endif /* CLK_H */
|