soc: qcom: rpmh: drop unused functions
A lot of the features in here are only relevant when running multi-threaded with interrupts. Drop everything except what we need to run single-threaded with a single TCS (which is all the rpmh-rsc framework in U-Boot supports). Keep rpmh_write_async() for simplicity and make it wrap the regular rpmh_write(). Acked-by: Sumit Garg <sumit.garg@linaro.org> Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
This commit is contained in:
@@ -14,34 +14,15 @@
|
||||
int rpmh_write(const struct device *dev, enum rpmh_state state,
|
||||
const struct tcs_cmd *cmd, u32 n);
|
||||
|
||||
int rpmh_write_async(const struct device *dev, enum rpmh_state state,
|
||||
const struct tcs_cmd *cmd, u32 n);
|
||||
|
||||
int rpmh_write_batch(const struct device *dev, enum rpmh_state state,
|
||||
const struct tcs_cmd *cmd, u32 *n);
|
||||
|
||||
void rpmh_invalidate(const struct device *dev);
|
||||
|
||||
#else
|
||||
|
||||
static inline int rpmh_write(const struct device *dev, enum rpmh_state state,
|
||||
const struct tcs_cmd *cmd, u32 n)
|
||||
{ return -ENODEV; }
|
||||
|
||||
static inline int rpmh_write_async(const struct device *dev,
|
||||
enum rpmh_state state,
|
||||
const struct tcs_cmd *cmd, u32 n)
|
||||
{ return -ENODEV; }
|
||||
|
||||
static inline int rpmh_write_batch(const struct device *dev,
|
||||
enum rpmh_state state,
|
||||
const struct tcs_cmd *cmd, u32 *n)
|
||||
{ return -ENODEV; }
|
||||
|
||||
static inline void rpmh_invalidate(const struct device *dev)
|
||||
{
|
||||
}
|
||||
|
||||
#endif /* CONFIG_QCOM_RPMH */
|
||||
|
||||
/* u-boot: no multithreading */
|
||||
#define rpmh_write_async(dev, state, cmd, n) rpmh_write(dev, state, cmd, n)
|
||||
|
||||
#endif /* __SOC_QCOM_RPMH_H__ */
|
||||
|
Reference in New Issue
Block a user