lib/sw_apps/zynqmp_pmufw/src/pm_hooks.c
s32 PmHookPosSaveDdrContext(void)
{
	s32 status;
	u32 srDataStart = (u32)&__srdata_start;
	u32 srDataEnd = (u32)&__srdata_end;

	/* Initialize hardware required for QSPI operation */
	status = PmQspiHWInit();
	if (XST_SUCCESS != status) {
		goto done;
	}

	/* Initialize QSPI driver */
	status = PmQspiInit();
	if (XST_SUCCESS != status) {
		goto done;
	}

	/* Save data to QSPI */
	status = PmQspiWrite((u8*)srDataStart, srDataEnd - srDataStart);
	if (XST_SUCCESS != status) {
		goto done;
	}

done:
	return status;
}
/**
 * PmHookPosSaveDdrContext() - User hook for saving context required for taking
 * 			       DDR out of self refresh after resume from Power
 * 			       Off Suspend
 *
 * @return	XST_SUCCESS if context is saved, failure code otherwise
 */
User hook for saving context required for taking
DDR out of self refresh after resume from Power
Off Suspend

@return      XST_SUCCESS if context is saved, failure code otherwise
User hook for saving context required for taking DDR out of self refresh after resume from Power Off Suspend @return XST_SUCCESS if context is saved failure code otherwise
s32 PmHookPosSaveDdrContext(void)
{
	s32 status;
	u32 srDataStart = (u32)&__srdata_start;
	u32 srDataEnd = (u32)&__srdata_end;
	status = PmQspiHWInit();
	if (XST_SUCCESS != status) {
		goto done;
	}
	status = PmQspiInit();
	if (XST_SUCCESS != status) {
		goto done;
	}
	status = PmQspiWrite((u8*)srDataStart, srDataEnd - srDataStart);
	if (XST_SUCCESS != status) {
		goto done;
	}
done:
	return status;
}
s32 PmHookPosSaveDdrContext ( void ) { s32 status ; u32 srDataStart = ( u32 ) & __srdata_start ; u32 srDataEnd = ( u32 ) & __srdata_end ; status = PmQspiHWInit ( ) ; if ( XST_SUCCESS != status ) { goto done ; } status = PmQspiInit ( ) ; if ( XST_SUCCESS != status ) { goto done ; } status = PmQspiWrite ( ( u8 * ) srDataStart , srDataEnd - srDataStart ) ; if ( XST_SUCCESS != status ) { goto done ; } done : return status ; }
PmHookPosSaveDdrContext() - User hook for saving context required for taking
                             DDR out of self refresh after resume from Power
                             Off Suspend
PmHookPosSaveDdrContext () - User hook for saving context required for taking DDR out of self refresh after resume from Power Off Suspend
/* Initialize hardware required for QSPI operation */ /* Initialize QSPI driver */ /* Save data to QSPI */