The IOCTL_PREPARE_DDR_SHUTDOWN operation (IOCTL ID 37) places the DDR
memory controller into self-refresh mode in preparation for a controlled power-off
sequence. This ensures compliance with the JEDEC LPDDR SDRAM specification, which limits
uncontrolled power-off sequences to a maximum of 400 occurrences over the life of the
device.
The calling subsystem must hold exclusive access to the DDR device
(PM_DEV_DDR_0) before issuing this IOCTL. Exclusive access is
obtained by calling XPm_RequestNode with PM_DEV_DDR_0.
If the subsystem does not hold exclusive access, the IOCTL returns
XPM_ERR_DEVICE_STATUS.
On success, the DDR device transitions to the RUNTIME_SUSPEND state and
the DDRMC enters self-refresh mode.
This IOCTL is intended for use cases such as kexec or warm reboot where DDR must be placed into self-refresh outside of the standard Suspend-to-RAM flow. During a normal Suspend-to-RAM sequence, the PLM manages DDR self-refresh automatically.