2016-03-03 22:33:04 +08:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2016 Open-RnD Sp. z o.o.
|
2016-10-03 21:46:48 +08:00
|
|
|
* Copyright (c) 2016 BayLibre, SAS
|
2016-11-24 21:30:19 +08:00
|
|
|
* Copyright (c) 2016 RnDity Sp. z o.o.
|
2017-01-24 00:45:42 +08:00
|
|
|
* Copyright (c) 2017 Linaro Limited.
|
2016-03-03 22:33:04 +08:00
|
|
|
*
|
2017-01-19 09:01:01 +08:00
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
2016-03-03 22:33:04 +08:00
|
|
|
*/
|
|
|
|
#ifndef _STM32_CLOCK_CONTROL_H_
|
|
|
|
#define _STM32_CLOCK_CONTROL_H_
|
|
|
|
|
|
|
|
#include <clock_control.h>
|
|
|
|
|
|
|
|
/* common clock control device name for all STM32 chips */
|
|
|
|
#define STM32_CLOCK_CONTROL_NAME "stm32-cc"
|
|
|
|
|
2016-04-03 10:40:26 +08:00
|
|
|
#ifdef CONFIG_SOC_SERIES_STM32F1X
|
2016-03-03 22:33:04 +08:00
|
|
|
#include "stm32f1_clock_control.h"
|
2016-10-27 02:26:23 +08:00
|
|
|
#elif CONFIG_SOC_SERIES_STM32F4X
|
|
|
|
#include "stm32f4_clock_control.h"
|
2016-10-03 21:46:48 +08:00
|
|
|
#endif
|
|
|
|
|
2017-01-24 00:45:42 +08:00
|
|
|
/* Bus */
|
|
|
|
enum {
|
|
|
|
STM32_CLOCK_BUS_AHB1,
|
|
|
|
STM32_CLOCK_BUS_AHB2,
|
|
|
|
STM32_CLOCK_BUS_APB1,
|
|
|
|
#ifdef CONFIG_SOC_SERIES_STM32L4X
|
|
|
|
STM32_CLOCK_BUS_APB1_2,
|
|
|
|
#endif
|
|
|
|
STM32_CLOCK_BUS_APB2,
|
|
|
|
};
|
|
|
|
|
|
|
|
struct stm32_pclken {
|
|
|
|
uint32_t bus;
|
|
|
|
uint32_t enr;
|
|
|
|
};
|
|
|
|
|
2016-03-03 22:33:04 +08:00
|
|
|
#endif /* _STM32_CLOCK_CONTROL_H_ */
|