linux/include/linux/firmware/imx/svc/misc.h

/* SPDX-License-Identifier: GPL-2.0+ */
/*
 * Copyright (C) 2016 Freescale Semiconductor, Inc.
 * Copyright 2017~2018 NXP
 *
 * Header file containing the public API for the System Controller (SC)
 * Miscellaneous (MISC) function.
 *
 * MISC_SVC (SVC) Miscellaneous Service
 *
 * Module for the Miscellaneous (MISC) service.
 */

#ifndef _SC_MISC_API_H
#define _SC_MISC_API_H

#include <linux/firmware/imx/sci.h>

/*
 * This type is used to indicate RPC MISC function calls.
 */
enum imx_misc_func {};

/*
 * Control Functions
 */

#ifdef CONFIG_IMX_SCU
int imx_sc_misc_set_control(struct imx_sc_ipc *ipc, u32 resource,
			    u8 ctrl, u32 val);

int imx_sc_misc_get_control(struct imx_sc_ipc *ipc, u32 resource,
			    u8 ctrl, u32 *val);

int imx_sc_pm_cpu_start(struct imx_sc_ipc *ipc, u32 resource,
			bool enable, u64 phys_addr);
#else
static inline int imx_sc_misc_set_control(struct imx_sc_ipc *ipc,
					  u32 resource, u8 ctrl, u32 val)
{
	return -ENOTSUPP;
}

static inline int imx_sc_misc_get_control(struct imx_sc_ipc *ipc,
					  u32 resource, u8 ctrl, u32 *val)
{
	return -ENOTSUPP;
}

static inline int imx_sc_pm_cpu_start(struct imx_sc_ipc *ipc, u32 resource,
				      bool enable, u64 phys_addr)
{
	return -ENOTSUPP;
}
#endif
#endif /* _SC_MISC_API_H */