/* This function may sleep. Locking for SCU accesses is handled for the caller.  */
int scu_ipc_simple_command(u32 cmd, u32 sub)
/* This function may sleep. Locking for SCU accesses is handled for the caller.  */
int scu_ipc_simple_command(u32 cmd, u32 sub)
{
	struct scu *scu;
	struct udevice *dev;
	int ret;
	ret = syscon_get_by_driver_data(X86_SYSCON_SCU, &dev);
	if (ret)
		return ret;
	scu = dev_get_priv(dev);
	scu_ipc_send_command(scu->regs, sub << 12 | cmd);
	return scu_ipc_check_status(scu->regs);
}