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

/* SPDX-License-Identifier: GPL-2.0+ */
/*
 * Copyright (C) 2016 Freescale Semiconductor, Inc.
 * Copyright 2017-2020 NXP
 *
 * Header file containing the public API for the System Controller (SC)
 * Resource Management (RM) function. This includes functions for
 * partitioning resources, pads, and memory regions.
 *
 * RM_SVC (SVC) Resource Management Service
 *
 * Module for the Resource Management (RM) service.
 */

#ifndef _SC_RM_API_H
#define _SC_RM_API_H

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

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

#if IS_ENABLED(CONFIG_IMX_SCU)
bool imx_sc_rm_is_resource_owned(struct imx_sc_ipc *ipc, u16 resource);
int imx_sc_rm_get_resource_owner(struct imx_sc_ipc *ipc, u16 resource, u8 *pt);
#else
static inline bool
imx_sc_rm_is_resource_owned(struct imx_sc_ipc *ipc, u16 resource)
{
	return true;
}
static inline int imx_sc_rm_get_resource_owner(struct imx_sc_ipc *ipc, u16 resource, u8 *pt)
{
	return -EOPNOTSUPP;
}
#endif
#endif