46 #ifndef __PWR_CTRL_H__
47 #define __PWR_CTRL_H__
62 #include <inc/hw_types.h>
63 #include <inc/hw_memmap.h>
64 #include <inc/hw_ints.h>
65 #include <inc/hw_aon_wuc.h>
66 #include <inc/hw_aon_sysctl.h>
67 #include <inc/hw_aon_rtc.h>
68 #include <inc/hw_adi_2_refsys.h>
94 #ifndef DRIVERLIB_GENERATE_ROM
95 #define PowerCtrlStateSet NOROM_PowerCtrlStateSet
96 #define PowerCtrlSourceSet NOROM_PowerCtrlSourceSet
104 #define PWRCTRL_ACTIVE 0x00000001
105 #define PWRCTRL_STANDBY 0x00000002
106 #define PWRCTRL_POWER_DOWN 0x00000004
107 #define PWRCTRL_SHUTDOWN 0x00000008
114 #define PWRCTRL_IOSEG3_ENABLE 0x00000800
115 #define PWRCTRL_IOSEG2_ENABLE 0x00000400
116 #define PWRCTRL_IOSEG3_DISABLE 0x00000200
117 #define PWRCTRL_IOSEG2_DISABLE 0x00000100
118 #define PWRCTRL_PWRSRC_DCDC 0x00000001
119 #define PWRCTRL_PWRSRC_GLDO 0x00000000
120 #define PWRCTRL_PWRSRC_ULDO 0x00000002
127 #define PWRCTRL_RST_POWER_ON 0x00000000 // Reset by power on
128 #define PWRCTRL_RST_PIN 0x00000001 // Pin reset
129 #define PWRCTRL_RST_VDDS_BOD 0x00000002 // VDDS Brown Out Detect
130 #define PWRCTRL_RST_VDD_BOD 0x00000003 // VDD Brown Out Detect
131 #define PWRCTRL_RST_VDDR_BOD 0x00000004 // VDDR Brown Out Detect
132 #define PWRCTRL_RST_CLK_LOSS 0x00000005 // Clock loss Reset
133 #define PWRCTRL_RST_SW_PIN 0x00000006 // Clock loss Reset
134 #define PWRCTRL_RST_WARM 0x00000007 // Warm Reset
212 __STATIC_INLINE uint32_t
215 uint32_t ui32PowerConfig;
278 __STATIC_INLINE uint32_t
343 #ifndef DRIVERLIB_NOROM
345 #ifdef ROM_PowerCtrlStateSet
346 #undef PowerCtrlStateSet
347 #define PowerCtrlStateSet ROM_PowerCtrlStateSet
349 #ifdef ROM_PowerCtrlSourceSet
350 #undef PowerCtrlSourceSet
351 #define PowerCtrlSourceSet ROM_PowerCtrlSourceSet
364 #endif // __PWR_CTRL_H__
__STATIC_INLINE uint32_t PowerCtrlResetSourceGet(void)
Get the last known reset source of the system.
void PowerCtrlSourceSet(uint32_t ui32PowerConfig)
Set (Request) the main power source.
__STATIC_INLINE void AONIOCFreezeEnable(void)
Freeze the IOs.
#define PWRCTRL_IOSEG3_ENABLE
__STATIC_INLINE void AONIOCFreezeDisable(void)
Un-freeze the IOs.
#define PWRCTRL_IOSEG3_DISABLE
__STATIC_INLINE uint32_t PowerCtrlSourceGet(void)
Get the main power source.
__STATIC_INLINE void PowerCtrlIOFreezeDisable(void)
__STATIC_INLINE void PowerCtrlIOFreezeEnable(void)
Close the latches in the AON IOC interface and in padring.
#define PWRCTRL_PWRSRC_GLDO
void PowerCtrlStateSet(uint32_t ui32Powerstate)
Force the system into low power modes.
__STATIC_INLINE void PowerCtrlIoConfigSet(uint32_t ui32IoConfig)
Configure the IO ring.
#define PWRCTRL_IOSEG2_ENABLE
#define PWRCTRL_IOSEG2_DISABLE
#define PWRCTRL_PWRSRC_DCDC