lib/sw_apps/zynqmp_pmufw/src/pm_hooks.c
void PmHookFinalizePowerOffSuspend(void)
{
	u32 reg, suspendType;

	/* Drive MIO37 high if entering Power Off Suspend state */
	suspendType = PmSystemSuspendType();
	reg = XPfw_Read32(PMU_LOCAL_GPO1_READ);
	if (PM_SUSPEND_TYPE_POWER_OFF == suspendType) {
		reg |= PMU_IOMODULE_GPO1_MIO_5_MASK;
	} else {
		reg &= ~PMU_IOMODULE_GPO1_MIO_5_MASK;
	}
	XPfw_Write32(PMU_IOMODULE_GPO1, reg);

	/* Configure MIO37 to be controlled by the PMU */
	XPfw_RMW32(IOU_SCLR_MIO_PIN_37, 0x000000FEU ,0x00000008U);

	/* Configure MIO37 tri-state enables */
	XPfw_RMW32(IOU_SCLR_MIO_MST_TRI1, 0x00000020U ,0x00000000U);
}
/**
 * PmHookFinalizePowerOffSuspend() - User hook for finishing entry to Power Off
 * 				     Suspend state
 */
User hook for finishing entry to Power Off
Suspend state
User hook for finishing entry to Power Off Suspend state
void PmHookFinalizePowerOffSuspend(void)
{
	u32 reg, suspendType;
	suspendType = PmSystemSuspendType();
	reg = XPfw_Read32(PMU_LOCAL_GPO1_READ);
	if (PM_SUSPEND_TYPE_POWER_OFF == suspendType) {
		reg |= PMU_IOMODULE_GPO1_MIO_5_MASK;
	} else {
		reg &= ~PMU_IOMODULE_GPO1_MIO_5_MASK;
	}
	XPfw_Write32(PMU_IOMODULE_GPO1, reg);
	XPfw_RMW32(IOU_SCLR_MIO_PIN_37, 0x000000FEU ,0x00000008U);
	XPfw_RMW32(IOU_SCLR_MIO_MST_TRI1, 0x00000020U ,0x00000000U);
}
void PmHookFinalizePowerOffSuspend ( void ) { u32 reg , suspendType ; suspendType = PmSystemSuspendType ( ) ; reg = XPfw_Read32 ( PMU_LOCAL_GPO1_READ ) ; if ( PM_SUSPEND_TYPE_POWER_OFF == suspendType ) { reg |= PMU_IOMODULE_GPO1_MIO_5_MASK ; } else { reg &= ~ PMU_IOMODULE_GPO1_MIO_5_MASK ; } XPfw_Write32 ( PMU_IOMODULE_GPO1 , reg ) ; XPfw_RMW32 ( IOU_SCLR_MIO_PIN_37 , 0x000000FEU , 0x00000008U ) ; XPfw_RMW32 ( IOU_SCLR_MIO_MST_TRI1 , 0x00000020U , 0x00000000U ) ; }
PmHookFinalizePowerOffSuspend() - User hook for finishing entry to Power Off
                                   Suspend state
PmHookFinalizePowerOffSuspend () - User hook for finishing entry to Power Off Suspend state
/* Drive MIO37 high if entering Power Off Suspend state */ /* Configure MIO37 to be controlled by the PMU */ /* Configure MIO37 tri-state enables */