blob: fe6ca03d2df4015700d19eb540af24baca8c7e05 [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001/* SPDX-License-Identifier: GPL-2.0+ */
Patrice Chotard22768d52017-11-15 13:14:44 +01002/*
3 * Copyright (C) 2017, STMicroelectronics - All Rights Reserved
Patrice Chotard5d9950d2020-12-02 18:47:30 +01004 * Author(s): Patrice Chotard, <patrice.chotard@foss.st.com> for STMicroelectronics.
Patrice Chotard22768d52017-11-15 13:14:44 +01005 */
6
7#ifndef __STM32_PWR_H_
Simon Glass4dcacfc2020-05-10 11:40:13 -06008#define __STM32_PWR_H_
9
10#ifndef __ASSEMBLY__
11#include <linux/bitops.h>
12#endif
Patrice Chotard22768d52017-11-15 13:14:44 +010013
14/*
15 * Offsets of some PWR registers
16 */
17#define PWR_CR1_ODEN BIT(16)
18#define PWR_CR1_ODSWEN BIT(17)
19#define PWR_CSR1_ODRDY BIT(16)
20#define PWR_CSR1_ODSWRDY BIT(17)
21
22struct stm32_pwr_regs {
23 u32 cr1; /* power control register 1 */
24 u32 csr1; /* power control/status register 2 */
25};
26
27#endif /* __STM32_PWR_H_ */