Lines Matching +full:device +full:- +full:handle
1 /* SPDX-License-Identifier: GPL-2.0+ */
6 * Copyright (C) 2018 Texas Instruments Incorporated - http://www.ti.com/
15 * struct ti_sci_version_info - version information structure
33 * struct ti_sci_board_ops - Board config operations
50 int (*board_config)(const struct ti_sci_handle *handle,
52 int (*board_config_rm)(const struct ti_sci_handle *handle,
54 int (*board_config_security)(const struct ti_sci_handle *handle,
56 int (*board_config_pm)(const struct ti_sci_handle *handle,
61 * struct ti_sci_dev_ops - Device control operations
62 * @get_device: Command to request for device managed by TISCI
65 * @idle_device: Command to idle a device managed by TISCI
68 * @put_device: Command to release a device managed by TISCI
71 * @is_valid: Check if the device ID is a valid ID.
73 * @get_context_loss_count: Command to retrieve context loss counter - this
74 * increments every time the device looses context. Overflow
76 * - count: pointer to u32 which will retrieve counter
79 * @is_idle: Reports back about device idle state
80 * - req_state: Returns requested idle state
84 * @is_stop: Reports back about device stop state
85 * - req_state: Returns requested stop state
86 * - current_state: Returns current stop state
90 * @is_on: Reports back about device ON(or active) state
91 * - req_state: Returns requested ON state
92 * - current_state: Returns current ON state
96 * @is_transitioning: Reports back if the device is in the middle of transition
98 * -current_state: Returns 'true' if currently transitioning.
99 * @set_device_resets: Command to configure resets for device managed by TISCI.
100 * -reset_state: Device specific reset bit field
103 * @get_device_resets: Command to read state of resets for device managed
105 * -reset_state: pointer to u32 which will retrieve resets
111 * -handle: Pointer to TISCI handle as retrieved by *ti_sci_get_handle
112 * -id: Device Identifier
114 * Request for the device - NOTE: the client MUST maintain integrity of
119 int (*get_device)(const struct ti_sci_handle *handle, u32 id);
120 int (*idle_device)(const struct ti_sci_handle *handle, u32 id);
121 int (*put_device)(const struct ti_sci_handle *handle, u32 id);
122 int (*is_valid)(const struct ti_sci_handle *handle, u32 id);
123 int (*get_context_loss_count)(const struct ti_sci_handle *handle,
125 int (*is_idle)(const struct ti_sci_handle *handle, u32 id,
127 int (*is_stop)(const struct ti_sci_handle *handle, u32 id,
129 int (*is_on)(const struct ti_sci_handle *handle, u32 id,
131 int (*is_transitioning)(const struct ti_sci_handle *handle, u32 id,
133 int (*set_device_resets)(const struct ti_sci_handle *handle, u32 id,
135 int (*get_device_resets)(const struct ti_sci_handle *handle, u32 id,
140 * struct ti_sci_clk_ops - Clock control operations
142 * - needs_ssc: 'true' if Spread Spectrum clock is desired.
143 * - can_change_freq: 'true' if frequency change is desired.
144 * - enable_input_term: 'true' if input termination is desired.
148 * - req_state: state indicating if the clock is auto managed
150 * - req_state: if the clock is requested to be forced ON
151 * - current_state: if the clock is currently ON
153 * - req_state: if the clock is requested to be forced OFF
154 * - current_state: if the clock is currently Gated
155 * @set_parent: Set the clock source of a specific device clock
156 * - parent_id: Parent clock identifier to set.
157 * @get_parent: Get the current clock source of a specific device clock
158 * - parent_id: Parent clock identifier which is the parent.
160 * - num_parents: returns the number of parent clocks.
163 * - match_freq: Best matching frequency in Hz.
166 * - current_freq: Frequency in Hz that the clock is at.
170 * -handle: Pointer to TISCI handle as retrieved by *ti_sci_get_handle
171 * -did: Device identifier this request is for
172 * -cid: Clock identifier for the device for this request.
173 * Each device has it's own set of clock inputs. This indexes
175 * -min_freq: The minimum allowable frequency in Hz. This is the minimum
178 * -target_freq: The target clock frequency in Hz. A frequency will be
180 * -max_freq: The maximum allowable frequency in Hz. This is the maximum
184 * Request for the clock - NOTE: the client MUST maintain integrity of
189 int (*get_clock)(const struct ti_sci_handle *handle, u32 did, u8 cid,
192 int (*idle_clock)(const struct ti_sci_handle *handle, u32 did, u8 cid);
193 int (*put_clock)(const struct ti_sci_handle *handle, u32 did, u8 cid);
194 int (*is_auto)(const struct ti_sci_handle *handle, u32 did, u8 cid,
196 int (*is_on)(const struct ti_sci_handle *handle, u32 did, u8 cid,
198 int (*is_off)(const struct ti_sci_handle *handle, u32 did, u8 cid,
200 int (*set_parent)(const struct ti_sci_handle *handle, u32 did, u8 cid,
202 int (*get_parent)(const struct ti_sci_handle *handle, u32 did, u8 cid,
204 int (*get_num_parents)(const struct ti_sci_handle *handle, u32 did,
206 int (*get_best_match_freq)(const struct ti_sci_handle *handle, u32 did,
209 int (*set_freq)(const struct ti_sci_handle *handle, u32 did, u8 cid,
211 int (*get_freq)(const struct ti_sci_handle *handle, u32 did, u8 cid,
216 * struct ti_sci_core_ops - SoC Core Operations
222 int (*reboot_device)(const struct ti_sci_handle *handle);
226 * struct ti_sci_proc_ops - Processor specific operations.
240 * -handle: Pointer to TISCI handle as retrieved by *ti_sci_get_handle
241 * -pid: Processor ID
245 int (*proc_request)(const struct ti_sci_handle *handle, u8 pid);
246 int (*proc_release)(const struct ti_sci_handle *handle, u8 pid);
247 int (*proc_handover)(const struct ti_sci_handle *handle, u8 pid,
249 int (*set_proc_boot_cfg)(const struct ti_sci_handle *handle, u8 pid,
251 int (*set_proc_boot_ctrl)(const struct ti_sci_handle *handle, u8 pid,
253 int (*proc_auth_boot_image)(const struct ti_sci_handle *handle, u8 pid,
255 int (*get_proc_boot_status)(const struct ti_sci_handle *handle, u8 pid,
261 * struct ti_sci_ops - Function support for TI SCI
263 * @dev_ops: Device specific operations
277 * struct ti_sci_handle - Handle returned to TI SCI clients for usage.
298 return ERR_PTR(-EINVAL); in ti_sci_get_handle_from_sysfw()
303 return ERR_PTR(-EINVAL); in ti_sci_get_handle()
310 return ERR_PTR(-EINVAL); in ti_sci_get_by_phandle()