Zephyr Project API 4.4.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
mchp_xec_clock_control.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2021 Microchip Technology Inc.
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
12
13#ifndef ZEPHYR_INCLUDE_DRIVERS_CLOCK_CONTROL_MCHP_XEC_H_
14#define ZEPHYR_INCLUDE_DRIVERS_CLOCK_CONTROL_MCHP_XEC_H_
15
16#include <zephyr/device.h>
19
25
39
41
42/* @brief set or clear Microchip XEC peripheral PCR sleep enable
43 *
44 * @param slp_idx is the peripheral's sleep enable zero based index (0 through 4)
45 * @param slp_pos is the bit position in the 32-bit sleep enable register
46 * @param slp_en is 0 to clear(disable) clock gating and non-zero to enable clock gating
47 * @return 0 success or -EINVAL on error
48 */
49int z_mchp_xec_pcr_periph_sleep(uint8_t slp_idx, uint8_t slp_pos, uint8_t slp_en);
50
51/* @brief Reset a single peripheral similar to chip reset
52 *
53 * @param rst_idx is the peripheral's reset enable register index (0 through 4).
54 * @param rst_pos is the bit position in the 32-bit sleep enable register
55 * @return 0 success or -EINVAL on error
56 * @note This routine lock and unlocks IRQs to safely touch multiple PCR registers. The reset
57 * index and bit position are the same as the peripheral's sleep index and bit position.
58 */
59int z_mchp_xec_pcr_periph_reset(uint8_t rst_idx, uint8_t rst_pos);
60
62
64
65#endif /* ZEPHYR_INCLUDE_DRIVERS_CLOCK_CONTROL_MCHP_XEC_H_ */
Main header file for clock control driver API.
Clock IDs for the Microchip MEC SoC series.
__UINT32_TYPE__ uint32_t
Definition stdint.h:90
__UINT8_TYPE__ uint8_t
Definition stdint.h:88
Structure for interfacing with clock control API.
Definition mchp_xec_clock_control.h:27
struct clock_mchp_xec_subsys::@273276251207106027053375352335157346051033232227 bits
bitfield view
uint32_t val
Raw 32-bit value.
Definition mchp_xec_clock_control.h:29
uint32_t bus
Clock ID.
Definition mchp_xec_clock_control.h:36
uint32_t pcr_data
Encoded PCR data.
Definition mchp_xec_clock_control.h:34