1ae8c8068SEtienne Carriere /* SPDX-License-Identifier: BSD-3-Clause */ 2ae8c8068SEtienne Carriere /* 3ae8c8068SEtienne Carriere * Copyright (c) 2015-2019, Arm Limited and Contributors. All rights reserved. 4659a1f88SEtienne Carriere * Copyright (c) 2019-2021, Linaro Limited 5ae8c8068SEtienne Carriere */ 6ae8c8068SEtienne Carriere 7ae8c8068SEtienne Carriere #ifndef SCMI_MSG_H 8ae8c8068SEtienne Carriere #define SCMI_MSG_H 9ae8c8068SEtienne Carriere 10ae8c8068SEtienne Carriere #include <compiler.h> 11ae8c8068SEtienne Carriere #include <kernel/panic.h> 12ae8c8068SEtienne Carriere #include <mm/core_memprot.h> 13ae8c8068SEtienne Carriere #include <stdbool.h> 14ae8c8068SEtienne Carriere #include <stddef.h> 15ae8c8068SEtienne Carriere #include <stdint.h> 16ae8c8068SEtienne Carriere 17ae8c8068SEtienne Carriere /* Minimum size expected for SMT based shared memory message buffers */ 18*b4bfc9a9SJens Wiklander #define SMT_BUF_SLOT_SIZE U(128) 19ae8c8068SEtienne Carriere 20c22983c9SEtienne Carriere /* Standard values for SCMI voltage domain protocol configuration state */ 21*b4bfc9a9SJens Wiklander #define SCMI_VOLTAGE_DOMAIN_CONFIG_ARCH_ON U(0x7) 22*b4bfc9a9SJens Wiklander #define SCMI_VOLTAGE_DOMAIN_CONFIG_ARCH_OFF U(0) 23c22983c9SEtienne Carriere 24ae8c8068SEtienne Carriere /* A channel abstract a communication path between agent and server */ 25ae8c8068SEtienne Carriere struct scmi_msg_channel; 26ae8c8068SEtienne Carriere 27ae8c8068SEtienne Carriere /* 28ae8c8068SEtienne Carriere * struct scmi_msg_channel - Shared memory buffer for a agent-to-server channel 29ae8c8068SEtienne Carriere * 30ae8c8068SEtienne Carriere * @shm_addr: Address of the shared memory for the SCMI channel 31ae8c8068SEtienne Carriere * @shm_size: Byte size of the shared memory for the SCMI channel 32ae8c8068SEtienne Carriere * @busy: True when channel is busy, flase when channel is free 33ae8c8068SEtienne Carriere * @threaded: True is executed in a threaded context, false otherwise 34ae8c8068SEtienne Carriere */ 35ae8c8068SEtienne Carriere struct scmi_msg_channel { 36ae8c8068SEtienne Carriere struct io_pa_va shm_addr; 37ae8c8068SEtienne Carriere size_t shm_size; 38ae8c8068SEtienne Carriere bool busy; 39ae8c8068SEtienne Carriere bool threaded; 40ae8c8068SEtienne Carriere }; 41ae8c8068SEtienne Carriere 429ed56ecdSEtienne Carriere #ifdef CFG_SCMI_MSG_SMT 43a58c4d70SEtienne Carriere /* 44a58c4d70SEtienne Carriere * Initialize SMT memory buffer, called by platform at init for each 45a58c4d70SEtienne Carriere * agent channel using the SMT header format. 46a58c4d70SEtienne Carriere * This function depends on CFG_SCMI_MSG_SMT. 47a58c4d70SEtienne Carriere * 48a58c4d70SEtienne Carriere * @chan: Pointer to the channel shared memory to be initialized 49a58c4d70SEtienne Carriere */ 509ed56ecdSEtienne Carriere void scmi_smt_init_agent_channel(struct scmi_msg_channel *channel); 5148f04743SEtienne Carriere 5248f04743SEtienne Carriere /* 5348f04743SEtienne Carriere * Set SMT shared buffer location 5448f04743SEtienne Carriere * 5548f04743SEtienne Carriere * @channel: SCMI channel reference 5648f04743SEtienne Carriere * @base: virtual address of the shared buffer or NULL to clear the reference 5748f04743SEtienne Carriere */ 5848f04743SEtienne Carriere void scmi_smt_set_shared_buffer(struct scmi_msg_channel *channel, void *base); 599ed56ecdSEtienne Carriere #else 609ed56ecdSEtienne Carriere static inline 619ed56ecdSEtienne Carriere void scmi_smt_init_agent_channel(struct scmi_msg_channel *channel __unused) 629ed56ecdSEtienne Carriere { 639ed56ecdSEtienne Carriere panic(); 649ed56ecdSEtienne Carriere } 6548f04743SEtienne Carriere 6648f04743SEtienne Carriere static inline 6748f04743SEtienne Carriere void scmi_smt_set_shared_buffer(struct scmi_msg_channel *channel __unused, 6848f04743SEtienne Carriere void *base __unused) 6948f04743SEtienne Carriere { 7048f04743SEtienne Carriere } 7148f04743SEtienne Carriere #endif /* CFG_SCMI_MSG_SMT */ 72a58c4d70SEtienne Carriere 739ed56ecdSEtienne Carriere #ifdef CFG_SCMI_MSG_SMT_FASTCALL_ENTRY 74a58c4d70SEtienne Carriere /* 75064bf8dcSEtienne Carriere * Process SMT formatted message in a fastcall SMC execution context. 76a58c4d70SEtienne Carriere * Called by platform on SMC entry. When returning, output message is 77a58c4d70SEtienne Carriere * available in shared memory for agent to read the response. 78a58c4d70SEtienne Carriere * This function depends on CFG_SCMI_MSG_SMT_FASTCALL_ENTRY. 79a58c4d70SEtienne Carriere * 80659a1f88SEtienne Carriere * @channel_id: SCMI channel ID the SMT belongs to 81a58c4d70SEtienne Carriere */ 82659a1f88SEtienne Carriere void scmi_smt_fastcall_smc_entry(unsigned int channel_id); 839ed56ecdSEtienne Carriere #else 849ed56ecdSEtienne Carriere static inline void scmi_smt_fastcall_smc_entry(unsigned int channel_id __unused) 859ed56ecdSEtienne Carriere { 869ed56ecdSEtienne Carriere } 879ed56ecdSEtienne Carriere #endif 88a58c4d70SEtienne Carriere 899ed56ecdSEtienne Carriere #ifdef CFG_SCMI_MSG_SMT_INTERRUPT_ENTRY 90a58c4d70SEtienne Carriere /* 91a58c4d70SEtienne Carriere * Process SMT formatted message in a secure interrupt execution context. 92a58c4d70SEtienne Carriere * Called by platform interrupt handler. When returning, output message is 93a58c4d70SEtienne Carriere * available in shared memory for agent to read the response. 94a58c4d70SEtienne Carriere * This function depends on CFG_SCMI_MSG_SMT_INTERRUPT_ENTRY. 95a58c4d70SEtienne Carriere * 96659a1f88SEtienne Carriere * @channel_id: SCMI channel ID the SMT belongs to 97a58c4d70SEtienne Carriere */ 98659a1f88SEtienne Carriere void scmi_smt_interrupt_entry(unsigned int channel_id); 999ed56ecdSEtienne Carriere #else 1009ed56ecdSEtienne Carriere static inline void scmi_smt_interrupt_entry(unsigned int channel_id __unused) 1019ed56ecdSEtienne Carriere { 1029ed56ecdSEtienne Carriere } 1039ed56ecdSEtienne Carriere #endif 104a58c4d70SEtienne Carriere 1059ed56ecdSEtienne Carriere #ifdef CFG_SCMI_MSG_SMT_THREAD_ENTRY 106a58c4d70SEtienne Carriere /* 107a58c4d70SEtienne Carriere * Process SMT formatted message in a TEE thread execution context. 108a58c4d70SEtienne Carriere * When returning, output message is available in shared memory for 109a58c4d70SEtienne Carriere * agent to read the response. 110a58c4d70SEtienne Carriere * This function depends on CFG_SCMI_MSG_SMT_THREAD_ENTRY. 111a58c4d70SEtienne Carriere * 112659a1f88SEtienne Carriere * @channel_id: SCMI channel ID the SMT belongs to 113a58c4d70SEtienne Carriere */ 114659a1f88SEtienne Carriere void scmi_smt_threaded_entry(unsigned int channel_id); 1159ed56ecdSEtienne Carriere #else 1169ed56ecdSEtienne Carriere static inline void scmi_smt_threaded_entry(unsigned int channel_id __unused) 1179ed56ecdSEtienne Carriere { 1189ed56ecdSEtienne Carriere } 1199ed56ecdSEtienne Carriere #endif 120a58c4d70SEtienne Carriere 121ae8c8068SEtienne Carriere /* Platform callback functions */ 122ae8c8068SEtienne Carriere 123ae8c8068SEtienne Carriere /* 124ae8c8068SEtienne Carriere * Return the SCMI channel related to an agent 125659a1f88SEtienne Carriere * @channel_id: SCMI channel ID 126ae8c8068SEtienne Carriere * Return a pointer to channel on success, NULL otherwise 127ae8c8068SEtienne Carriere */ 128659a1f88SEtienne Carriere struct scmi_msg_channel *plat_scmi_get_channel(unsigned int channel_id); 129ae8c8068SEtienne Carriere 1303e530666SEtienne Carriere /* Scmi-msg uses the channel ID as handle. Must channel_id is valid */ 1313e530666SEtienne Carriere static inline unsigned int scmi_smt_channel_handle(unsigned int channel_id) 1323e530666SEtienne Carriere { 1333e530666SEtienne Carriere assert(plat_scmi_get_channel(channel_id)); 1343e530666SEtienne Carriere 1353e530666SEtienne Carriere return channel_id; 1363e530666SEtienne Carriere } 1373e530666SEtienne Carriere 138ae8c8068SEtienne Carriere /* 139ae8c8068SEtienne Carriere * Return how many SCMI protocols supported by the platform 140ae8c8068SEtienne Carriere * According to the SCMI specification, this function does not target 141659a1f88SEtienne Carriere * a specific channel ID and shall return all platform known capabilities. 142ae8c8068SEtienne Carriere */ 143ae8c8068SEtienne Carriere size_t plat_scmi_protocol_count(void); 144ae8c8068SEtienne Carriere 145ae8c8068SEtienne Carriere /* 146ae8c8068SEtienne Carriere * Get the count and list of SCMI protocols (but base) supported for an agent 147ae8c8068SEtienne Carriere * 148659a1f88SEtienne Carriere * @channel_id: SCMI channel ID 149ae8c8068SEtienne Carriere * Return a pointer to a null terminated array supported protocol IDs. 150ae8c8068SEtienne Carriere */ 151659a1f88SEtienne Carriere const uint8_t *plat_scmi_protocol_list(unsigned int channel_id); 152ae8c8068SEtienne Carriere 153ae8c8068SEtienne Carriere /* Get the name of the SCMI vendor for the platform */ 154ae8c8068SEtienne Carriere const char *plat_scmi_vendor_name(void); 155ae8c8068SEtienne Carriere 156ae8c8068SEtienne Carriere /* Get the name of the SCMI sub-vendor for the platform */ 157ae8c8068SEtienne Carriere const char *plat_scmi_sub_vendor_name(void); 158ae8c8068SEtienne Carriere 159a7a9e3baSEtienne Carriere /* Handlers for SCMI Clock protocol services */ 160a7a9e3baSEtienne Carriere 161a7a9e3baSEtienne Carriere /* 162a7a9e3baSEtienne Carriere * Return number of clock controllers for an agent 163659a1f88SEtienne Carriere * @channel_id: SCMI channel ID 164a7a9e3baSEtienne Carriere * Return number of clock controllers 165a7a9e3baSEtienne Carriere */ 166659a1f88SEtienne Carriere size_t plat_scmi_clock_count(unsigned int channel_id); 167a7a9e3baSEtienne Carriere 168a7a9e3baSEtienne Carriere /* 169a7a9e3baSEtienne Carriere * Get clock controller string ID (aka name) 170659a1f88SEtienne Carriere * @channel_id: SCMI channel ID 171a7a9e3baSEtienne Carriere * @scmi_id: SCMI clock ID 172a7a9e3baSEtienne Carriere * Return pointer to name or NULL 173a7a9e3baSEtienne Carriere */ 174659a1f88SEtienne Carriere const char *plat_scmi_clock_get_name(unsigned int channel_id, 175a7a9e3baSEtienne Carriere unsigned int scmi_id); 176a7a9e3baSEtienne Carriere 177a7a9e3baSEtienne Carriere /* 178a7a9e3baSEtienne Carriere * Get clock possible rate as an array of frequencies in Hertz. 179a7a9e3baSEtienne Carriere * 180659a1f88SEtienne Carriere * @channel_id: SCMI channel ID 181a7a9e3baSEtienne Carriere * @scmi_id: SCMI clock ID 182d9be1b35SEtienne Carriere * @start_index: Requested start index for the exposed rates array 183ec8c2914SEtienne Carriere * @rates: If NULL, function returns, else output rates array 184a7a9e3baSEtienne Carriere * @nb_elts: Array size of @rates. 185a7a9e3baSEtienne Carriere * Return an SCMI compliant error code 186a7a9e3baSEtienne Carriere */ 187659a1f88SEtienne Carriere int32_t plat_scmi_clock_rates_array(unsigned int channel_id, 188659a1f88SEtienne Carriere unsigned int scmi_id, size_t start_index, 189659a1f88SEtienne Carriere unsigned long *rates, size_t *nb_elts); 190a7a9e3baSEtienne Carriere 191a7a9e3baSEtienne Carriere /* 192a7a9e3baSEtienne Carriere * Get clock possible rate as range with regular steps in Hertz 193a7a9e3baSEtienne Carriere * 194659a1f88SEtienne Carriere * @channel_id: SCMI channel ID 195a7a9e3baSEtienne Carriere * @scmi_id: SCMI clock ID 196a7a9e3baSEtienne Carriere * @min_max_step: 3 cell array for min, max and step rate data 197a7a9e3baSEtienne Carriere * Return an SCMI compliant error code 198a7a9e3baSEtienne Carriere */ 199659a1f88SEtienne Carriere int32_t plat_scmi_clock_rates_by_step(unsigned int channel_id, 200a7a9e3baSEtienne Carriere unsigned int scmi_id, 201a7a9e3baSEtienne Carriere unsigned long *min_max_step); 202a7a9e3baSEtienne Carriere 203a7a9e3baSEtienne Carriere /* 204a7a9e3baSEtienne Carriere * Get clock rate in Hertz 205659a1f88SEtienne Carriere * @channel_id: SCMI channel ID 206a7a9e3baSEtienne Carriere * @scmi_id: SCMI clock ID 207a7a9e3baSEtienne Carriere * Return clock rate or 0 if not supported 208a7a9e3baSEtienne Carriere */ 209659a1f88SEtienne Carriere unsigned long plat_scmi_clock_get_rate(unsigned int channel_id, 210a7a9e3baSEtienne Carriere unsigned int scmi_id); 211a7a9e3baSEtienne Carriere 212a7a9e3baSEtienne Carriere /* 213a7a9e3baSEtienne Carriere * Set clock rate in Hertz 214659a1f88SEtienne Carriere * @channel_id: SCMI channel ID 215a7a9e3baSEtienne Carriere * @scmi_id: SCMI clock ID 216a7a9e3baSEtienne Carriere * @rate: Target clock frequency in Hertz 217a7a9e3baSEtienne Carriere * Return a compliant SCMI error code 218a7a9e3baSEtienne Carriere */ 219659a1f88SEtienne Carriere int32_t plat_scmi_clock_set_rate(unsigned int channel_id, unsigned int scmi_id, 220a7a9e3baSEtienne Carriere unsigned long rate); 221a7a9e3baSEtienne Carriere 222a7a9e3baSEtienne Carriere /* 223a7a9e3baSEtienne Carriere * Get clock state (enabled or disabled) 224659a1f88SEtienne Carriere * @channel_id: SCMI channel ID 225a7a9e3baSEtienne Carriere * @scmi_id: SCMI clock ID 226a7a9e3baSEtienne Carriere * Return 1 if clock is enabled, 0 if disables, or a negative SCMI error code 227a7a9e3baSEtienne Carriere */ 228659a1f88SEtienne Carriere int32_t plat_scmi_clock_get_state(unsigned int channel_id, 229659a1f88SEtienne Carriere unsigned int scmi_id); 230a7a9e3baSEtienne Carriere 231a7a9e3baSEtienne Carriere /* 232a7a9e3baSEtienne Carriere * Get clock state (enabled or disabled) 233659a1f88SEtienne Carriere * @channel_id: SCMI channel ID 234a7a9e3baSEtienne Carriere * @scmi_id: SCMI clock ID 235a7a9e3baSEtienne Carriere * @enable_not_disable: Enable clock if true, disable clock otherwise 236a7a9e3baSEtienne Carriere * Return a compliant SCMI error code 237a7a9e3baSEtienne Carriere */ 238659a1f88SEtienne Carriere int32_t plat_scmi_clock_set_state(unsigned int channel_id, unsigned int scmi_id, 239a7a9e3baSEtienne Carriere bool enable_not_disable); 24056a1f10eSEtienne Carriere 24156a1f10eSEtienne Carriere /* Handlers for SCMI Reset Domain protocol services */ 24256a1f10eSEtienne Carriere 24356a1f10eSEtienne Carriere /* 24456a1f10eSEtienne Carriere * Return number of reset domains for the agent 245659a1f88SEtienne Carriere * @channel_id: SCMI channel ID 24656a1f10eSEtienne Carriere * Return number of reset domains 24756a1f10eSEtienne Carriere */ 248659a1f88SEtienne Carriere size_t plat_scmi_rd_count(unsigned int channel_id); 24956a1f10eSEtienne Carriere 25056a1f10eSEtienne Carriere /* 25156a1f10eSEtienne Carriere * Get reset domain string ID (aka name) 252659a1f88SEtienne Carriere * @channel_id: SCMI channel ID 25356a1f10eSEtienne Carriere * @scmi_id: SCMI reset domain ID 25456a1f10eSEtienne Carriere * Return pointer to name or NULL 25556a1f10eSEtienne Carriere */ 256659a1f88SEtienne Carriere const char *plat_scmi_rd_get_name(unsigned int channel_id, 257659a1f88SEtienne Carriere unsigned int scmi_id); 25856a1f10eSEtienne Carriere 25956a1f10eSEtienne Carriere /* 26056a1f10eSEtienne Carriere * Perform a reset cycle on a target reset domain 261659a1f88SEtienne Carriere * @channel_id: SCMI channel ID 26256a1f10eSEtienne Carriere * @scmi_id: SCMI reset domain ID 26356a1f10eSEtienne Carriere * @state: Target reset state (see SCMI specification, 0 means context loss) 26456a1f10eSEtienne Carriere * Return a compliant SCMI error code 26556a1f10eSEtienne Carriere */ 266659a1f88SEtienne Carriere int32_t plat_scmi_rd_autonomous(unsigned int channel_id, unsigned int scmi_id, 26756a1f10eSEtienne Carriere unsigned int state); 26856a1f10eSEtienne Carriere 26956a1f10eSEtienne Carriere /* 27056a1f10eSEtienne Carriere * Assert or deassert target reset domain 271659a1f88SEtienne Carriere * @channel_id: SCMI channel ID 27256a1f10eSEtienne Carriere * @scmi_id: SCMI reset domain ID 27356a1f10eSEtienne Carriere * @assert_not_deassert: Assert domain if true, otherwise deassert domain 27456a1f10eSEtienne Carriere * Return a compliant SCMI error code 27556a1f10eSEtienne Carriere */ 276659a1f88SEtienne Carriere int32_t plat_scmi_rd_set_state(unsigned int channel_id, unsigned int scmi_id, 27756a1f10eSEtienne Carriere bool assert_not_deassert); 27856a1f10eSEtienne Carriere 279006d89b8SEtienne Carriere /* Handlers for SCMI Voltage Domain protocol services */ 280006d89b8SEtienne Carriere 281006d89b8SEtienne Carriere /* 282006d89b8SEtienne Carriere * Return number of voltage domain for an agent 283659a1f88SEtienne Carriere * @channel_id: SCMI channel ID 284006d89b8SEtienne Carriere * Return number of voltage domains 285006d89b8SEtienne Carriere */ 286659a1f88SEtienne Carriere size_t plat_scmi_voltd_count(unsigned int channel_id); 287006d89b8SEtienne Carriere 288006d89b8SEtienne Carriere /* 289006d89b8SEtienne Carriere * Get clock controller string ID (aka name) 290659a1f88SEtienne Carriere * @channel_id: SCMI channel ID 291006d89b8SEtienne Carriere * @scmi_id: SCMI voltage domain ID 292006d89b8SEtienne Carriere * Return pointer to name or NULL 293006d89b8SEtienne Carriere */ 294659a1f88SEtienne Carriere const char *plat_scmi_voltd_get_name(unsigned int channel_id, 295006d89b8SEtienne Carriere unsigned int scmi_id); 296006d89b8SEtienne Carriere 297006d89b8SEtienne Carriere /* 298006d89b8SEtienne Carriere * Get voltage domain possible levels as an array of voltages in microvolt. 299006d89b8SEtienne Carriere * 300659a1f88SEtienne Carriere * @channel_id: SCMI channel ID 301006d89b8SEtienne Carriere * @scmi_id: SCMI voltage domain ID 302006d89b8SEtienne Carriere * @start_index: Level index to start from. 303ec8c2914SEtienne Carriere * @levels: If NULL, function returns, else output rates array 304006d89b8SEtienne Carriere * @nb_elts: Array size of @levels. 305006d89b8SEtienne Carriere * Return an SCMI compliant error code 306006d89b8SEtienne Carriere */ 307659a1f88SEtienne Carriere int32_t plat_scmi_voltd_levels_array(unsigned int channel_id, 308006d89b8SEtienne Carriere unsigned int scmi_id, size_t start_index, 309006d89b8SEtienne Carriere long *levels, size_t *nb_elts); 310006d89b8SEtienne Carriere 311006d89b8SEtienne Carriere /* 312006d89b8SEtienne Carriere * Get voltage domain possible levels as range with regular steps in microvolt 313006d89b8SEtienne Carriere * 314659a1f88SEtienne Carriere * @channel_id: SCMI channel ID 315006d89b8SEtienne Carriere * @scmi_id: SCMI voltage domain ID 316006d89b8SEtienne Carriere * @min_max_step: 3 cell array for min, max and step voltage data 317006d89b8SEtienne Carriere * Return an SCMI compliant error code 318006d89b8SEtienne Carriere */ 319659a1f88SEtienne Carriere int32_t plat_scmi_voltd_levels_by_step(unsigned int channel_id, 320006d89b8SEtienne Carriere unsigned int scmi_id, 321006d89b8SEtienne Carriere long *min_max_step); 322006d89b8SEtienne Carriere 323006d89b8SEtienne Carriere /* 324006d89b8SEtienne Carriere * Get current voltage domain level in microvolt 325659a1f88SEtienne Carriere * @channel_id: SCMI channel ID 326006d89b8SEtienne Carriere * @scmi_id: SCMI voltage domain ID 327006d89b8SEtienne Carriere * Return clock rate or 0 if not supported 328006d89b8SEtienne Carriere */ 329659a1f88SEtienne Carriere long plat_scmi_voltd_get_level(unsigned int channel_id, unsigned int scmi_id); 330006d89b8SEtienne Carriere 331006d89b8SEtienne Carriere /* 332006d89b8SEtienne Carriere * Set voltage domain level voltage domain 333659a1f88SEtienne Carriere * @channel_id: SCMI channel ID 334006d89b8SEtienne Carriere * @scmi_id: SCMI clock ID 335006d89b8SEtienne Carriere * @level: Target voltage domain level in microvolt 336006d89b8SEtienne Carriere * Return a compliant SCMI error code 337006d89b8SEtienne Carriere */ 338659a1f88SEtienne Carriere int32_t plat_scmi_voltd_set_level(unsigned int channel_id, unsigned int scmi_id, 339006d89b8SEtienne Carriere long level); 340006d89b8SEtienne Carriere 341006d89b8SEtienne Carriere /* 342006d89b8SEtienne Carriere * Get voltage domain state configuration (enabled or disabled) 343659a1f88SEtienne Carriere * @channel_id: SCMI channel ID 344006d89b8SEtienne Carriere * @scmi_id: SCMI voltage domain ID 345ec8c2914SEtienne Carriere * @config: output state configuration value SCMI_VOLTAGE_DOMAIN_CONFIG_* 346006d89b8SEtienne Carriere * Return a compliant SCMI error code 347006d89b8SEtienne Carriere */ 348659a1f88SEtienne Carriere int32_t plat_scmi_voltd_get_config(unsigned int channel_id, 349659a1f88SEtienne Carriere unsigned int scmi_id, uint32_t *config); 350006d89b8SEtienne Carriere 351006d89b8SEtienne Carriere /* 352006d89b8SEtienne Carriere * Get voltage domain state configuration (enabled or disabled) 353659a1f88SEtienne Carriere * @channel_id: SCMI channel ID 354ec8c2914SEtienne Carriere * @scmi_id: SCMI voltage domain ID 355ec8c2914SEtienne Carriere * @config: Target state configuration value SCMI_VOLTAGE_DOMAIN_CONFIG_* 356006d89b8SEtienne Carriere * Return a compliant SCMI error code 357006d89b8SEtienne Carriere */ 358659a1f88SEtienne Carriere int32_t plat_scmi_voltd_set_config(unsigned int channel_id, 359659a1f88SEtienne Carriere unsigned int scmi_id, uint32_t config); 360006d89b8SEtienne Carriere 361ae8c8068SEtienne Carriere #endif /* SCMI_MSG_H */ 362