History

firmware: ti_sci: extend clock identifiers from u8 to u32

Future SoCs are going to have more than 255 device clocks in certain cases, and thus the API must be extended to support this. The support is done in backwards compatible extension, in which the new u32 clock identifier fields are only used if the existing u8 size clock identifier is set as 255. In all the other cases, the existing u8 clock identifier is used. As the size of the messages sent / received is not verified for existing devices / old firmware, increasing the size of the messages from the end is also fine. Due to this reason, depending on ABI version isn't necessary either.

Tero Kristo committed 7 years ago

Commit 81f44581 parent 3f1f22d3 files · +150 −56Browse files

Showing the changes to include/linux (1 of 3 files). Show all

Unified · Split

include/linux/soc/ti/ti_sci_protocol.h+14−14
@@ -166,29 +166,29 @@ struct ti_sci_dev_ops { · 165 unmodified lines
166166 * managed by driver for that purpose.
167167 */
168168 struct ti_sci_clk_ops {
169− int (*get_clock)(const struct ti_sci_handle *handle, u32 did, u8 cid,
169+ int (*get_clock)(const struct ti_sci_handle *handle, u32 did, u32 cid,
170170 bool needs_ssc, bool can_change_freq,
171171 bool enable_input_term);
172− int (*idle_clock)(const struct ti_sci_handle *handle, u32 did, u8 cid);
173− int (*put_clock)(const struct ti_sci_handle *handle, u32 did, u8 cid);
174− int (*is_auto)(const struct ti_sci_handle *handle, u32 did, u8 cid,
172+ int (*idle_clock)(const struct ti_sci_handle *handle, u32 did, u32 cid);
173+ int (*put_clock)(const struct ti_sci_handle *handle, u32 did, u32 cid);
174+ int (*is_auto)(const struct ti_sci_handle *handle, u32 did, u32 cid,
175175 bool *req_state);
176− int (*is_on)(const struct ti_sci_handle *handle, u32 did, u8 cid,
176+ int (*is_on)(const struct ti_sci_handle *handle, u32 did, u32 cid,
177177 bool *req_state, bool *current_state);
178− int (*is_off)(const struct ti_sci_handle *handle, u32 did, u8 cid,
178+ int (*is_off)(const struct ti_sci_handle *handle, u32 did, u32 cid,
179179 bool *req_state, bool *current_state);
180− int (*set_parent)(const struct ti_sci_handle *handle, u32 did, u8 cid,
181− u8 parent_id);
182− int (*get_parent)(const struct ti_sci_handle *handle, u32 did, u8 cid,
183− u8 *parent_id);
180+ int (*set_parent)(const struct ti_sci_handle *handle, u32 did, u32 cid,
181+ u32 parent_id);
182+ int (*get_parent)(const struct ti_sci_handle *handle, u32 did, u32 cid,
183+ u32 *parent_id);
184184 int (*get_num_parents)(const struct ti_sci_handle *handle, u32 did,
185− u8 cid, u8 *num_parents);
185+ u32 cid, u32 *num_parents);
186186 int (*get_best_match_freq)(const struct ti_sci_handle *handle, u32 did,
187− u8 cid, u64 min_freq, u64 target_freq,
187+ u32 cid, u64 min_freq, u64 target_freq,
188188 u64 max_freq, u64 *match_freq);
189− int (*set_freq)(const struct ti_sci_handle *handle, u32 did, u8 cid,
189+ int (*set_freq)(const struct ti_sci_handle *handle, u32 did, u32 cid,
190190 u64 min_freq, u64 target_freq, u64 max_freq);
191− int (*get_freq)(const struct ti_sci_handle *handle, u32 did, u8 cid,
191+ int (*get_freq)(const struct ti_sci_handle *handle, u32 did, u32 cid,
192192 u64 *current_freq);
193193 };
194194

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t