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
166 * managed by driver for that purpose.166 * managed by driver for that purpose.
167 */167 */
168struct ti_sci_clk_ops {168struct 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,
170 bool needs_ssc, bool can_change_freq,170 bool needs_ssc, bool can_change_freq,
171 bool enable_input_term);171 bool enable_input_term);
172 int (*idle_clock)(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, u8 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, u8 cid,174 int (*is_auto)(const struct ti_sci_handle *handle, u32 did, u32 cid,
175 bool *req_state);175 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,
177 bool *req_state, bool *current_state);177 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,
179 bool *req_state, bool *current_state);179 bool *req_state, bool *current_state);
180 int (*set_parent)(const struct ti_sci_handle *handle, u32 did, u8 cid,180 int (*set_parent)(const struct ti_sci_handle *handle, u32 did, u32 cid,
181 u8 parent_id);181 u32 parent_id);
182 int (*get_parent)(const struct ti_sci_handle *handle, u32 did, u8 cid,182 int (*get_parent)(const struct ti_sci_handle *handle, u32 did, u32 cid,
183 u8 *parent_id);183 u32 *parent_id);
184 int (*get_num_parents)(const struct ti_sci_handle *handle, u32 did,184 int (*get_num_parents)(const struct ti_sci_handle *handle, u32 did,
185 u8 cid, u8 *num_parents);185 u32 cid, u32 *num_parents);
186 int (*get_best_match_freq)(const struct ti_sci_handle *handle, u32 did,186 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,
188 u64 max_freq, u64 *match_freq);188 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,
190 u64 min_freq, u64 target_freq, u64 max_freq);190 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,
192 u64 *current_freq);192 u64 *current_freq);
193};193};
194 194

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