blob: 8a68724d996ad6bbc9cf61d170de2700f84ad991 [file] [log] [blame]
Caleb Connollyceb92622023-09-26 17:12:13 +01001/* SPDX-License-Identifier: GPL-2.0 */
2/*
3 * Copyright (c) 2016-2018, The Linux Foundation. All rights reserved.
4 */
5
6#ifndef __SOC_QCOM_RPMH_H__
7#define __SOC_QCOM_RPMH_H__
8
9#include <linux/types.h>
10#include <linux/errno.h>
11#include <soc/qcom/tcs.h>
12#include <dm/device-internal.h>
13
14
15#if IS_ENABLED(CONFIG_QCOM_RPMH)
16int rpmh_write(const struct udevice *dev, enum rpmh_state state,
17 const struct tcs_cmd *cmd, u32 n);
18
19#else
20
21static inline int rpmh_write(const struct udevice *dev, enum rpmh_state state,
22 const struct tcs_cmd *cmd, u32 n)
23{ return -ENODEV; }
24
25#endif /* CONFIG_QCOM_RPMH */
26
27/* u-boot: no multithreading */
28#define rpmh_write_async(dev, state, cmd, n) rpmh_write(dev, state, cmd, n)
29
30#endif /* __SOC_QCOM_RPMH_H__ */