ti_sci.h 53 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397
  1. /* SPDX-License-Identifier: BSD-3-Clause */
  2. /*
  3. * Texas Instruments System Control Interface (TISCI) Protocol
  4. *
  5. * Communication protocol with TI SCI hardware
  6. * The system works in a message response protocol
  7. * See: http://processors.wiki.ti.com/index.php/TISCI for details
  8. *
  9. * Copyright (C) 2015-2016 Texas Instruments Incorporated - https://www.ti.com/
  10. */
  11. #ifndef __TI_SCI_H
  12. #define __TI_SCI_H
  13. /* Generic Messages */
  14. #define TI_SCI_MSG_ENABLE_WDT 0x0000
  15. #define TI_SCI_MSG_WAKE_RESET 0x0001
  16. #define TI_SCI_MSG_VERSION 0x0002
  17. #define TI_SCI_MSG_WAKE_REASON 0x0003
  18. #define TI_SCI_MSG_GOODBYE 0x0004
  19. #define TI_SCI_MSG_SYS_RESET 0x0005
  20. /* Device requests */
  21. #define TI_SCI_MSG_SET_DEVICE_STATE 0x0200
  22. #define TI_SCI_MSG_GET_DEVICE_STATE 0x0201
  23. #define TI_SCI_MSG_SET_DEVICE_RESETS 0x0202
  24. /* Clock requests */
  25. #define TI_SCI_MSG_SET_CLOCK_STATE 0x0100
  26. #define TI_SCI_MSG_GET_CLOCK_STATE 0x0101
  27. #define TI_SCI_MSG_SET_CLOCK_PARENT 0x0102
  28. #define TI_SCI_MSG_GET_CLOCK_PARENT 0x0103
  29. #define TI_SCI_MSG_GET_NUM_CLOCK_PARENTS 0x0104
  30. #define TI_SCI_MSG_SET_CLOCK_FREQ 0x010c
  31. #define TI_SCI_MSG_QUERY_CLOCK_FREQ 0x010d
  32. #define TI_SCI_MSG_GET_CLOCK_FREQ 0x010e
  33. /* Resource Management Requests */
  34. #define TI_SCI_MSG_GET_RESOURCE_RANGE 0x1500
  35. /* IRQ requests */
  36. #define TI_SCI_MSG_SET_IRQ 0x1000
  37. #define TI_SCI_MSG_FREE_IRQ 0x1001
  38. /* NAVSS resource management */
  39. /* Ringacc requests */
  40. #define TI_SCI_MSG_RM_RING_ALLOCATE 0x1100
  41. #define TI_SCI_MSG_RM_RING_FREE 0x1101
  42. #define TI_SCI_MSG_RM_RING_RECONFIG 0x1102
  43. #define TI_SCI_MSG_RM_RING_RESET 0x1103
  44. #define TI_SCI_MSG_RM_RING_CFG 0x1110
  45. /* PSI-L requests */
  46. #define TI_SCI_MSG_RM_PSIL_PAIR 0x1280
  47. #define TI_SCI_MSG_RM_PSIL_UNPAIR 0x1281
  48. #define TI_SCI_MSG_RM_UDMAP_TX_ALLOC 0x1200
  49. #define TI_SCI_MSG_RM_UDMAP_TX_FREE 0x1201
  50. #define TI_SCI_MSG_RM_UDMAP_RX_ALLOC 0x1210
  51. #define TI_SCI_MSG_RM_UDMAP_RX_FREE 0x1211
  52. #define TI_SCI_MSG_RM_UDMAP_FLOW_CFG 0x1220
  53. #define TI_SCI_MSG_RM_UDMAP_OPT_FLOW_CFG 0x1221
  54. #define TISCI_MSG_RM_UDMAP_TX_CH_CFG 0x1205
  55. #define TISCI_MSG_RM_UDMAP_TX_CH_GET_CFG 0x1206
  56. #define TISCI_MSG_RM_UDMAP_RX_CH_CFG 0x1215
  57. #define TISCI_MSG_RM_UDMAP_RX_CH_GET_CFG 0x1216
  58. #define TISCI_MSG_RM_UDMAP_FLOW_CFG 0x1230
  59. #define TISCI_MSG_RM_UDMAP_FLOW_SIZE_THRESH_CFG 0x1231
  60. #define TISCI_MSG_RM_UDMAP_FLOW_GET_CFG 0x1232
  61. #define TISCI_MSG_RM_UDMAP_FLOW_SIZE_THRESH_GET_CFG 0x1233
  62. /* Processor Control requests */
  63. #define TI_SCI_MSG_PROC_REQUEST 0xc000
  64. #define TI_SCI_MSG_PROC_RELEASE 0xc001
  65. #define TI_SCI_MSG_PROC_HANDOVER 0xc005
  66. #define TI_SCI_MSG_SET_CONFIG 0xc100
  67. #define TI_SCI_MSG_SET_CTRL 0xc101
  68. #define TI_SCI_MSG_GET_STATUS 0xc400
  69. /**
  70. * struct ti_sci_msg_hdr - Generic Message Header for All messages and responses
  71. * @type: Type of messages: One of TI_SCI_MSG* values
  72. * @host: Host of the message
  73. * @seq: Message identifier indicating a transfer sequence
  74. * @flags: Flag for the message
  75. */
  76. struct ti_sci_msg_hdr {
  77. u16 type;
  78. u8 host;
  79. u8 seq;
  80. #define TI_SCI_MSG_FLAG(val) (1 << (val))
  81. #define TI_SCI_FLAG_REQ_GENERIC_NORESPONSE 0x0
  82. #define TI_SCI_FLAG_REQ_ACK_ON_RECEIVED TI_SCI_MSG_FLAG(0)
  83. #define TI_SCI_FLAG_REQ_ACK_ON_PROCESSED TI_SCI_MSG_FLAG(1)
  84. #define TI_SCI_FLAG_RESP_GENERIC_NACK 0x0
  85. #define TI_SCI_FLAG_RESP_GENERIC_ACK TI_SCI_MSG_FLAG(1)
  86. /* Additional Flags */
  87. u32 flags;
  88. } __packed;
  89. /**
  90. * struct ti_sci_msg_resp_version - Response for a message
  91. * @hdr: Generic header
  92. * @firmware_description: String describing the firmware
  93. * @firmware_revision: Firmware revision
  94. * @abi_major: Major version of the ABI that firmware supports
  95. * @abi_minor: Minor version of the ABI that firmware supports
  96. *
  97. * In general, ABI version changes follow the rule that minor version increments
  98. * are backward compatible. Major revision changes in ABI may not be
  99. * backward compatible.
  100. *
  101. * Response to a generic message with message type TI_SCI_MSG_VERSION
  102. */
  103. struct ti_sci_msg_resp_version {
  104. struct ti_sci_msg_hdr hdr;
  105. char firmware_description[32];
  106. u16 firmware_revision;
  107. u8 abi_major;
  108. u8 abi_minor;
  109. } __packed;
  110. /**
  111. * struct ti_sci_msg_req_reboot - Reboot the SoC
  112. * @hdr: Generic Header
  113. *
  114. * Request type is TI_SCI_MSG_SYS_RESET, responded with a generic
  115. * ACK/NACK message.
  116. */
  117. struct ti_sci_msg_req_reboot {
  118. struct ti_sci_msg_hdr hdr;
  119. } __packed;
  120. /**
  121. * struct ti_sci_msg_req_set_device_state - Set the desired state of the device
  122. * @hdr: Generic header
  123. * @id: Indicates which device to modify
  124. * @reserved: Reserved space in message, must be 0 for backward compatibility
  125. * @state: The desired state of the device.
  126. *
  127. * Certain flags can also be set to alter the device state:
  128. * + MSG_FLAG_DEVICE_WAKE_ENABLED - Configure the device to be a wake source.
  129. * The meaning of this flag will vary slightly from device to device and from
  130. * SoC to SoC but it generally allows the device to wake the SoC out of deep
  131. * suspend states.
  132. * + MSG_FLAG_DEVICE_RESET_ISO - Enable reset isolation for this device.
  133. * + MSG_FLAG_DEVICE_EXCLUSIVE - Claim this device exclusively. When passed
  134. * with STATE_RETENTION or STATE_ON, it will claim the device exclusively.
  135. * If another host already has this device set to STATE_RETENTION or STATE_ON,
  136. * the message will fail. Once successful, other hosts attempting to set
  137. * STATE_RETENTION or STATE_ON will fail.
  138. *
  139. * Request type is TI_SCI_MSG_SET_DEVICE_STATE, responded with a generic
  140. * ACK/NACK message.
  141. */
  142. struct ti_sci_msg_req_set_device_state {
  143. /* Additional hdr->flags options */
  144. #define MSG_FLAG_DEVICE_WAKE_ENABLED TI_SCI_MSG_FLAG(8)
  145. #define MSG_FLAG_DEVICE_RESET_ISO TI_SCI_MSG_FLAG(9)
  146. #define MSG_FLAG_DEVICE_EXCLUSIVE TI_SCI_MSG_FLAG(10)
  147. struct ti_sci_msg_hdr hdr;
  148. u32 id;
  149. u32 reserved;
  150. #define MSG_DEVICE_SW_STATE_AUTO_OFF 0
  151. #define MSG_DEVICE_SW_STATE_RETENTION 1
  152. #define MSG_DEVICE_SW_STATE_ON 2
  153. u8 state;
  154. } __packed;
  155. /**
  156. * struct ti_sci_msg_req_get_device_state - Request to get device.
  157. * @hdr: Generic header
  158. * @id: Device Identifier
  159. *
  160. * Request type is TI_SCI_MSG_GET_DEVICE_STATE, responded device state
  161. * information
  162. */
  163. struct ti_sci_msg_req_get_device_state {
  164. struct ti_sci_msg_hdr hdr;
  165. u32 id;
  166. } __packed;
  167. /**
  168. * struct ti_sci_msg_resp_get_device_state - Response to get device request.
  169. * @hdr: Generic header
  170. * @context_loss_count: Indicates how many times the device has lost context. A
  171. * driver can use this monotonic counter to determine if the device has
  172. * lost context since the last time this message was exchanged.
  173. * @resets: Programmed state of the reset lines.
  174. * @programmed_state: The state as programmed by set_device.
  175. * - Uses the MSG_DEVICE_SW_* macros
  176. * @current_state: The actual state of the hardware.
  177. *
  178. * Response to request TI_SCI_MSG_GET_DEVICE_STATE.
  179. */
  180. struct ti_sci_msg_resp_get_device_state {
  181. struct ti_sci_msg_hdr hdr;
  182. u32 context_loss_count;
  183. u32 resets;
  184. u8 programmed_state;
  185. #define MSG_DEVICE_HW_STATE_OFF 0
  186. #define MSG_DEVICE_HW_STATE_ON 1
  187. #define MSG_DEVICE_HW_STATE_TRANS 2
  188. u8 current_state;
  189. } __packed;
  190. /**
  191. * struct ti_sci_msg_req_set_device_resets - Set the desired resets
  192. * configuration of the device
  193. * @hdr: Generic header
  194. * @id: Indicates which device to modify
  195. * @resets: A bit field of resets for the device. The meaning, behavior,
  196. * and usage of the reset flags are device specific. 0 for a bit
  197. * indicates releasing the reset represented by that bit while 1
  198. * indicates keeping it held.
  199. *
  200. * Request type is TI_SCI_MSG_SET_DEVICE_RESETS, responded with a generic
  201. * ACK/NACK message.
  202. */
  203. struct ti_sci_msg_req_set_device_resets {
  204. struct ti_sci_msg_hdr hdr;
  205. u32 id;
  206. u32 resets;
  207. } __packed;
  208. /**
  209. * struct ti_sci_msg_req_set_clock_state - Request to setup a Clock state
  210. * @hdr: Generic Header, Certain flags can be set specific to the clocks:
  211. * MSG_FLAG_CLOCK_ALLOW_SSC: Allow this clock to be modified
  212. * via spread spectrum clocking.
  213. * MSG_FLAG_CLOCK_ALLOW_FREQ_CHANGE: Allow this clock's
  214. * frequency to be changed while it is running so long as it
  215. * is within the min/max limits.
  216. * MSG_FLAG_CLOCK_INPUT_TERM: Enable input termination, this
  217. * is only applicable to clock inputs on the SoC pseudo-device.
  218. * @dev_id: Device identifier this request is for
  219. * @clk_id: Clock identifier for the device for this request.
  220. * Each device has it's own set of clock inputs. This indexes
  221. * which clock input to modify. Set to 255 if clock ID is
  222. * greater than or equal to 255.
  223. * @request_state: Request the state for the clock to be set to.
  224. * MSG_CLOCK_SW_STATE_UNREQ: The IP does not require this clock,
  225. * it can be disabled, regardless of the state of the device
  226. * MSG_CLOCK_SW_STATE_AUTO: Allow the System Controller to
  227. * automatically manage the state of this clock. If the device
  228. * is enabled, then the clock is enabled. If the device is set
  229. * to off or retention, then the clock is internally set as not
  230. * being required by the device.(default)
  231. * MSG_CLOCK_SW_STATE_REQ: Configure the clock to be enabled,
  232. * regardless of the state of the device.
  233. * @clk_id_32: Clock identifier for the device for this request.
  234. * Only to be used if the clock ID is greater than or equal to
  235. * 255.
  236. *
  237. * Normally, all required clocks are managed by TISCI entity, this is used
  238. * only for specific control *IF* required. Auto managed state is
  239. * MSG_CLOCK_SW_STATE_AUTO, in other states, TISCI entity assume remote
  240. * will explicitly control.
  241. *
  242. * Request type is TI_SCI_MSG_SET_CLOCK_STATE, response is a generic
  243. * ACK or NACK message.
  244. */
  245. struct ti_sci_msg_req_set_clock_state {
  246. /* Additional hdr->flags options */
  247. #define MSG_FLAG_CLOCK_ALLOW_SSC TI_SCI_MSG_FLAG(8)
  248. #define MSG_FLAG_CLOCK_ALLOW_FREQ_CHANGE TI_SCI_MSG_FLAG(9)
  249. #define MSG_FLAG_CLOCK_INPUT_TERM TI_SCI_MSG_FLAG(10)
  250. struct ti_sci_msg_hdr hdr;
  251. u32 dev_id;
  252. u8 clk_id;
  253. #define MSG_CLOCK_SW_STATE_UNREQ 0
  254. #define MSG_CLOCK_SW_STATE_AUTO 1
  255. #define MSG_CLOCK_SW_STATE_REQ 2
  256. u8 request_state;
  257. u32 clk_id_32;
  258. } __packed;
  259. /**
  260. * struct ti_sci_msg_req_get_clock_state - Request for clock state
  261. * @hdr: Generic Header
  262. * @dev_id: Device identifier this request is for
  263. * @clk_id: Clock identifier for the device for this request.
  264. * Each device has it's own set of clock inputs. This indexes
  265. * which clock input to get state of. Set to 255 if the clock
  266. * ID is greater than or equal to 255.
  267. * @clk_id_32: Clock identifier for the device for the request.
  268. * Only to be used if the clock ID is greater than or equal to
  269. * 255.
  270. *
  271. * Request type is TI_SCI_MSG_GET_CLOCK_STATE, response is state
  272. * of the clock
  273. */
  274. struct ti_sci_msg_req_get_clock_state {
  275. struct ti_sci_msg_hdr hdr;
  276. u32 dev_id;
  277. u8 clk_id;
  278. u32 clk_id_32;
  279. } __packed;
  280. /**
  281. * struct ti_sci_msg_resp_get_clock_state - Response to get clock state
  282. * @hdr: Generic Header
  283. * @programmed_state: Any programmed state of the clock. This is one of
  284. * MSG_CLOCK_SW_STATE* values.
  285. * @current_state: Current state of the clock. This is one of:
  286. * MSG_CLOCK_HW_STATE_NOT_READY: Clock is not ready
  287. * MSG_CLOCK_HW_STATE_READY: Clock is ready
  288. *
  289. * Response to TI_SCI_MSG_GET_CLOCK_STATE.
  290. */
  291. struct ti_sci_msg_resp_get_clock_state {
  292. struct ti_sci_msg_hdr hdr;
  293. u8 programmed_state;
  294. #define MSG_CLOCK_HW_STATE_NOT_READY 0
  295. #define MSG_CLOCK_HW_STATE_READY 1
  296. u8 current_state;
  297. } __packed;
  298. /**
  299. * struct ti_sci_msg_req_set_clock_parent - Set the clock parent
  300. * @hdr: Generic Header
  301. * @dev_id: Device identifier this request is for
  302. * @clk_id: Clock identifier for the device for this request.
  303. * Each device has it's own set of clock inputs. This indexes
  304. * which clock input to modify. Set to 255 if clock ID is
  305. * greater than or equal to 255.
  306. * @parent_id: The new clock parent is selectable by an index via this
  307. * parameter. Set to 255 if clock ID is greater than or
  308. * equal to 255.
  309. * @clk_id_32: Clock identifier if @clk_id field is 255.
  310. * @parent_id_32: Parent identifier if @parent_id is 255.
  311. *
  312. * Request type is TI_SCI_MSG_SET_CLOCK_PARENT, response is generic
  313. * ACK / NACK message.
  314. */
  315. struct ti_sci_msg_req_set_clock_parent {
  316. struct ti_sci_msg_hdr hdr;
  317. u32 dev_id;
  318. u8 clk_id;
  319. u8 parent_id;
  320. u32 clk_id_32;
  321. u32 parent_id_32;
  322. } __packed;
  323. /**
  324. * struct ti_sci_msg_req_get_clock_parent - Get the clock parent
  325. * @hdr: Generic Header
  326. * @dev_id: Device identifier this request is for
  327. * @clk_id: Clock identifier for the device for this request.
  328. * Each device has it's own set of clock inputs. This indexes
  329. * which clock input to get the parent for. If this field
  330. * contains 255, the actual clock identifier is stored in
  331. * @clk_id_32.
  332. * @clk_id_32: Clock identifier if the @clk_id field contains 255.
  333. *
  334. * Request type is TI_SCI_MSG_GET_CLOCK_PARENT, response is parent information
  335. */
  336. struct ti_sci_msg_req_get_clock_parent {
  337. struct ti_sci_msg_hdr hdr;
  338. u32 dev_id;
  339. u8 clk_id;
  340. u32 clk_id_32;
  341. } __packed;
  342. /**
  343. * struct ti_sci_msg_resp_get_clock_parent - Response with clock parent
  344. * @hdr: Generic Header
  345. * @parent_id: The current clock parent. If set to 255, the current parent
  346. * ID can be found from the @parent_id_32 field.
  347. * @parent_id_32: Current clock parent if @parent_id field is set to
  348. * 255.
  349. *
  350. * Response to TI_SCI_MSG_GET_CLOCK_PARENT.
  351. */
  352. struct ti_sci_msg_resp_get_clock_parent {
  353. struct ti_sci_msg_hdr hdr;
  354. u8 parent_id;
  355. u32 parent_id_32;
  356. } __packed;
  357. /**
  358. * struct ti_sci_msg_req_get_clock_num_parents - Request to get clock parents
  359. * @hdr: Generic header
  360. * @dev_id: Device identifier this request is for
  361. * @clk_id: Clock identifier for the device for this request. Set to
  362. * 255 if clock ID is greater than or equal to 255.
  363. * @clk_id_32: Clock identifier if the @clk_id field contains 255.
  364. *
  365. * This request provides information about how many clock parent options
  366. * are available for a given clock to a device. This is typically used
  367. * for input clocks.
  368. *
  369. * Request type is TI_SCI_MSG_GET_NUM_CLOCK_PARENTS, response is appropriate
  370. * message, or NACK in case of inability to satisfy request.
  371. */
  372. struct ti_sci_msg_req_get_clock_num_parents {
  373. struct ti_sci_msg_hdr hdr;
  374. u32 dev_id;
  375. u8 clk_id;
  376. u32 clk_id_32;
  377. } __packed;
  378. /**
  379. * struct ti_sci_msg_resp_get_clock_num_parents - Response for get clk parents
  380. * @hdr: Generic header
  381. * @num_parents: Number of clock parents. If set to 255, the actual
  382. * number of parents is stored into @num_parents_32
  383. * field instead.
  384. * @num_parents_32: Number of clock parents if @num_parents field is
  385. * set to 255.
  386. *
  387. * Response to TI_SCI_MSG_GET_NUM_CLOCK_PARENTS
  388. */
  389. struct ti_sci_msg_resp_get_clock_num_parents {
  390. struct ti_sci_msg_hdr hdr;
  391. u8 num_parents;
  392. u32 num_parents_32;
  393. } __packed;
  394. /**
  395. * struct ti_sci_msg_req_query_clock_freq - Request to query a frequency
  396. * @hdr: Generic Header
  397. * @dev_id: Device identifier this request is for
  398. * @min_freq_hz: The minimum allowable frequency in Hz. This is the minimum
  399. * allowable programmed frequency and does not account for clock
  400. * tolerances and jitter.
  401. * @target_freq_hz: The target clock frequency. A frequency will be found
  402. * as close to this target frequency as possible.
  403. * @max_freq_hz: The maximum allowable frequency in Hz. This is the maximum
  404. * allowable programmed frequency and does not account for clock
  405. * tolerances and jitter.
  406. * @clk_id: Clock identifier for the device for this request. Set to
  407. * 255 if clock identifier is greater than or equal to 255.
  408. * @clk_id_32: Clock identifier if @clk_id is set to 255.
  409. *
  410. * NOTE: Normally clock frequency management is automatically done by TISCI
  411. * entity. In case of specific requests, TISCI evaluates capability to achieve
  412. * requested frequency within provided range and responds with
  413. * result message.
  414. *
  415. * Request type is TI_SCI_MSG_QUERY_CLOCK_FREQ, response is appropriate message,
  416. * or NACK in case of inability to satisfy request.
  417. */
  418. struct ti_sci_msg_req_query_clock_freq {
  419. struct ti_sci_msg_hdr hdr;
  420. u32 dev_id;
  421. u64 min_freq_hz;
  422. u64 target_freq_hz;
  423. u64 max_freq_hz;
  424. u8 clk_id;
  425. u32 clk_id_32;
  426. } __packed;
  427. /**
  428. * struct ti_sci_msg_resp_query_clock_freq - Response to a clock frequency query
  429. * @hdr: Generic Header
  430. * @freq_hz: Frequency that is the best match in Hz.
  431. *
  432. * Response to request type TI_SCI_MSG_QUERY_CLOCK_FREQ. NOTE: if the request
  433. * cannot be satisfied, the message will be of type NACK.
  434. */
  435. struct ti_sci_msg_resp_query_clock_freq {
  436. struct ti_sci_msg_hdr hdr;
  437. u64 freq_hz;
  438. } __packed;
  439. /**
  440. * struct ti_sci_msg_req_set_clock_freq - Request to setup a clock frequency
  441. * @hdr: Generic Header
  442. * @dev_id: Device identifier this request is for
  443. * @min_freq_hz: The minimum allowable frequency in Hz. This is the minimum
  444. * allowable programmed frequency and does not account for clock
  445. * tolerances and jitter.
  446. * @target_freq_hz: The target clock frequency. The clock will be programmed
  447. * at a rate as close to this target frequency as possible.
  448. * @max_freq_hz: The maximum allowable frequency in Hz. This is the maximum
  449. * allowable programmed frequency and does not account for clock
  450. * tolerances and jitter.
  451. * @clk_id: Clock identifier for the device for this request. Set to
  452. * 255 if clock ID is greater than or equal to 255.
  453. * @clk_id_32: Clock identifier if @clk_id field is set to 255.
  454. *
  455. * NOTE: Normally clock frequency management is automatically done by TISCI
  456. * entity. In case of specific requests, TISCI evaluates capability to achieve
  457. * requested range and responds with success/failure message.
  458. *
  459. * This sets the desired frequency for a clock within an allowable
  460. * range. This message will fail on an enabled clock unless
  461. * MSG_FLAG_CLOCK_ALLOW_FREQ_CHANGE is set for the clock. Additionally,
  462. * if other clocks have their frequency modified due to this message,
  463. * they also must have the MSG_FLAG_CLOCK_ALLOW_FREQ_CHANGE or be disabled.
  464. *
  465. * Calling set frequency on a clock input to the SoC pseudo-device will
  466. * inform the PMMC of that clock's frequency. Setting a frequency of
  467. * zero will indicate the clock is disabled.
  468. *
  469. * Calling set frequency on clock outputs from the SoC pseudo-device will
  470. * function similarly to setting the clock frequency on a device.
  471. *
  472. * Request type is TI_SCI_MSG_SET_CLOCK_FREQ, response is a generic ACK/NACK
  473. * message.
  474. */
  475. struct ti_sci_msg_req_set_clock_freq {
  476. struct ti_sci_msg_hdr hdr;
  477. u32 dev_id;
  478. u64 min_freq_hz;
  479. u64 target_freq_hz;
  480. u64 max_freq_hz;
  481. u8 clk_id;
  482. u32 clk_id_32;
  483. } __packed;
  484. /**
  485. * struct ti_sci_msg_req_get_clock_freq - Request to get the clock frequency
  486. * @hdr: Generic Header
  487. * @dev_id: Device identifier this request is for
  488. * @clk_id: Clock identifier for the device for this request. Set to
  489. * 255 if clock ID is greater than or equal to 255.
  490. * @clk_id_32: Clock identifier if @clk_id field is set to 255.
  491. *
  492. * NOTE: Normally clock frequency management is automatically done by TISCI
  493. * entity. In some cases, clock frequencies are configured by host.
  494. *
  495. * Request type is TI_SCI_MSG_GET_CLOCK_FREQ, responded with clock frequency
  496. * that the clock is currently at.
  497. */
  498. struct ti_sci_msg_req_get_clock_freq {
  499. struct ti_sci_msg_hdr hdr;
  500. u32 dev_id;
  501. u8 clk_id;
  502. u32 clk_id_32;
  503. } __packed;
  504. /**
  505. * struct ti_sci_msg_resp_get_clock_freq - Response of clock frequency request
  506. * @hdr: Generic Header
  507. * @freq_hz: Frequency that the clock is currently on, in Hz.
  508. *
  509. * Response to request type TI_SCI_MSG_GET_CLOCK_FREQ.
  510. */
  511. struct ti_sci_msg_resp_get_clock_freq {
  512. struct ti_sci_msg_hdr hdr;
  513. u64 freq_hz;
  514. } __packed;
  515. #define TI_SCI_IRQ_SECONDARY_HOST_INVALID 0xff
  516. /**
  517. * struct ti_sci_msg_req_get_resource_range - Request to get a host's assigned
  518. * range of resources.
  519. * @hdr: Generic Header
  520. * @type: Unique resource assignment type
  521. * @subtype: Resource assignment subtype within the resource type.
  522. * @secondary_host: Host processing entity to which the resources are
  523. * allocated. This is required only when the destination
  524. * host id id different from ti sci interface host id,
  525. * else TI_SCI_IRQ_SECONDARY_HOST_INVALID can be passed.
  526. *
  527. * Request type is TI_SCI_MSG_GET_RESOURCE_RANGE. Responded with requested
  528. * resource range which is of type TI_SCI_MSG_GET_RESOURCE_RANGE.
  529. */
  530. struct ti_sci_msg_req_get_resource_range {
  531. struct ti_sci_msg_hdr hdr;
  532. #define MSG_RM_RESOURCE_TYPE_MASK GENMASK(9, 0)
  533. #define MSG_RM_RESOURCE_SUBTYPE_MASK GENMASK(5, 0)
  534. u16 type;
  535. u8 subtype;
  536. u8 secondary_host;
  537. } __packed;
  538. /**
  539. * struct ti_sci_msg_resp_get_resource_range - Response to resource get range.
  540. * @hdr: Generic Header
  541. * @range_start: Start index of the first resource range.
  542. * @range_num: Number of resources in the first range.
  543. * @range_start_sec: Start index of the second resource range.
  544. * @range_num_sec: Number of resources in the second range.
  545. *
  546. * Response to request TI_SCI_MSG_GET_RESOURCE_RANGE.
  547. */
  548. struct ti_sci_msg_resp_get_resource_range {
  549. struct ti_sci_msg_hdr hdr;
  550. u16 range_start;
  551. u16 range_num;
  552. u16 range_start_sec;
  553. u16 range_num_sec;
  554. } __packed;
  555. /**
  556. * struct ti_sci_msg_req_manage_irq - Request to configure/release the route
  557. * between the dev and the host.
  558. * @hdr: Generic Header
  559. * @valid_params: Bit fields defining the validity of interrupt source
  560. * parameters. If a bit is not set, then corresponding
  561. * field is not valid and will not be used for route set.
  562. * Bit field definitions:
  563. * 0 - Valid bit for @dst_id
  564. * 1 - Valid bit for @dst_host_irq
  565. * 2 - Valid bit for @ia_id
  566. * 3 - Valid bit for @vint
  567. * 4 - Valid bit for @global_event
  568. * 5 - Valid bit for @vint_status_bit_index
  569. * 31 - Valid bit for @secondary_host
  570. * @src_id: IRQ source peripheral ID.
  571. * @src_index: IRQ source index within the peripheral
  572. * @dst_id: IRQ Destination ID. Based on the architecture it can be
  573. * IRQ controller or host processor ID.
  574. * @dst_host_irq: IRQ number of the destination host IRQ controller
  575. * @ia_id: Device ID of the interrupt aggregator in which the
  576. * vint resides.
  577. * @vint: Virtual interrupt number if the interrupt route
  578. * is through an interrupt aggregator.
  579. * @global_event: Global event that is to be mapped to interrupt
  580. * aggregator virtual interrupt status bit.
  581. * @vint_status_bit: Virtual interrupt status bit if the interrupt route
  582. * utilizes an interrupt aggregator status bit.
  583. * @secondary_host: Host ID of the IRQ destination computing entity. This is
  584. * required only when destination host id is different
  585. * from ti sci interface host id.
  586. *
  587. * Request type is TI_SCI_MSG_SET/RELEASE_IRQ.
  588. * Response is generic ACK / NACK message.
  589. */
  590. struct ti_sci_msg_req_manage_irq {
  591. struct ti_sci_msg_hdr hdr;
  592. #define MSG_FLAG_DST_ID_VALID TI_SCI_MSG_FLAG(0)
  593. #define MSG_FLAG_DST_HOST_IRQ_VALID TI_SCI_MSG_FLAG(1)
  594. #define MSG_FLAG_IA_ID_VALID TI_SCI_MSG_FLAG(2)
  595. #define MSG_FLAG_VINT_VALID TI_SCI_MSG_FLAG(3)
  596. #define MSG_FLAG_GLB_EVNT_VALID TI_SCI_MSG_FLAG(4)
  597. #define MSG_FLAG_VINT_STS_BIT_VALID TI_SCI_MSG_FLAG(5)
  598. #define MSG_FLAG_SHOST_VALID TI_SCI_MSG_FLAG(31)
  599. u32 valid_params;
  600. u16 src_id;
  601. u16 src_index;
  602. u16 dst_id;
  603. u16 dst_host_irq;
  604. u16 ia_id;
  605. u16 vint;
  606. u16 global_event;
  607. u8 vint_status_bit;
  608. u8 secondary_host;
  609. } __packed;
  610. /**
  611. * struct ti_sci_msg_rm_ring_cfg_req - Configure a Navigator Subsystem ring
  612. *
  613. * Configures the non-real-time registers of a Navigator Subsystem ring.
  614. * @hdr: Generic Header
  615. * @valid_params: Bitfield defining validity of ring configuration parameters.
  616. * The ring configuration fields are not valid, and will not be used for
  617. * ring configuration, if their corresponding valid bit is zero.
  618. * Valid bit usage:
  619. * 0 - Valid bit for @tisci_msg_rm_ring_cfg_req addr_lo
  620. * 1 - Valid bit for @tisci_msg_rm_ring_cfg_req addr_hi
  621. * 2 - Valid bit for @tisci_msg_rm_ring_cfg_req count
  622. * 3 - Valid bit for @tisci_msg_rm_ring_cfg_req mode
  623. * 4 - Valid bit for @tisci_msg_rm_ring_cfg_req size
  624. * 5 - Valid bit for @tisci_msg_rm_ring_cfg_req order_id
  625. * 6 - Valid bit for @tisci_msg_rm_ring_cfg_req virtid
  626. * 7 - Valid bit for @tisci_msg_rm_ring_cfg_req ASEL
  627. * @nav_id: Device ID of Navigator Subsystem from which the ring is allocated
  628. * @index: ring index to be configured.
  629. * @addr_lo: 32 LSBs of ring base address to be programmed into the ring's
  630. * RING_BA_LO register
  631. * @addr_hi: 16 MSBs of ring base address to be programmed into the ring's
  632. * RING_BA_HI register.
  633. * @count: Number of ring elements. Must be even if mode is CREDENTIALS or QM
  634. * modes.
  635. * @mode: Specifies the mode the ring is to be configured.
  636. * @size: Specifies encoded ring element size. To calculate the encoded size use
  637. * the formula (log2(size_bytes) - 2), where size_bytes cannot be
  638. * greater than 256.
  639. * @order_id: Specifies the ring's bus order ID.
  640. * @virtid: Ring virt ID value
  641. * @asel: Ring ASEL (address select) value to be set into the ASEL field of the
  642. * ring's RING_BA_HI register.
  643. */
  644. struct ti_sci_msg_rm_ring_cfg_req {
  645. struct ti_sci_msg_hdr hdr;
  646. u32 valid_params;
  647. u16 nav_id;
  648. u16 index;
  649. u32 addr_lo;
  650. u32 addr_hi;
  651. u32 count;
  652. u8 mode;
  653. u8 size;
  654. u8 order_id;
  655. u16 virtid;
  656. u8 asel;
  657. } __packed;
  658. /**
  659. * struct ti_sci_msg_psil_pair - Pairs a PSI-L source thread to a destination
  660. * thread
  661. * @hdr: Generic Header
  662. * @nav_id: SoC Navigator Subsystem device ID whose PSI-L config proxy is
  663. * used to pair the source and destination threads.
  664. * @src_thread: PSI-L source thread ID within the PSI-L System thread map.
  665. *
  666. * UDMAP transmit channels mapped to source threads will have their
  667. * TCHAN_THRD_ID register programmed with the destination thread if the pairing
  668. * is successful.
  669. * @dst_thread: PSI-L destination thread ID within the PSI-L System thread map.
  670. * PSI-L destination threads start at index 0x8000. The request is NACK'd if
  671. * the destination thread is not greater than or equal to 0x8000.
  672. *
  673. * UDMAP receive channels mapped to destination threads will have their
  674. * RCHAN_THRD_ID register programmed with the source thread if the pairing
  675. * is successful.
  676. *
  677. * Request type is TI_SCI_MSG_RM_PSIL_PAIR, response is a generic ACK or NACK
  678. * message.
  679. */
  680. struct ti_sci_msg_psil_pair {
  681. struct ti_sci_msg_hdr hdr;
  682. u32 nav_id;
  683. u32 src_thread;
  684. u32 dst_thread;
  685. } __packed;
  686. /**
  687. * struct ti_sci_msg_psil_unpair - Unpairs a PSI-L source thread from a
  688. * destination thread
  689. * @hdr: Generic Header
  690. * @nav_id: SoC Navigator Subsystem device ID whose PSI-L config proxy is
  691. * used to unpair the source and destination threads.
  692. * @src_thread: PSI-L source thread ID within the PSI-L System thread map.
  693. *
  694. * UDMAP transmit channels mapped to source threads will have their
  695. * TCHAN_THRD_ID register cleared if the unpairing is successful.
  696. *
  697. * @dst_thread: PSI-L destination thread ID within the PSI-L System thread map.
  698. * PSI-L destination threads start at index 0x8000. The request is NACK'd if
  699. * the destination thread is not greater than or equal to 0x8000.
  700. *
  701. * UDMAP receive channels mapped to destination threads will have their
  702. * RCHAN_THRD_ID register cleared if the unpairing is successful.
  703. *
  704. * Request type is TI_SCI_MSG_RM_PSIL_UNPAIR, response is a generic ACK or NACK
  705. * message.
  706. */
  707. struct ti_sci_msg_psil_unpair {
  708. struct ti_sci_msg_hdr hdr;
  709. u32 nav_id;
  710. u32 src_thread;
  711. u32 dst_thread;
  712. } __packed;
  713. /**
  714. * struct ti_sci_msg_udmap_rx_flow_cfg - UDMAP receive flow configuration
  715. * message
  716. * @hdr: Generic Header
  717. * @nav_id: SoC Navigator Subsystem device ID from which the receive flow is
  718. * allocated
  719. * @flow_index: UDMAP receive flow index for non-optional configuration.
  720. * @rx_ch_index: Specifies the index of the receive channel using the flow_index
  721. * @rx_einfo_present: UDMAP receive flow extended packet info present.
  722. * @rx_psinfo_present: UDMAP receive flow PS words present.
  723. * @rx_error_handling: UDMAP receive flow error handling configuration. Valid
  724. * values are TI_SCI_RM_UDMAP_RX_FLOW_ERR_DROP/RETRY.
  725. * @rx_desc_type: UDMAP receive flow descriptor type. It can be one of
  726. * TI_SCI_RM_UDMAP_RX_FLOW_DESC_HOST/MONO.
  727. * @rx_sop_offset: UDMAP receive flow start of packet offset.
  728. * @rx_dest_qnum: UDMAP receive flow destination queue number.
  729. * @rx_ps_location: UDMAP receive flow PS words location.
  730. * 0 - end of packet descriptor
  731. * 1 - Beginning of the data buffer
  732. * @rx_src_tag_hi: UDMAP receive flow source tag high byte constant
  733. * @rx_src_tag_lo: UDMAP receive flow source tag low byte constant
  734. * @rx_dest_tag_hi: UDMAP receive flow destination tag high byte constant
  735. * @rx_dest_tag_lo: UDMAP receive flow destination tag low byte constant
  736. * @rx_src_tag_hi_sel: UDMAP receive flow source tag high byte selector
  737. * @rx_src_tag_lo_sel: UDMAP receive flow source tag low byte selector
  738. * @rx_dest_tag_hi_sel: UDMAP receive flow destination tag high byte selector
  739. * @rx_dest_tag_lo_sel: UDMAP receive flow destination tag low byte selector
  740. * @rx_size_thresh_en: UDMAP receive flow packet size based free buffer queue
  741. * enable. If enabled, the ti_sci_rm_udmap_rx_flow_opt_cfg also need to be
  742. * configured and sent.
  743. * @rx_fdq0_sz0_qnum: UDMAP receive flow free descriptor queue 0.
  744. * @rx_fdq1_qnum: UDMAP receive flow free descriptor queue 1.
  745. * @rx_fdq2_qnum: UDMAP receive flow free descriptor queue 2.
  746. * @rx_fdq3_qnum: UDMAP receive flow free descriptor queue 3.
  747. *
  748. * For detailed information on the settings, see the UDMAP section of the TRM.
  749. */
  750. struct ti_sci_msg_udmap_rx_flow_cfg {
  751. struct ti_sci_msg_hdr hdr;
  752. u32 nav_id;
  753. u32 flow_index;
  754. u32 rx_ch_index;
  755. u8 rx_einfo_present;
  756. u8 rx_psinfo_present;
  757. u8 rx_error_handling;
  758. u8 rx_desc_type;
  759. u16 rx_sop_offset;
  760. u16 rx_dest_qnum;
  761. u8 rx_ps_location;
  762. u8 rx_src_tag_hi;
  763. u8 rx_src_tag_lo;
  764. u8 rx_dest_tag_hi;
  765. u8 rx_dest_tag_lo;
  766. u8 rx_src_tag_hi_sel;
  767. u8 rx_src_tag_lo_sel;
  768. u8 rx_dest_tag_hi_sel;
  769. u8 rx_dest_tag_lo_sel;
  770. u8 rx_size_thresh_en;
  771. u16 rx_fdq0_sz0_qnum;
  772. u16 rx_fdq1_qnum;
  773. u16 rx_fdq2_qnum;
  774. u16 rx_fdq3_qnum;
  775. } __packed;
  776. /**
  777. * struct rm_ti_sci_msg_udmap_rx_flow_opt_cfg - parameters for UDMAP receive
  778. * flow optional configuration
  779. * @hdr: Generic Header
  780. * @nav_id: SoC Navigator Subsystem device ID from which the receive flow is
  781. * allocated
  782. * @flow_index: UDMAP receive flow index for optional configuration.
  783. * @rx_ch_index: Specifies the index of the receive channel using the flow_index
  784. * @rx_size_thresh0: UDMAP receive flow packet size threshold 0.
  785. * @rx_size_thresh1: UDMAP receive flow packet size threshold 1.
  786. * @rx_size_thresh2: UDMAP receive flow packet size threshold 2.
  787. * @rx_fdq0_sz1_qnum: UDMAP receive flow free descriptor queue for size
  788. * threshold 1.
  789. * @rx_fdq0_sz2_qnum: UDMAP receive flow free descriptor queue for size
  790. * threshold 2.
  791. * @rx_fdq0_sz3_qnum: UDMAP receive flow free descriptor queue for size
  792. * threshold 3.
  793. *
  794. * For detailed information on the settings, see the UDMAP section of the TRM.
  795. */
  796. struct rm_ti_sci_msg_udmap_rx_flow_opt_cfg {
  797. struct ti_sci_msg_hdr hdr;
  798. u32 nav_id;
  799. u32 flow_index;
  800. u32 rx_ch_index;
  801. u16 rx_size_thresh0;
  802. u16 rx_size_thresh1;
  803. u16 rx_size_thresh2;
  804. u16 rx_fdq0_sz1_qnum;
  805. u16 rx_fdq0_sz2_qnum;
  806. u16 rx_fdq0_sz3_qnum;
  807. } __packed;
  808. /**
  809. * Configures a Navigator Subsystem UDMAP transmit channel
  810. *
  811. * Configures the non-real-time registers of a Navigator Subsystem UDMAP
  812. * transmit channel. The channel index must be assigned to the host defined
  813. * in the TISCI header via the RM board configuration resource assignment
  814. * range list.
  815. *
  816. * @hdr: Generic Header
  817. *
  818. * @valid_params: Bitfield defining validity of tx channel configuration
  819. * parameters. The tx channel configuration fields are not valid, and will not
  820. * be used for ch configuration, if their corresponding valid bit is zero.
  821. * Valid bit usage:
  822. * 0 - Valid bit for @ref ti_sci_msg_rm_udmap_tx_ch_cfg::tx_pause_on_err
  823. * 1 - Valid bit for @ref ti_sci_msg_rm_udmap_tx_ch_cfg::tx_atype
  824. * 2 - Valid bit for @ref ti_sci_msg_rm_udmap_tx_ch_cfg::tx_chan_type
  825. * 3 - Valid bit for @ref ti_sci_msg_rm_udmap_tx_ch_cfg::tx_fetch_size
  826. * 4 - Valid bit for @ref ti_sci_msg_rm_udmap_tx_ch_cfg::txcq_qnum
  827. * 5 - Valid bit for @ref ti_sci_msg_rm_udmap_tx_ch_cfg::tx_priority
  828. * 6 - Valid bit for @ref ti_sci_msg_rm_udmap_tx_ch_cfg::tx_qos
  829. * 7 - Valid bit for @ref ti_sci_msg_rm_udmap_tx_ch_cfg::tx_orderid
  830. * 8 - Valid bit for @ref ti_sci_msg_rm_udmap_tx_ch_cfg::tx_sched_priority
  831. * 9 - Valid bit for @ref ti_sci_msg_rm_udmap_tx_ch_cfg::tx_filt_einfo
  832. * 10 - Valid bit for @ref ti_sci_msg_rm_udmap_tx_ch_cfg::tx_filt_pswords
  833. * 11 - Valid bit for @ref ti_sci_msg_rm_udmap_tx_ch_cfg::tx_supr_tdpkt
  834. * 12 - Valid bit for @ref ti_sci_msg_rm_udmap_tx_ch_cfg::tx_credit_count
  835. * 13 - Valid bit for @ref ti_sci_msg_rm_udmap_tx_ch_cfg::fdepth
  836. * 14 - Valid bit for @ref ti_sci_msg_rm_udmap_tx_ch_cfg::tx_burst_size
  837. * 15 - Valid bit for @ref ti_sci_msg_rm_udmap_tx_ch_cfg::tx_tdtype
  838. * 16 - Valid bit for @ref ti_sci_msg_rm_udmap_tx_ch_cfg::extended_ch_type
  839. *
  840. * @nav_id: SoC device ID of Navigator Subsystem where tx channel is located
  841. *
  842. * @index: UDMAP transmit channel index.
  843. *
  844. * @tx_pause_on_err: UDMAP transmit channel pause on error configuration to
  845. * be programmed into the tx_pause_on_err field of the channel's TCHAN_TCFG
  846. * register.
  847. *
  848. * @tx_filt_einfo: UDMAP transmit channel extended packet information passing
  849. * configuration to be programmed into the tx_filt_einfo field of the
  850. * channel's TCHAN_TCFG register.
  851. *
  852. * @tx_filt_pswords: UDMAP transmit channel protocol specific word passing
  853. * configuration to be programmed into the tx_filt_pswords field of the
  854. * channel's TCHAN_TCFG register.
  855. *
  856. * @tx_atype: UDMAP transmit channel non Ring Accelerator access pointer
  857. * interpretation configuration to be programmed into the tx_atype field of
  858. * the channel's TCHAN_TCFG register.
  859. *
  860. * @tx_chan_type: UDMAP transmit channel functional channel type and work
  861. * passing mechanism configuration to be programmed into the tx_chan_type
  862. * field of the channel's TCHAN_TCFG register.
  863. *
  864. * @tx_supr_tdpkt: UDMAP transmit channel teardown packet generation suppression
  865. * configuration to be programmed into the tx_supr_tdpkt field of the channel's
  866. * TCHAN_TCFG register.
  867. *
  868. * @tx_fetch_size: UDMAP transmit channel number of 32-bit descriptor words to
  869. * fetch configuration to be programmed into the tx_fetch_size field of the
  870. * channel's TCHAN_TCFG register. The user must make sure to set the maximum
  871. * word count that can pass through the channel for any allowed descriptor type.
  872. *
  873. * @tx_credit_count: UDMAP transmit channel transfer request credit count
  874. * configuration to be programmed into the count field of the TCHAN_TCREDIT
  875. * register. Specifies how many credits for complete TRs are available.
  876. *
  877. * @txcq_qnum: UDMAP transmit channel completion queue configuration to be
  878. * programmed into the txcq_qnum field of the TCHAN_TCQ register. The specified
  879. * completion queue must be assigned to the host, or a subordinate of the host,
  880. * requesting configuration of the transmit channel.
  881. *
  882. * @tx_priority: UDMAP transmit channel transmit priority value to be programmed
  883. * into the priority field of the channel's TCHAN_TPRI_CTRL register.
  884. *
  885. * @tx_qos: UDMAP transmit channel transmit qos value to be programmed into the
  886. * qos field of the channel's TCHAN_TPRI_CTRL register.
  887. *
  888. * @tx_orderid: UDMAP transmit channel bus order id value to be programmed into
  889. * the orderid field of the channel's TCHAN_TPRI_CTRL register.
  890. *
  891. * @fdepth: UDMAP transmit channel FIFO depth configuration to be programmed
  892. * into the fdepth field of the TCHAN_TFIFO_DEPTH register. Sets the number of
  893. * Tx FIFO bytes which are allowed to be stored for the channel. Check the UDMAP
  894. * section of the TRM for restrictions regarding this parameter.
  895. *
  896. * @tx_sched_priority: UDMAP transmit channel tx scheduling priority
  897. * configuration to be programmed into the priority field of the channel's
  898. * TCHAN_TST_SCHED register.
  899. *
  900. * @tx_burst_size: UDMAP transmit channel burst size configuration to be
  901. * programmed into the tx_burst_size field of the TCHAN_TCFG register.
  902. *
  903. * @tx_tdtype: UDMAP transmit channel teardown type configuration to be
  904. * programmed into the tdtype field of the TCHAN_TCFG register:
  905. * 0 - Return immediately
  906. * 1 - Wait for completion message from remote peer
  907. *
  908. * @extended_ch_type: Valid for BCDMA.
  909. * 0 - the channel is split tx channel (tchan)
  910. * 1 - the channel is block copy channel (bchan)
  911. */
  912. struct ti_sci_msg_rm_udmap_tx_ch_cfg_req {
  913. struct ti_sci_msg_hdr hdr;
  914. u32 valid_params;
  915. u16 nav_id;
  916. u16 index;
  917. u8 tx_pause_on_err;
  918. u8 tx_filt_einfo;
  919. u8 tx_filt_pswords;
  920. u8 tx_atype;
  921. u8 tx_chan_type;
  922. u8 tx_supr_tdpkt;
  923. u16 tx_fetch_size;
  924. u8 tx_credit_count;
  925. u16 txcq_qnum;
  926. u8 tx_priority;
  927. u8 tx_qos;
  928. u8 tx_orderid;
  929. u16 fdepth;
  930. u8 tx_sched_priority;
  931. u8 tx_burst_size;
  932. u8 tx_tdtype;
  933. u8 extended_ch_type;
  934. } __packed;
  935. /**
  936. * Configures a Navigator Subsystem UDMAP receive channel
  937. *
  938. * Configures the non-real-time registers of a Navigator Subsystem UDMAP
  939. * receive channel. The channel index must be assigned to the host defined
  940. * in the TISCI header via the RM board configuration resource assignment
  941. * range list.
  942. *
  943. * @hdr: Generic Header
  944. *
  945. * @valid_params: Bitfield defining validity of rx channel configuration
  946. * parameters.
  947. * The rx channel configuration fields are not valid, and will not be used for
  948. * ch configuration, if their corresponding valid bit is zero.
  949. * Valid bit usage:
  950. * 0 - Valid bit for @ti_sci_msg_rm_udmap_rx_ch_cfg_req::rx_pause_on_err
  951. * 1 - Valid bit for @ti_sci_msg_rm_udmap_rx_ch_cfg_req::rx_atype
  952. * 2 - Valid bit for @ti_sci_msg_rm_udmap_rx_ch_cfg_req::rx_chan_type
  953. * 3 - Valid bit for @ti_sci_msg_rm_udmap_rx_ch_cfg_req::rx_fetch_size
  954. * 4 - Valid bit for @ti_sci_msg_rm_udmap_rx_ch_cfg_req::rxcq_qnum
  955. * 5 - Valid bit for @ti_sci_msg_rm_udmap_rx_ch_cfg_req::rx_priority
  956. * 6 - Valid bit for @ti_sci_msg_rm_udmap_rx_ch_cfg_req::rx_qos
  957. * 7 - Valid bit for @ti_sci_msg_rm_udmap_rx_ch_cfg_req::rx_orderid
  958. * 8 - Valid bit for @ti_sci_msg_rm_udmap_rx_ch_cfg_req::rx_sched_priority
  959. * 9 - Valid bit for @ti_sci_msg_rm_udmap_rx_ch_cfg_req::flowid_start
  960. * 10 - Valid bit for @ti_sci_msg_rm_udmap_rx_ch_cfg_req::flowid_cnt
  961. * 11 - Valid bit for @ti_sci_msg_rm_udmap_rx_ch_cfg_req::rx_ignore_short
  962. * 12 - Valid bit for @ti_sci_msg_rm_udmap_rx_ch_cfg_req::rx_ignore_long
  963. * 14 - Valid bit for @ti_sci_msg_rm_udmap_rx_ch_cfg_req::rx_burst_size
  964. *
  965. * @nav_id: SoC device ID of Navigator Subsystem where rx channel is located
  966. *
  967. * @index: UDMAP receive channel index.
  968. *
  969. * @rx_fetch_size: UDMAP receive channel number of 32-bit descriptor words to
  970. * fetch configuration to be programmed into the rx_fetch_size field of the
  971. * channel's RCHAN_RCFG register.
  972. *
  973. * @rxcq_qnum: UDMAP receive channel completion queue configuration to be
  974. * programmed into the rxcq_qnum field of the RCHAN_RCQ register.
  975. * The specified completion queue must be assigned to the host, or a subordinate
  976. * of the host, requesting configuration of the receive channel.
  977. *
  978. * @rx_priority: UDMAP receive channel receive priority value to be programmed
  979. * into the priority field of the channel's RCHAN_RPRI_CTRL register.
  980. *
  981. * @rx_qos: UDMAP receive channel receive qos value to be programmed into the
  982. * qos field of the channel's RCHAN_RPRI_CTRL register.
  983. *
  984. * @rx_orderid: UDMAP receive channel bus order id value to be programmed into
  985. * the orderid field of the channel's RCHAN_RPRI_CTRL register.
  986. *
  987. * @rx_sched_priority: UDMAP receive channel rx scheduling priority
  988. * configuration to be programmed into the priority field of the channel's
  989. * RCHAN_RST_SCHED register.
  990. *
  991. * @flowid_start: UDMAP receive channel additional flows starting index
  992. * configuration to program into the flow_start field of the RCHAN_RFLOW_RNG
  993. * register. Specifies the starting index for flow IDs the receive channel is to
  994. * make use of beyond the default flow. flowid_start and @ref flowid_cnt must be
  995. * set as valid and configured together. The starting flow ID set by
  996. * @ref flowid_cnt must be a flow index within the Navigator Subsystem's subset
  997. * of flows beyond the default flows statically mapped to receive channels.
  998. * The additional flows must be assigned to the host, or a subordinate of the
  999. * host, requesting configuration of the receive channel.
  1000. *
  1001. * @flowid_cnt: UDMAP receive channel additional flows count configuration to
  1002. * program into the flowid_cnt field of the RCHAN_RFLOW_RNG register.
  1003. * This field specifies how many flow IDs are in the additional contiguous range
  1004. * of legal flow IDs for the channel. @ref flowid_start and flowid_cnt must be
  1005. * set as valid and configured together. Disabling the valid_params field bit
  1006. * for flowid_cnt indicates no flow IDs other than the default are to be
  1007. * allocated and used by the receive channel. @ref flowid_start plus flowid_cnt
  1008. * cannot be greater than the number of receive flows in the receive channel's
  1009. * Navigator Subsystem. The additional flows must be assigned to the host, or a
  1010. * subordinate of the host, requesting configuration of the receive channel.
  1011. *
  1012. * @rx_pause_on_err: UDMAP receive channel pause on error configuration to be
  1013. * programmed into the rx_pause_on_err field of the channel's RCHAN_RCFG
  1014. * register.
  1015. *
  1016. * @rx_atype: UDMAP receive channel non Ring Accelerator access pointer
  1017. * interpretation configuration to be programmed into the rx_atype field of the
  1018. * channel's RCHAN_RCFG register.
  1019. *
  1020. * @rx_chan_type: UDMAP receive channel functional channel type and work passing
  1021. * mechanism configuration to be programmed into the rx_chan_type field of the
  1022. * channel's RCHAN_RCFG register.
  1023. *
  1024. * @rx_ignore_short: UDMAP receive channel short packet treatment configuration
  1025. * to be programmed into the rx_ignore_short field of the RCHAN_RCFG register.
  1026. *
  1027. * @rx_ignore_long: UDMAP receive channel long packet treatment configuration to
  1028. * be programmed into the rx_ignore_long field of the RCHAN_RCFG register.
  1029. *
  1030. * @rx_burst_size: UDMAP receive channel burst size configuration to be
  1031. * programmed into the rx_burst_size field of the RCHAN_RCFG register.
  1032. */
  1033. struct ti_sci_msg_rm_udmap_rx_ch_cfg_req {
  1034. struct ti_sci_msg_hdr hdr;
  1035. u32 valid_params;
  1036. u16 nav_id;
  1037. u16 index;
  1038. u16 rx_fetch_size;
  1039. u16 rxcq_qnum;
  1040. u8 rx_priority;
  1041. u8 rx_qos;
  1042. u8 rx_orderid;
  1043. u8 rx_sched_priority;
  1044. u16 flowid_start;
  1045. u16 flowid_cnt;
  1046. u8 rx_pause_on_err;
  1047. u8 rx_atype;
  1048. u8 rx_chan_type;
  1049. u8 rx_ignore_short;
  1050. u8 rx_ignore_long;
  1051. u8 rx_burst_size;
  1052. } __packed;
  1053. /**
  1054. * Configures a Navigator Subsystem UDMAP receive flow
  1055. *
  1056. * Configures a Navigator Subsystem UDMAP receive flow's registers.
  1057. * Configuration does not include the flow registers which handle size-based
  1058. * free descriptor queue routing.
  1059. *
  1060. * The flow index must be assigned to the host defined in the TISCI header via
  1061. * the RM board configuration resource assignment range list.
  1062. *
  1063. * @hdr: Standard TISCI header
  1064. *
  1065. * @valid_params
  1066. * Bitfield defining validity of rx flow configuration parameters. The
  1067. * rx flow configuration fields are not valid, and will not be used for flow
  1068. * configuration, if their corresponding valid bit is zero. Valid bit usage:
  1069. * 0 - Valid bit for @tisci_msg_rm_udmap_flow_cfg_req::rx_einfo_present
  1070. * 1 - Valid bit for @tisci_msg_rm_udmap_flow_cfg_req::rx_psinfo_present
  1071. * 2 - Valid bit for @tisci_msg_rm_udmap_flow_cfg_req::rx_error_handling
  1072. * 3 - Valid bit for @tisci_msg_rm_udmap_flow_cfg_req::rx_desc_type
  1073. * 4 - Valid bit for @tisci_msg_rm_udmap_flow_cfg_req::rx_sop_offset
  1074. * 5 - Valid bit for @tisci_msg_rm_udmap_flow_cfg_req::rx_dest_qnum
  1075. * 6 - Valid bit for @tisci_msg_rm_udmap_flow_cfg_req::rx_src_tag_hi
  1076. * 7 - Valid bit for @tisci_msg_rm_udmap_flow_cfg_req::rx_src_tag_lo
  1077. * 8 - Valid bit for @tisci_msg_rm_udmap_flow_cfg_req::rx_dest_tag_hi
  1078. * 9 - Valid bit for @tisci_msg_rm_udmap_flow_cfg_req::rx_dest_tag_lo
  1079. * 10 - Valid bit for @tisci_msg_rm_udmap_flow_cfg_req::rx_src_tag_hi_sel
  1080. * 11 - Valid bit for @tisci_msg_rm_udmap_flow_cfg_req::rx_src_tag_lo_sel
  1081. * 12 - Valid bit for @tisci_msg_rm_udmap_flow_cfg_req::rx_dest_tag_hi_sel
  1082. * 13 - Valid bit for @tisci_msg_rm_udmap_flow_cfg_req::rx_dest_tag_lo_sel
  1083. * 14 - Valid bit for @tisci_msg_rm_udmap_flow_cfg_req::rx_fdq0_sz0_qnum
  1084. * 15 - Valid bit for @tisci_msg_rm_udmap_flow_cfg_req::rx_fdq1_sz0_qnum
  1085. * 16 - Valid bit for @tisci_msg_rm_udmap_flow_cfg_req::rx_fdq2_sz0_qnum
  1086. * 17 - Valid bit for @tisci_msg_rm_udmap_flow_cfg_req::rx_fdq3_sz0_qnum
  1087. * 18 - Valid bit for @tisci_msg_rm_udmap_flow_cfg_req::rx_ps_location
  1088. *
  1089. * @nav_id: SoC device ID of Navigator Subsystem from which the receive flow is
  1090. * allocated
  1091. *
  1092. * @flow_index: UDMAP receive flow index for non-optional configuration.
  1093. *
  1094. * @rx_einfo_present:
  1095. * UDMAP receive flow extended packet info present configuration to be
  1096. * programmed into the rx_einfo_present field of the flow's RFLOW_RFA register.
  1097. *
  1098. * @rx_psinfo_present:
  1099. * UDMAP receive flow PS words present configuration to be programmed into the
  1100. * rx_psinfo_present field of the flow's RFLOW_RFA register.
  1101. *
  1102. * @rx_error_handling:
  1103. * UDMAP receive flow error handling configuration to be programmed into the
  1104. * rx_error_handling field of the flow's RFLOW_RFA register.
  1105. *
  1106. * @rx_desc_type:
  1107. * UDMAP receive flow descriptor type configuration to be programmed into the
  1108. * rx_desc_type field field of the flow's RFLOW_RFA register.
  1109. *
  1110. * @rx_sop_offset:
  1111. * UDMAP receive flow start of packet offset configuration to be programmed
  1112. * into the rx_sop_offset field of the RFLOW_RFA register. See the UDMAP
  1113. * section of the TRM for more information on this setting. Valid values for
  1114. * this field are 0-255 bytes.
  1115. *
  1116. * @rx_dest_qnum:
  1117. * UDMAP receive flow destination queue configuration to be programmed into the
  1118. * rx_dest_qnum field of the flow's RFLOW_RFA register. The specified
  1119. * destination queue must be valid within the Navigator Subsystem and must be
  1120. * owned by the host, or a subordinate of the host, requesting allocation and
  1121. * configuration of the receive flow.
  1122. *
  1123. * @rx_src_tag_hi:
  1124. * UDMAP receive flow source tag high byte constant configuration to be
  1125. * programmed into the rx_src_tag_hi field of the flow's RFLOW_RFB register.
  1126. * See the UDMAP section of the TRM for more information on this setting.
  1127. *
  1128. * @rx_src_tag_lo:
  1129. * UDMAP receive flow source tag low byte constant configuration to be
  1130. * programmed into the rx_src_tag_lo field of the flow's RFLOW_RFB register.
  1131. * See the UDMAP section of the TRM for more information on this setting.
  1132. *
  1133. * @rx_dest_tag_hi:
  1134. * UDMAP receive flow destination tag high byte constant configuration to be
  1135. * programmed into the rx_dest_tag_hi field of the flow's RFLOW_RFB register.
  1136. * See the UDMAP section of the TRM for more information on this setting.
  1137. *
  1138. * @rx_dest_tag_lo:
  1139. * UDMAP receive flow destination tag low byte constant configuration to be
  1140. * programmed into the rx_dest_tag_lo field of the flow's RFLOW_RFB register.
  1141. * See the UDMAP section of the TRM for more information on this setting.
  1142. *
  1143. * @rx_src_tag_hi_sel:
  1144. * UDMAP receive flow source tag high byte selector configuration to be
  1145. * programmed into the rx_src_tag_hi_sel field of the RFLOW_RFC register. See
  1146. * the UDMAP section of the TRM for more information on this setting.
  1147. *
  1148. * @rx_src_tag_lo_sel:
  1149. * UDMAP receive flow source tag low byte selector configuration to be
  1150. * programmed into the rx_src_tag_lo_sel field of the RFLOW_RFC register. See
  1151. * the UDMAP section of the TRM for more information on this setting.
  1152. *
  1153. * @rx_dest_tag_hi_sel:
  1154. * UDMAP receive flow destination tag high byte selector configuration to be
  1155. * programmed into the rx_dest_tag_hi_sel field of the RFLOW_RFC register. See
  1156. * the UDMAP section of the TRM for more information on this setting.
  1157. *
  1158. * @rx_dest_tag_lo_sel:
  1159. * UDMAP receive flow destination tag low byte selector configuration to be
  1160. * programmed into the rx_dest_tag_lo_sel field of the RFLOW_RFC register. See
  1161. * the UDMAP section of the TRM for more information on this setting.
  1162. *
  1163. * @rx_fdq0_sz0_qnum:
  1164. * UDMAP receive flow free descriptor queue 0 configuration to be programmed
  1165. * into the rx_fdq0_sz0_qnum field of the flow's RFLOW_RFD register. See the
  1166. * UDMAP section of the TRM for more information on this setting. The specified
  1167. * free queue must be valid within the Navigator Subsystem and must be owned
  1168. * by the host, or a subordinate of the host, requesting allocation and
  1169. * configuration of the receive flow.
  1170. *
  1171. * @rx_fdq1_qnum:
  1172. * UDMAP receive flow free descriptor queue 1 configuration to be programmed
  1173. * into the rx_fdq1_qnum field of the flow's RFLOW_RFD register. See the
  1174. * UDMAP section of the TRM for more information on this setting. The specified
  1175. * free queue must be valid within the Navigator Subsystem and must be owned
  1176. * by the host, or a subordinate of the host, requesting allocation and
  1177. * configuration of the receive flow.
  1178. *
  1179. * @rx_fdq2_qnum:
  1180. * UDMAP receive flow free descriptor queue 2 configuration to be programmed
  1181. * into the rx_fdq2_qnum field of the flow's RFLOW_RFE register. See the
  1182. * UDMAP section of the TRM for more information on this setting. The specified
  1183. * free queue must be valid within the Navigator Subsystem and must be owned
  1184. * by the host, or a subordinate of the host, requesting allocation and
  1185. * configuration of the receive flow.
  1186. *
  1187. * @rx_fdq3_qnum:
  1188. * UDMAP receive flow free descriptor queue 3 configuration to be programmed
  1189. * into the rx_fdq3_qnum field of the flow's RFLOW_RFE register. See the
  1190. * UDMAP section of the TRM for more information on this setting. The specified
  1191. * free queue must be valid within the Navigator Subsystem and must be owned
  1192. * by the host, or a subordinate of the host, requesting allocation and
  1193. * configuration of the receive flow.
  1194. *
  1195. * @rx_ps_location:
  1196. * UDMAP receive flow PS words location configuration to be programmed into the
  1197. * rx_ps_location field of the flow's RFLOW_RFA register.
  1198. */
  1199. struct ti_sci_msg_rm_udmap_flow_cfg_req {
  1200. struct ti_sci_msg_hdr hdr;
  1201. u32 valid_params;
  1202. u16 nav_id;
  1203. u16 flow_index;
  1204. u8 rx_einfo_present;
  1205. u8 rx_psinfo_present;
  1206. u8 rx_error_handling;
  1207. u8 rx_desc_type;
  1208. u16 rx_sop_offset;
  1209. u16 rx_dest_qnum;
  1210. u8 rx_src_tag_hi;
  1211. u8 rx_src_tag_lo;
  1212. u8 rx_dest_tag_hi;
  1213. u8 rx_dest_tag_lo;
  1214. u8 rx_src_tag_hi_sel;
  1215. u8 rx_src_tag_lo_sel;
  1216. u8 rx_dest_tag_hi_sel;
  1217. u8 rx_dest_tag_lo_sel;
  1218. u16 rx_fdq0_sz0_qnum;
  1219. u16 rx_fdq1_qnum;
  1220. u16 rx_fdq2_qnum;
  1221. u16 rx_fdq3_qnum;
  1222. u8 rx_ps_location;
  1223. } __packed;
  1224. /**
  1225. * struct ti_sci_msg_req_proc_request - Request a processor
  1226. * @hdr: Generic Header
  1227. * @processor_id: ID of processor being requested
  1228. *
  1229. * Request type is TI_SCI_MSG_PROC_REQUEST, response is a generic ACK/NACK
  1230. * message.
  1231. */
  1232. struct ti_sci_msg_req_proc_request {
  1233. struct ti_sci_msg_hdr hdr;
  1234. u8 processor_id;
  1235. } __packed;
  1236. /**
  1237. * struct ti_sci_msg_req_proc_release - Release a processor
  1238. * @hdr: Generic Header
  1239. * @processor_id: ID of processor being released
  1240. *
  1241. * Request type is TI_SCI_MSG_PROC_RELEASE, response is a generic ACK/NACK
  1242. * message.
  1243. */
  1244. struct ti_sci_msg_req_proc_release {
  1245. struct ti_sci_msg_hdr hdr;
  1246. u8 processor_id;
  1247. } __packed;
  1248. /**
  1249. * struct ti_sci_msg_req_proc_handover - Handover a processor to a host
  1250. * @hdr: Generic Header
  1251. * @processor_id: ID of processor being handed over
  1252. * @host_id: Host ID the control needs to be transferred to
  1253. *
  1254. * Request type is TI_SCI_MSG_PROC_HANDOVER, response is a generic ACK/NACK
  1255. * message.
  1256. */
  1257. struct ti_sci_msg_req_proc_handover {
  1258. struct ti_sci_msg_hdr hdr;
  1259. u8 processor_id;
  1260. u8 host_id;
  1261. } __packed;
  1262. /* Boot Vector masks */
  1263. #define TI_SCI_ADDR_LOW_MASK GENMASK_ULL(31, 0)
  1264. #define TI_SCI_ADDR_HIGH_MASK GENMASK_ULL(63, 32)
  1265. #define TI_SCI_ADDR_HIGH_SHIFT 32
  1266. /**
  1267. * struct ti_sci_msg_req_set_config - Set Processor boot configuration
  1268. * @hdr: Generic Header
  1269. * @processor_id: ID of processor being configured
  1270. * @bootvector_low: Lower 32 bit address (Little Endian) of boot vector
  1271. * @bootvector_high: Higher 32 bit address (Little Endian) of boot vector
  1272. * @config_flags_set: Optional Processor specific Config Flags to set.
  1273. * Setting a bit here implies the corresponding mode
  1274. * will be set
  1275. * @config_flags_clear: Optional Processor specific Config Flags to clear.
  1276. * Setting a bit here implies the corresponding mode
  1277. * will be cleared
  1278. *
  1279. * Request type is TI_SCI_MSG_PROC_HANDOVER, response is a generic ACK/NACK
  1280. * message.
  1281. */
  1282. struct ti_sci_msg_req_set_config {
  1283. struct ti_sci_msg_hdr hdr;
  1284. u8 processor_id;
  1285. u32 bootvector_low;
  1286. u32 bootvector_high;
  1287. u32 config_flags_set;
  1288. u32 config_flags_clear;
  1289. } __packed;
  1290. /**
  1291. * struct ti_sci_msg_req_set_ctrl - Set Processor boot control flags
  1292. * @hdr: Generic Header
  1293. * @processor_id: ID of processor being configured
  1294. * @control_flags_set: Optional Processor specific Control Flags to set.
  1295. * Setting a bit here implies the corresponding mode
  1296. * will be set
  1297. * @control_flags_clear:Optional Processor specific Control Flags to clear.
  1298. * Setting a bit here implies the corresponding mode
  1299. * will be cleared
  1300. *
  1301. * Request type is TI_SCI_MSG_SET_CTRL, response is a generic ACK/NACK
  1302. * message.
  1303. */
  1304. struct ti_sci_msg_req_set_ctrl {
  1305. struct ti_sci_msg_hdr hdr;
  1306. u8 processor_id;
  1307. u32 control_flags_set;
  1308. u32 control_flags_clear;
  1309. } __packed;
  1310. /**
  1311. * struct ti_sci_msg_req_get_status - Processor boot status request
  1312. * @hdr: Generic Header
  1313. * @processor_id: ID of processor whose status is being requested
  1314. *
  1315. * Request type is TI_SCI_MSG_GET_STATUS, response is an appropriate
  1316. * message, or NACK in case of inability to satisfy request.
  1317. */
  1318. struct ti_sci_msg_req_get_status {
  1319. struct ti_sci_msg_hdr hdr;
  1320. u8 processor_id;
  1321. } __packed;
  1322. /**
  1323. * struct ti_sci_msg_resp_get_status - Processor boot status response
  1324. * @hdr: Generic Header
  1325. * @processor_id: ID of processor whose status is returned
  1326. * @bootvector_low: Lower 32 bit address (Little Endian) of boot vector
  1327. * @bootvector_high: Higher 32 bit address (Little Endian) of boot vector
  1328. * @config_flags: Optional Processor specific Config Flags set currently
  1329. * @control_flags: Optional Processor specific Control Flags set currently
  1330. * @status_flags: Optional Processor specific Status Flags set currently
  1331. *
  1332. * Response structure to a TI_SCI_MSG_GET_STATUS request.
  1333. */
  1334. struct ti_sci_msg_resp_get_status {
  1335. struct ti_sci_msg_hdr hdr;
  1336. u8 processor_id;
  1337. u32 bootvector_low;
  1338. u32 bootvector_high;
  1339. u32 config_flags;
  1340. u32 control_flags;
  1341. u32 status_flags;
  1342. } __packed;
  1343. #endif /* __TI_SCI_H */