132cd2512SLokesh Vutla /* SPDX-License-Identifier: GPL-2.0+ */
232cd2512SLokesh Vutla /*
332cd2512SLokesh Vutla  * Texas Instruments System Control Interface Protocol
432cd2512SLokesh Vutla  * Based on include/linux/soc/ti/ti_sci_protocol.h from Linux.
532cd2512SLokesh Vutla  *
632cd2512SLokesh Vutla  * Copyright (C) 2018 Texas Instruments Incorporated - http://www.ti.com/
732cd2512SLokesh Vutla  *	Nishanth Menon
832cd2512SLokesh Vutla  *	Lokesh Vutla <lokeshvutla@ti.com>
932cd2512SLokesh Vutla  */
1032cd2512SLokesh Vutla 
1132cd2512SLokesh Vutla #ifndef __TISCI_PROTOCOL_H
1232cd2512SLokesh Vutla #define __TISCI_PROTOCOL_H
1332cd2512SLokesh Vutla 
1432cd2512SLokesh Vutla /**
1532cd2512SLokesh Vutla  * struct ti_sci_version_info - version information structure
1632cd2512SLokesh Vutla  * @abi_major:	Major ABI version. Change here implies risk of backward
1732cd2512SLokesh Vutla  *		compatibility break.
1832cd2512SLokesh Vutla  * @abi_minor:	Minor ABI version. Change here implies new feature addition,
1932cd2512SLokesh Vutla  *		or compatible change in ABI.
2032cd2512SLokesh Vutla  * @firmware_revision:	Firmware revision (not usually used).
2132cd2512SLokesh Vutla  * @firmware_description: Firmware description (not usually used).
2232cd2512SLokesh Vutla  */
2332cd2512SLokesh Vutla struct ti_sci_version_info {
2432cd2512SLokesh Vutla 	u8 abi_major;
2532cd2512SLokesh Vutla 	u8 abi_minor;
2632cd2512SLokesh Vutla 	u16 firmware_revision;
2732cd2512SLokesh Vutla 	char firmware_description[32];
2832cd2512SLokesh Vutla };
2932cd2512SLokesh Vutla 
3032cd2512SLokesh Vutla struct ti_sci_handle;
3132cd2512SLokesh Vutla 
3232cd2512SLokesh Vutla /**
33dcfc52adSAndreas Dannenberg  * struct ti_sci_board_ops - Board config operations
34dcfc52adSAndreas Dannenberg  * @board_config: Command to set the board configuration
35dcfc52adSAndreas Dannenberg  *		  Returns 0 for successful exclusive request, else returns
36dcfc52adSAndreas Dannenberg  *		  corresponding error message.
37dcfc52adSAndreas Dannenberg  * @board_config_rm: Command to set the board resource management
38dcfc52adSAndreas Dannenberg  *		  configuration
39dcfc52adSAndreas Dannenberg  *		  Returns 0 for successful exclusive request, else returns
40dcfc52adSAndreas Dannenberg  *		  corresponding error message.
41dcfc52adSAndreas Dannenberg  * @board_config_security: Command to set the board security configuration
42dcfc52adSAndreas Dannenberg  *		  Returns 0 for successful exclusive request, else returns
43dcfc52adSAndreas Dannenberg  *		  corresponding error message.
44dcfc52adSAndreas Dannenberg  * @board_config_pm: Command to trigger and set the board power and clock
45dcfc52adSAndreas Dannenberg  *		  management related configuration
46dcfc52adSAndreas Dannenberg  *		  Returns 0 for successful exclusive request, else returns
47dcfc52adSAndreas Dannenberg  *		  corresponding error message.
48dcfc52adSAndreas Dannenberg  */
49dcfc52adSAndreas Dannenberg struct ti_sci_board_ops {
50dcfc52adSAndreas Dannenberg 	int (*board_config)(const struct ti_sci_handle *handle,
51dcfc52adSAndreas Dannenberg 			    u64 addr, u32 size);
52dcfc52adSAndreas Dannenberg 	int (*board_config_rm)(const struct ti_sci_handle *handle,
53dcfc52adSAndreas Dannenberg 			       u64 addr, u32 size);
54dcfc52adSAndreas Dannenberg 	int (*board_config_security)(const struct ti_sci_handle *handle,
55dcfc52adSAndreas Dannenberg 				     u64 addr, u32 size);
56dcfc52adSAndreas Dannenberg 	int (*board_config_pm)(const struct ti_sci_handle *handle,
57dcfc52adSAndreas Dannenberg 			       u64 addr, u32 size);
58dcfc52adSAndreas Dannenberg };
59dcfc52adSAndreas Dannenberg 
60dcfc52adSAndreas Dannenberg /**
617bc33045SAndreas Dannenberg  * struct ti_sci_dev_ops - Device control operations
627bc33045SAndreas Dannenberg  * @get_device: Command to request for device managed by TISCI
637bc33045SAndreas Dannenberg  *		Returns 0 for successful exclusive request, else returns
647bc33045SAndreas Dannenberg  *		corresponding error message.
657bc33045SAndreas Dannenberg  * @idle_device: Command to idle a device managed by TISCI
667bc33045SAndreas Dannenberg  *		Returns 0 for successful exclusive request, else returns
677bc33045SAndreas Dannenberg  *		corresponding error message.
687bc33045SAndreas Dannenberg  * @put_device:	Command to release a device managed by TISCI
697bc33045SAndreas Dannenberg  *		Returns 0 for successful release, else returns corresponding
707bc33045SAndreas Dannenberg  *		error message.
717bc33045SAndreas Dannenberg  * @is_valid:	Check if the device ID is a valid ID.
727bc33045SAndreas Dannenberg  *		Returns 0 if the ID is valid, else returns corresponding error.
737bc33045SAndreas Dannenberg  * @get_context_loss_count: Command to retrieve context loss counter - this
747bc33045SAndreas Dannenberg  *		increments every time the device looses context. Overflow
757bc33045SAndreas Dannenberg  *		is possible.
767bc33045SAndreas Dannenberg  *		- count: pointer to u32 which will retrieve counter
777bc33045SAndreas Dannenberg  *		Returns 0 for successful information request and count has
787bc33045SAndreas Dannenberg  *		proper data, else returns corresponding error message.
797bc33045SAndreas Dannenberg  * @is_idle:	Reports back about device idle state
807bc33045SAndreas Dannenberg  *		- req_state: Returns requested idle state
817bc33045SAndreas Dannenberg  *		Returns 0 for successful information request and req_state and
827bc33045SAndreas Dannenberg  *		current_state has proper data, else returns corresponding error
837bc33045SAndreas Dannenberg  *		message.
847bc33045SAndreas Dannenberg  * @is_stop:	Reports back about device stop state
857bc33045SAndreas Dannenberg  *		- req_state: Returns requested stop state
867bc33045SAndreas Dannenberg  *		- current_state: Returns current stop state
877bc33045SAndreas Dannenberg  *		Returns 0 for successful information request and req_state and
887bc33045SAndreas Dannenberg  *		current_state has proper data, else returns corresponding error
897bc33045SAndreas Dannenberg  *		message.
907bc33045SAndreas Dannenberg  * @is_on:	Reports back about device ON(or active) state
917bc33045SAndreas Dannenberg  *		- req_state: Returns requested ON state
927bc33045SAndreas Dannenberg  *		- current_state: Returns current ON state
937bc33045SAndreas Dannenberg  *		Returns 0 for successful information request and req_state and
947bc33045SAndreas Dannenberg  *		current_state has proper data, else returns corresponding error
957bc33045SAndreas Dannenberg  *		message.
967bc33045SAndreas Dannenberg  * @is_transitioning: Reports back if the device is in the middle of transition
977bc33045SAndreas Dannenberg  *		of state.
987bc33045SAndreas Dannenberg  *		-current_state: Returns 'true' if currently transitioning.
997bc33045SAndreas Dannenberg  * @set_device_resets: Command to configure resets for device managed by TISCI.
1007bc33045SAndreas Dannenberg  *		-reset_state: Device specific reset bit field
1017bc33045SAndreas Dannenberg  *		Returns 0 for successful request, else returns
1027bc33045SAndreas Dannenberg  *		corresponding error message.
1037bc33045SAndreas Dannenberg  * @get_device_resets: Command to read state of resets for device managed
1047bc33045SAndreas Dannenberg  *		by TISCI.
1057bc33045SAndreas Dannenberg  *		-reset_state: pointer to u32 which will retrieve resets
1067bc33045SAndreas Dannenberg  *		Returns 0 for successful request, else returns
1077bc33045SAndreas Dannenberg  *		corresponding error message.
1087bc33045SAndreas Dannenberg  *
1097bc33045SAndreas Dannenberg  * NOTE: for all these functions, the following parameters are generic in
1107bc33045SAndreas Dannenberg  * nature:
1117bc33045SAndreas Dannenberg  * -handle:	Pointer to TISCI handle as retrieved by *ti_sci_get_handle
1127bc33045SAndreas Dannenberg  * -id:		Device Identifier
1137bc33045SAndreas Dannenberg  *
1147bc33045SAndreas Dannenberg  * Request for the device - NOTE: the client MUST maintain integrity of
1157bc33045SAndreas Dannenberg  * usage count by balancing get_device with put_device. No refcounting is
1167bc33045SAndreas Dannenberg  * managed by driver for that purpose.
1177bc33045SAndreas Dannenberg  */
1187bc33045SAndreas Dannenberg struct ti_sci_dev_ops {
1197bc33045SAndreas Dannenberg 	int (*get_device)(const struct ti_sci_handle *handle, u32 id);
1207bc33045SAndreas Dannenberg 	int (*idle_device)(const struct ti_sci_handle *handle, u32 id);
1217bc33045SAndreas Dannenberg 	int (*put_device)(const struct ti_sci_handle *handle, u32 id);
1227bc33045SAndreas Dannenberg 	int (*is_valid)(const struct ti_sci_handle *handle, u32 id);
1237bc33045SAndreas Dannenberg 	int (*get_context_loss_count)(const struct ti_sci_handle *handle,
1247bc33045SAndreas Dannenberg 				      u32 id, u32 *count);
1257bc33045SAndreas Dannenberg 	int (*is_idle)(const struct ti_sci_handle *handle, u32 id,
1267bc33045SAndreas Dannenberg 		       bool *requested_state);
1277bc33045SAndreas Dannenberg 	int (*is_stop)(const struct ti_sci_handle *handle, u32 id,
1287bc33045SAndreas Dannenberg 		       bool *req_state, bool *current_state);
1297bc33045SAndreas Dannenberg 	int (*is_on)(const struct ti_sci_handle *handle, u32 id,
1307bc33045SAndreas Dannenberg 		     bool *req_state, bool *current_state);
1317bc33045SAndreas Dannenberg 	int (*is_transitioning)(const struct ti_sci_handle *handle, u32 id,
1327bc33045SAndreas Dannenberg 				bool *current_state);
1337bc33045SAndreas Dannenberg 	int (*set_device_resets)(const struct ti_sci_handle *handle, u32 id,
1347bc33045SAndreas Dannenberg 				 u32 reset_state);
1357bc33045SAndreas Dannenberg 	int (*get_device_resets)(const struct ti_sci_handle *handle, u32 id,
1367bc33045SAndreas Dannenberg 				 u32 *reset_state);
1377bc33045SAndreas Dannenberg };
1387bc33045SAndreas Dannenberg 
1397bc33045SAndreas Dannenberg /**
1409b87181fSLokesh Vutla  * struct ti_sci_clk_ops - Clock control operations
1419b87181fSLokesh Vutla  * @get_clock:	Request for activation of clock and manage by processor
1429b87181fSLokesh Vutla  *		- needs_ssc: 'true' if Spread Spectrum clock is desired.
1439b87181fSLokesh Vutla  *		- can_change_freq: 'true' if frequency change is desired.
1449b87181fSLokesh Vutla  *		- enable_input_term: 'true' if input termination is desired.
1459b87181fSLokesh Vutla  * @idle_clock:	Request for Idling a clock managed by processor
1469b87181fSLokesh Vutla  * @put_clock:	Release the clock to be auto managed by TISCI
1479b87181fSLokesh Vutla  * @is_auto:	Is the clock being auto managed
1489b87181fSLokesh Vutla  *		- req_state: state indicating if the clock is auto managed
1499b87181fSLokesh Vutla  * @is_on:	Is the clock ON
1509b87181fSLokesh Vutla  *		- req_state: if the clock is requested to be forced ON
1519b87181fSLokesh Vutla  *		- current_state: if the clock is currently ON
1529b87181fSLokesh Vutla  * @is_off:	Is the clock OFF
1539b87181fSLokesh Vutla  *		- req_state: if the clock is requested to be forced OFF
1549b87181fSLokesh Vutla  *		- current_state: if the clock is currently Gated
1559b87181fSLokesh Vutla  * @set_parent:	Set the clock source of a specific device clock
1569b87181fSLokesh Vutla  *		- parent_id: Parent clock identifier to set.
1579b87181fSLokesh Vutla  * @get_parent:	Get the current clock source of a specific device clock
1589b87181fSLokesh Vutla  *		- parent_id: Parent clock identifier which is the parent.
1599b87181fSLokesh Vutla  * @get_num_parents: Get the number of parents of the current clock source
1609b87181fSLokesh Vutla  *		- num_parents: returns the number of parent clocks.
1619b87181fSLokesh Vutla  * @get_best_match_freq: Find a best matching frequency for a frequency
1629b87181fSLokesh Vutla  *		range.
1639b87181fSLokesh Vutla  *		- match_freq: Best matching frequency in Hz.
1649b87181fSLokesh Vutla  * @set_freq:	Set the Clock frequency
1659b87181fSLokesh Vutla  * @get_freq:	Get the Clock frequency
1669b87181fSLokesh Vutla  *		- current_freq: Frequency in Hz that the clock is at.
1679b87181fSLokesh Vutla  *
1689b87181fSLokesh Vutla  * NOTE: for all these functions, the following parameters are generic in
1699b87181fSLokesh Vutla  * nature:
1709b87181fSLokesh Vutla  * -handle:	Pointer to TISCI handle as retrieved by *ti_sci_get_handle
1719b87181fSLokesh Vutla  * -did:	Device identifier this request is for
1729b87181fSLokesh Vutla  * -cid:	Clock identifier for the device for this request.
1739b87181fSLokesh Vutla  *		Each device has it's own set of clock inputs. This indexes
1749b87181fSLokesh Vutla  *		which clock input to modify.
1759b87181fSLokesh Vutla  * -min_freq:	The minimum allowable frequency in Hz. This is the minimum
1769b87181fSLokesh Vutla  *		allowable programmed frequency and does not account for clock
1779b87181fSLokesh Vutla  *		tolerances and jitter.
1789b87181fSLokesh Vutla  * -target_freq: The target clock frequency in Hz. A frequency will be
1799b87181fSLokesh Vutla  *		processed as close to this target frequency as possible.
1809b87181fSLokesh Vutla  * -max_freq:	The maximum allowable frequency in Hz. This is the maximum
1819b87181fSLokesh Vutla  *		allowable programmed frequency and does not account for clock
1829b87181fSLokesh Vutla  *		tolerances and jitter.
1839b87181fSLokesh Vutla  *
1849b87181fSLokesh Vutla  * Request for the clock - NOTE: the client MUST maintain integrity of
1859b87181fSLokesh Vutla  * usage count by balancing get_clock with put_clock. No refcounting is
1869b87181fSLokesh Vutla  * managed by driver for that purpose.
1879b87181fSLokesh Vutla  */
1889b87181fSLokesh Vutla struct ti_sci_clk_ops {
1899b87181fSLokesh Vutla 	int (*get_clock)(const struct ti_sci_handle *handle, u32 did, u8 cid,
1909b87181fSLokesh Vutla 			 bool needs_ssc, bool can_change_freq,
1919b87181fSLokesh Vutla 			 bool enable_input_term);
1929b87181fSLokesh Vutla 	int (*idle_clock)(const struct ti_sci_handle *handle, u32 did, u8 cid);
1939b87181fSLokesh Vutla 	int (*put_clock)(const struct ti_sci_handle *handle, u32 did, u8 cid);
1949b87181fSLokesh Vutla 	int (*is_auto)(const struct ti_sci_handle *handle, u32 did, u8 cid,
1959b87181fSLokesh Vutla 		       bool *req_state);
1969b87181fSLokesh Vutla 	int (*is_on)(const struct ti_sci_handle *handle, u32 did, u8 cid,
1979b87181fSLokesh Vutla 		     bool *req_state, bool *current_state);
1989b87181fSLokesh Vutla 	int (*is_off)(const struct ti_sci_handle *handle, u32 did, u8 cid,
1999b87181fSLokesh Vutla 		      bool *req_state, bool *current_state);
2009b87181fSLokesh Vutla 	int (*set_parent)(const struct ti_sci_handle *handle, u32 did, u8 cid,
2019b87181fSLokesh Vutla 			  u8 parent_id);
2029b87181fSLokesh Vutla 	int (*get_parent)(const struct ti_sci_handle *handle, u32 did, u8 cid,
2039b87181fSLokesh Vutla 			  u8 *parent_id);
2049b87181fSLokesh Vutla 	int (*get_num_parents)(const struct ti_sci_handle *handle, u32 did,
2059b87181fSLokesh Vutla 			       u8 cid, u8 *num_parents);
2069b87181fSLokesh Vutla 	int (*get_best_match_freq)(const struct ti_sci_handle *handle, u32 did,
2079b87181fSLokesh Vutla 				   u8 cid, u64 min_freq, u64 target_freq,
2089b87181fSLokesh Vutla 				   u64 max_freq, u64 *match_freq);
2099b87181fSLokesh Vutla 	int (*set_freq)(const struct ti_sci_handle *handle, u32 did, u8 cid,
2109b87181fSLokesh Vutla 			u64 min_freq, u64 target_freq, u64 max_freq);
2119b87181fSLokesh Vutla 	int (*get_freq)(const struct ti_sci_handle *handle, u32 did, u8 cid,
2129b87181fSLokesh Vutla 			u64 *current_freq);
2139b87181fSLokesh Vutla };
2149b87181fSLokesh Vutla 
2159b87181fSLokesh Vutla /**
216f369b0f2SAndreas Dannenberg  * struct ti_sci_core_ops - SoC Core Operations
217f369b0f2SAndreas Dannenberg  * @reboot_device: Reboot the SoC
218f369b0f2SAndreas Dannenberg  *		Returns 0 for successful request(ideally should never return),
219f369b0f2SAndreas Dannenberg  *		else returns corresponding error value.
220f369b0f2SAndreas Dannenberg  */
221f369b0f2SAndreas Dannenberg struct ti_sci_core_ops {
222f369b0f2SAndreas Dannenberg 	int (*reboot_device)(const struct ti_sci_handle *handle);
223f369b0f2SAndreas Dannenberg };
224f369b0f2SAndreas Dannenberg 
225f369b0f2SAndreas Dannenberg /**
226*ccbc8b2fSLokesh Vutla  * struct ti_sci_proc_ops - Processor specific operations.
227*ccbc8b2fSLokesh Vutla  *
228*ccbc8b2fSLokesh Vutla  * @proc_request: Request for controlling a physical processor.
229*ccbc8b2fSLokesh Vutla  *		The requesting host should be in the processor access list.
230*ccbc8b2fSLokesh Vutla  * @proc_release: Relinquish a physical processor control
231*ccbc8b2fSLokesh Vutla  * @proc_handover: Handover a physical processor control to another host
232*ccbc8b2fSLokesh Vutla  *		   in the permitted list.
233*ccbc8b2fSLokesh Vutla  * @set_proc_boot_cfg: Base configuration of the processor
234*ccbc8b2fSLokesh Vutla  * @set_proc_boot_ctrl: Setup limited control flags in specific cases.
235*ccbc8b2fSLokesh Vutla  * @proc_auth_boot_image:
236*ccbc8b2fSLokesh Vutla  * @get_proc_boot_status: Get the state of physical processor
237*ccbc8b2fSLokesh Vutla  *
238*ccbc8b2fSLokesh Vutla  * NOTE: for all these functions, the following parameters are generic in
239*ccbc8b2fSLokesh Vutla  * nature:
240*ccbc8b2fSLokesh Vutla  * -handle:	Pointer to TISCI handle as retrieved by *ti_sci_get_handle
241*ccbc8b2fSLokesh Vutla  * -pid:	Processor ID
242*ccbc8b2fSLokesh Vutla  *
243*ccbc8b2fSLokesh Vutla  */
244*ccbc8b2fSLokesh Vutla struct ti_sci_proc_ops {
245*ccbc8b2fSLokesh Vutla 	int (*proc_request)(const struct ti_sci_handle *handle, u8 pid);
246*ccbc8b2fSLokesh Vutla 	int (*proc_release)(const struct ti_sci_handle *handle, u8 pid);
247*ccbc8b2fSLokesh Vutla 	int (*proc_handover)(const struct ti_sci_handle *handle, u8 pid,
248*ccbc8b2fSLokesh Vutla 			     u8 hid);
249*ccbc8b2fSLokesh Vutla 	int (*set_proc_boot_cfg)(const struct ti_sci_handle *handle, u8 pid,
250*ccbc8b2fSLokesh Vutla 				 u64 bv, u32 cfg_set, u32 cfg_clr);
251*ccbc8b2fSLokesh Vutla 	int (*set_proc_boot_ctrl)(const struct ti_sci_handle *handle, u8 pid,
252*ccbc8b2fSLokesh Vutla 				  u32 ctrl_set, u32 ctrl_clr);
253*ccbc8b2fSLokesh Vutla 	int (*proc_auth_boot_image)(const struct ti_sci_handle *handle, u8 pid,
254*ccbc8b2fSLokesh Vutla 				    u64 caddr);
255*ccbc8b2fSLokesh Vutla 	int (*get_proc_boot_status)(const struct ti_sci_handle *handle, u8 pid,
256*ccbc8b2fSLokesh Vutla 				    u64 *bv, u32 *cfg_flags, u32 *ctrl_flags,
257*ccbc8b2fSLokesh Vutla 				    u32 *sts_flags);
258*ccbc8b2fSLokesh Vutla };
259*ccbc8b2fSLokesh Vutla 
260*ccbc8b2fSLokesh Vutla /**
261dcfc52adSAndreas Dannenberg  * struct ti_sci_ops - Function support for TI SCI
262dcfc52adSAndreas Dannenberg  * @board_ops:	Miscellaneous operations
2637bc33045SAndreas Dannenberg  * @dev_ops:	Device specific operations
2649b87181fSLokesh Vutla  * @clk_ops:	Clock specific operations
265f369b0f2SAndreas Dannenberg  * @core_ops:	Core specific operations
266*ccbc8b2fSLokesh Vutla  * @proc_ops:	Processor specific operations
267dcfc52adSAndreas Dannenberg  */
268dcfc52adSAndreas Dannenberg struct ti_sci_ops {
269dcfc52adSAndreas Dannenberg 	struct ti_sci_board_ops board_ops;
2707bc33045SAndreas Dannenberg 	struct ti_sci_dev_ops dev_ops;
2719b87181fSLokesh Vutla 	struct ti_sci_clk_ops clk_ops;
272f369b0f2SAndreas Dannenberg 	struct ti_sci_core_ops core_ops;
273*ccbc8b2fSLokesh Vutla 	struct ti_sci_proc_ops proc_ops;
274dcfc52adSAndreas Dannenberg };
275dcfc52adSAndreas Dannenberg 
276dcfc52adSAndreas Dannenberg /**
27732cd2512SLokesh Vutla  * struct ti_sci_handle - Handle returned to TI SCI clients for usage.
278dcfc52adSAndreas Dannenberg  * @ops:	operations that are made available to TI SCI clients
27932cd2512SLokesh Vutla  * @version:	structure containing version information
28032cd2512SLokesh Vutla  */
28132cd2512SLokesh Vutla struct ti_sci_handle {
282dcfc52adSAndreas Dannenberg 	struct ti_sci_ops ops;
28332cd2512SLokesh Vutla 	struct ti_sci_version_info version;
28432cd2512SLokesh Vutla };
28532cd2512SLokesh Vutla 
28632cd2512SLokesh Vutla #if IS_ENABLED(CONFIG_TI_SCI_PROTOCOL)
28732cd2512SLokesh Vutla 
28832cd2512SLokesh Vutla const struct ti_sci_handle *ti_sci_get_handle_from_sysfw(struct udevice *dev);
28932cd2512SLokesh Vutla const struct ti_sci_handle *ti_sci_get_handle(struct udevice *dev);
29032cd2512SLokesh Vutla const struct ti_sci_handle *ti_sci_get_by_phandle(struct udevice *dev,
29132cd2512SLokesh Vutla 						  const char *property);
29232cd2512SLokesh Vutla 
29332cd2512SLokesh Vutla #else	/* CONFIG_TI_SCI_PROTOCOL */
29432cd2512SLokesh Vutla 
29532cd2512SLokesh Vutla static inline
ti_sci_get_handle_from_sysfw(struct udevice * dev)29632cd2512SLokesh Vutla const struct ti_sci_handle *ti_sci_get_handle_from_sysfw(struct udevice *dev)
29732cd2512SLokesh Vutla {
29832cd2512SLokesh Vutla 	return ERR_PTR(-EINVAL);
29932cd2512SLokesh Vutla }
30032cd2512SLokesh Vutla 
ti_sci_get_handle(struct udevice * dev)30132cd2512SLokesh Vutla static inline const struct ti_sci_handle *ti_sci_get_handle(struct udevice *dev)
30232cd2512SLokesh Vutla {
30332cd2512SLokesh Vutla 	return ERR_PTR(-EINVAL);
30432cd2512SLokesh Vutla }
30532cd2512SLokesh Vutla 
30632cd2512SLokesh Vutla static inline
ti_sci_get_by_phandle(struct udevice * dev,const char * property)30732cd2512SLokesh Vutla const struct ti_sci_handle *ti_sci_get_by_phandle(struct udevice *dev,
30832cd2512SLokesh Vutla 						  const char *property)
30932cd2512SLokesh Vutla {
31032cd2512SLokesh Vutla 	return ERR_PTR(-EINVAL);
31132cd2512SLokesh Vutla }
31232cd2512SLokesh Vutla #endif	/* CONFIG_TI_SCI_PROTOCOL */
31332cd2512SLokesh Vutla 
31432cd2512SLokesh Vutla #endif	/* __TISCI_PROTOCOL_H */
315