AM62x MCU+ SDK  08.04.00
tisci_pm_clock.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2017-2022 Texas Instruments Incorporated
3  *
4  * Redistribution and use in source and binary forms, with or without
5  * modification, are permitted provided that the following conditions
6  * are met:
7  *
8  * Redistributions of source code must retain the above copyright
9  * notice, this list of conditions and the following disclaimer.
10  *
11  * Redistributions in binary form must reproduce the above copyright
12  * notice, this list of conditions and the following disclaimer in the
13  * documentation and/or other materials provided with the
14  * distribution.
15  *
16  * Neither the name of Texas Instruments Incorporated nor the names of
17  * its contributors may be used to endorse or promote products derived
18  * from this software without specific prior written permission.
19  *
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31  *
32  */
53 #ifndef TISCI_PM_TISCI_CLOCK_H
54 #define TISCI_PM_TISCI_CLOCK_H
55 
56 #ifdef __cplusplus
57 extern "C"
58 {
59 #endif
60 
61 
62 
67 #define TISCI_MSG_VALUE_CLOCK_SW_STATE_UNREQ 0
68 
75 #define TISCI_MSG_VALUE_CLOCK_SW_STATE_AUTO 1
76 
78 #define TISCI_MSG_VALUE_CLOCK_SW_STATE_REQ 2
79 
81 #define TISCI_MSG_VALUE_CLOCK_HW_STATE_NOT_READY 0
82 
84 #define TISCI_MSG_VALUE_CLOCK_HW_STATE_READY 1
85 
89 #define TISCI_MSG_FLAG_CLOCK_ALLOW_SSC TISCI_BIT(8)
90 
95 #define TISCI_MSG_FLAG_CLOCK_ALLOW_FREQ_CHANGE TISCI_BIT(9)
96 
101 #define TISCI_MSG_FLAG_CLOCK_INPUT_TERM TISCI_BIT(10)
102 
106 #define TISCI_MSG_FLAG_CLOCK_SSC_ACTIVE TISCI_BIT(11)
107 
145  struct tisci_header hdr;
146  uint32_t device;
147  uint8_t clk;
148  uint8_t state;
149  uint32_t clk32;
150 } __attribute__((__packed__));
151 
161  struct tisci_header hdr;
162 } __attribute__((__packed__));
163 
187  struct tisci_header hdr;
188  uint32_t device;
189  uint8_t clk;
190  uint32_t clk32;
191 } __attribute__((__packed__));
192 
208  struct tisci_header hdr;
210  uint8_t current_state;
211 } __attribute__((__packed__));
212 
259  struct tisci_header hdr;
260  uint32_t device;
261  uint8_t clk;
262  uint8_t parent;
263  uint32_t clk32;
264  uint32_t parent32;
265 } __attribute__((__packed__));
266 
276  struct tisci_header hdr;
277 } __attribute__((__packed__));
278 
307  struct tisci_header hdr;
308  uint32_t device;
309  uint8_t clk;
310  uint32_t clk32;
311 } __attribute__((__packed__));
312 
330  struct tisci_header hdr;
331  uint8_t parent;
332  uint32_t parent32;
333 } __attribute__((__packed__));
334 
358  struct tisci_header hdr;
359  uint32_t device;
360  uint8_t clk;
361  uint32_t clk32;
362 } __attribute__((__packed__));
363 
381  struct tisci_header hdr;
382  uint8_t num_parents;
384 } __attribute__((__packed__));
385 
437  struct tisci_header hdr;
438  uint32_t device;
439  uint64_t min_freq_hz;
440  uint64_t target_freq_hz;
441  uint64_t max_freq_hz;
442  uint8_t clk;
443  uint32_t clk32;
444 } __attribute__((__packed__));
445 
455  struct tisci_header hdr;
456 } __attribute__((__packed__));
457 
499  struct tisci_header hdr;
500  uint32_t device;
501  uint64_t min_freq_hz;
502  uint64_t target_freq_hz;
503  uint64_t max_freq_hz;
504  uint8_t clk;
505  uint32_t clk32;
506 } __attribute__((__packed__));
507 
517  struct tisci_header hdr;
518  uint64_t freq_hz;
519 } __attribute__((__packed__));
520 
547  struct tisci_header hdr;
548  uint32_t device;
549  uint8_t clk;
550  uint32_t clk32;
551 } __attribute__((__packed__));
552 
562  struct tisci_header hdr;
563  uint64_t freq_hz;
564 } __attribute__((__packed__));
565 
566 
567 #ifdef __cplusplus
568 }
569 #endif
570 
571 #endif /* TISCI_PM_TISCI_CLOCK_H */
572 
tisci_msg_get_num_clock_parents_req::clk
uint8_t clk
Definition: tisci_pm_clock.h:360
tisci_msg_get_freq_req::clk32
uint32_t clk32
Definition: tisci_pm_clock.h:550
tisci_msg_set_freq_resp
Empty response for TISCI_MSG_SET_FREQ.
Definition: tisci_pm_clock.h:454
__attribute__
struct tisci_msg_set_clock_req __attribute__((__packed__))
tisci_msg_get_num_clock_parents_resp::num_parentint32_t
uint32_t num_parentint32_t
Definition: tisci_pm_clock.h:383
tisci_msg_get_freq_resp::freq_hz
uint64_t freq_hz
Definition: tisci_pm_clock.h:563
tisci_msg_get_freq_resp
Result of get frequency request.
Definition: tisci_pm_clock.h:561
tisci_msg_set_clock_parent_req::clk32
uint32_t clk32
Definition: tisci_pm_clock.h:263
tisci_msg_get_freq_resp::hdr
struct tisci_header hdr
Definition: tisci_pm_clock.h:562
tisci_msg_set_clock_parent_resp::hdr
struct tisci_header hdr
Definition: tisci_pm_clock.h:276
tisci_msg_set_freq_resp::hdr
struct tisci_header hdr
Definition: tisci_pm_clock.h:455
tisci_msg_get_freq_req
Get the current frequency of a device's clock.
Definition: tisci_pm_clock.h:546
tisci_msg_get_num_clock_parents_resp::num_parents
uint8_t num_parents
Definition: tisci_pm_clock.h:382
tisci_msg_query_freq_req::target_freq_hz
uint64_t target_freq_hz
Definition: tisci_pm_clock.h:502
tisci_msg_get_clock_resp
Clock state response.
Definition: tisci_pm_clock.h:207
tisci_msg_get_num_clock_parents_resp
Num clock parents response.
Definition: tisci_pm_clock.h:380
tisci_msg_get_clock_req::hdr
struct tisci_header hdr
Definition: tisci_pm_clock.h:187
tisci_msg_get_clock_parent_req::clk
uint8_t clk
Definition: tisci_pm_clock.h:309
tisci_msg_set_clock_req::device
uint32_t device
Definition: tisci_pm_clock.h:146
tisci_msg_get_num_clock_parents_req::hdr
struct tisci_header hdr
Definition: tisci_pm_clock.h:358
tisci_msg_query_freq_req::max_freq_hz
uint64_t max_freq_hz
Definition: tisci_pm_clock.h:503
tisci_msg_get_num_clock_parents_req
Return the number of possible parents for a clock.
Definition: tisci_pm_clock.h:357
tisci_msg_get_clock_parent_resp::parent32
uint32_t parent32
Definition: tisci_pm_clock.h:332
tisci_msg_query_freq_req
Determine the result of a hypothetical set frequency operation.
Definition: tisci_pm_clock.h:498
tisci_msg_query_freq_req::clk32
uint32_t clk32
Definition: tisci_pm_clock.h:505
tisci_msg_get_freq_req::hdr
struct tisci_header hdr
Definition: tisci_pm_clock.h:547
tisci_msg_get_freq_req::device
uint32_t device
Definition: tisci_pm_clock.h:548
tisci_msg_set_freq_req::device
uint32_t device
Definition: tisci_pm_clock.h:438
tisci_msg_get_clock_parent_resp::parent
uint8_t parent
Definition: tisci_pm_clock.h:331
tisci_msg_set_clock_req::clk32
uint32_t clk32
Definition: tisci_pm_clock.h:149
tisci_msg_set_clock_parent_req::clk
uint8_t clk
Definition: tisci_pm_clock.h:261
tisci_header
Header that prefixes all TISCI messages.
Definition: tisci_protocol.h:95
tisci_msg_query_freq_resp::freq_hz
uint64_t freq_hz
Definition: tisci_pm_clock.h:518
tisci_msg_get_num_clock_parents_req::device
uint32_t device
Definition: tisci_pm_clock.h:359
tisci_msg_get_clock_resp::hdr
struct tisci_header hdr
Definition: tisci_pm_clock.h:208
tisci_msg_set_clock_parent_req
Set the clock parent.
Definition: tisci_pm_clock.h:258
tisci_msg_get_clock_resp::programmed_state
uint8_t programmed_state
Definition: tisci_pm_clock.h:209
tisci_msg_set_clock_req::hdr
struct tisci_header hdr
Definition: tisci_pm_clock.h:145
tisci_msg_set_freq_req::max_freq_hz
uint64_t max_freq_hz
Definition: tisci_pm_clock.h:441
tisci_msg_query_freq_req::min_freq_hz
uint64_t min_freq_hz
Definition: tisci_pm_clock.h:501
tisci_msg_get_clock_parent_req::hdr
struct tisci_header hdr
Definition: tisci_pm_clock.h:307
tisci_msg_set_freq_req::min_freq_hz
uint64_t min_freq_hz
Definition: tisci_pm_clock.h:439
tisci_msg_set_clock_req
Mark a clock as required/not required.
Definition: tisci_pm_clock.h:144
tisci_msg_set_clock_parent_req::device
uint32_t device
Definition: tisci_pm_clock.h:260
tisci_msg_get_clock_parent_resp::hdr
struct tisci_header hdr
Definition: tisci_pm_clock.h:330
tisci_msg_query_freq_req::device
uint32_t device
Definition: tisci_pm_clock.h:500
tisci_msg_set_clock_req::clk
uint8_t clk
Definition: tisci_pm_clock.h:147
tisci_msg_get_clock_parent_req::device
uint32_t device
Definition: tisci_pm_clock.h:308
tisci_msg_get_clock_parent_req
Return the current clock parent.
Definition: tisci_pm_clock.h:306
tisci_msg_query_freq_resp::hdr
struct tisci_header hdr
Definition: tisci_pm_clock.h:517
tisci_msg_get_clock_parent_resp
Clock parent response.
Definition: tisci_pm_clock.h:329
tisci_msg_set_clock_resp
Empty response for TISCI_MSG_SET_CLOCK.
Definition: tisci_pm_clock.h:160
tisci_msg_get_clock_req
Get the current state of a clock.
Definition: tisci_pm_clock.h:186
tisci_msg_set_clock_parent_resp
Empty response for TISCI_MSG_SET_CLOCK_PARENT.
Definition: tisci_pm_clock.h:275
tisci_msg_set_clock_parent_req::hdr
struct tisci_header hdr
Definition: tisci_pm_clock.h:259
tisci_msg_query_freq_req::clk
uint8_t clk
Definition: tisci_pm_clock.h:504
tisci_msg_get_clock_req::clk32
uint32_t clk32
Definition: tisci_pm_clock.h:190
tisci_msg_get_clock_parent_req::clk32
uint32_t clk32
Definition: tisci_pm_clock.h:310
tisci_msg_get_num_clock_parents_resp::hdr
struct tisci_header hdr
Definition: tisci_pm_clock.h:381
tisci_msg_get_clock_req::clk
uint8_t clk
Definition: tisci_pm_clock.h:189
tisci_msg_set_freq_req::clk
uint8_t clk
Definition: tisci_pm_clock.h:442
tisci_msg_set_clock_resp::hdr
struct tisci_header hdr
Definition: tisci_pm_clock.h:161
tisci_msg_get_freq_req::clk
uint8_t clk
Definition: tisci_pm_clock.h:549
tisci_msg_set_freq_req::hdr
struct tisci_header hdr
Definition: tisci_pm_clock.h:437
tisci_msg_query_freq_req::hdr
struct tisci_header hdr
Definition: tisci_pm_clock.h:499
tisci_msg_get_num_clock_parents_req::clk32
uint32_t clk32
Definition: tisci_pm_clock.h:361
tisci_msg_set_freq_req
Set the desired frequency for a clock.
Definition: tisci_pm_clock.h:436
tisci_msg_set_clock_req::state
uint8_t state
Definition: tisci_pm_clock.h:148
tisci_msg_get_clock_req::device
uint32_t device
Definition: tisci_pm_clock.h:188
tisci_msg_set_freq_req::target_freq_hz
uint64_t target_freq_hz
Definition: tisci_pm_clock.h:440
tisci_msg_get_clock_resp::current_state
uint8_t current_state
Definition: tisci_pm_clock.h:210
tisci_msg_query_freq_resp
Result of a query operation.
Definition: tisci_pm_clock.h:516
tisci_msg_set_clock_parent_req::parent
uint8_t parent
Definition: tisci_pm_clock.h:262
tisci_msg_set_freq_req::clk32
uint32_t clk32
Definition: tisci_pm_clock.h:443
tisci_msg_set_clock_parent_req::parent32
uint32_t parent32
Definition: tisci_pm_clock.h:264