return ret;
}
+/**
+ * pm_ioctl_set_boot_health_status() - Ioctl for setting healthy boot status
+ *
+ * This function sets healthy bit value to indicate boot health status
+ * to firmware.
+ *
+ * @return Returns status, either success or error+reason
+ */
+static enum pm_ret_status pm_ioctl_set_boot_health_status(unsigned int value)
+{
+ return pm_mmio_write(PM_BOOT_HEALTH_STATUS_REG,
+ PM_BOOT_HEALTH_STATUS_MASK, value);
+}
+
/**
* pm_api_ioctl() - PM IOCTL API for device control and configs
* @node_id Node ID of the device
case IOCTL_ULPI_RESET:
ret = pm_ioctl_ulpi_reset();
break;
+ case IOCTL_SET_BOOT_HEALTH_STATUS:
+ ret = pm_ioctl_set_boot_health_status(arg1);
+ break;
default:
ret = PM_RET_ERROR_NOTSUPPORTED;
break;
#define PGGS_BASEADDR (0xFFD80050U)
#define PGGS_NUM_REGS U(4)
+/* Warm restart boot health status register and mask */
+#define PM_BOOT_HEALTH_STATUS_REG (GGS_BASEADDR + U(0x10))
+#define PM_BOOT_HEALTH_STATUS_MASK U(0x01)
+
#endif /* __ZYNQMP_DEF_H__ */