AM64x MCU+ SDK  08.02.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 
61 #define TISCI_MSG_VALUE_CLOCK_SW_STATE_UNREQ 0
62 
69 #define TISCI_MSG_VALUE_CLOCK_SW_STATE_AUTO 1
70 
72 #define TISCI_MSG_VALUE_CLOCK_SW_STATE_REQ 2
73 
75 #define TISCI_MSG_VALUE_CLOCK_HW_STATE_NOT_READY 0
76 
78 #define TISCI_MSG_VALUE_CLOCK_HW_STATE_READY 1
79 
83 #define TISCI_MSG_FLAG_CLOCK_ALLOW_SSC TISCI_BIT(8)
84 
89 #define TISCI_MSG_FLAG_CLOCK_ALLOW_FREQ_CHANGE TISCI_BIT(9)
90 
95 #define TISCI_MSG_FLAG_CLOCK_INPUT_TERM TISCI_BIT(10)
96 
100 #define TISCI_MSG_FLAG_CLOCK_SSC_ACTIVE TISCI_BIT(11)
101 
139  struct tisci_header hdr;
140  uint32_t device;
141  uint8_t clk;
142  uint8_t state;
143  uint32_t clk32;
144 } __attribute__((__packed__));
145 
155  struct tisci_header hdr;
156 } __attribute__((__packed__));
157 
181  struct tisci_header hdr;
182  uint32_t device;
183  uint8_t clk;
184  uint32_t clk32;
185 } __attribute__((__packed__));
186 
202  struct tisci_header hdr;
204  uint8_t current_state;
205 } __attribute__((__packed__));
206 
253  struct tisci_header hdr;
254  uint32_t device;
255  uint8_t clk;
256  uint8_t parent;
257  uint32_t clk32;
258  uint32_t parent32;
259 } __attribute__((__packed__));
260 
270  struct tisci_header hdr;
271 } __attribute__((__packed__));
272 
301  struct tisci_header hdr;
302  uint32_t device;
303  uint8_t clk;
304  uint32_t clk32;
305 } __attribute__((__packed__));
306 
324  struct tisci_header hdr;
325  uint8_t parent;
326  uint32_t parent32;
327 } __attribute__((__packed__));
328 
352  struct tisci_header hdr;
353  uint32_t device;
354  uint8_t clk;
355  uint32_t clk32;
356 } __attribute__((__packed__));
357 
375  struct tisci_header hdr;
376  uint8_t num_parents;
378 } __attribute__((__packed__));
379 
431  struct tisci_header hdr;
432  uint32_t device;
433  uint64_t min_freq_hz;
434  uint64_t target_freq_hz;
435  uint64_t max_freq_hz;
436  uint8_t clk;
437  uint32_t clk32;
438 } __attribute__((__packed__));
439 
449  struct tisci_header hdr;
450 } __attribute__((__packed__));
451 
493  struct tisci_header hdr;
494  uint32_t device;
495  uint64_t min_freq_hz;
496  uint64_t target_freq_hz;
497  uint64_t max_freq_hz;
498  uint8_t clk;
499  uint32_t clk32;
500 } __attribute__((__packed__));
501 
511  struct tisci_header hdr;
512  uint64_t freq_hz;
513 } __attribute__((__packed__));
514 
541  struct tisci_header hdr;
542  uint32_t device;
543  uint8_t clk;
544  uint32_t clk32;
545 } __attribute__((__packed__));
546 
556  struct tisci_header hdr;
557  uint64_t freq_hz;
558 } __attribute__((__packed__));
559 
560 #endif /* TISCI_PM_TISCI_CLOCK_H */
561 
tisci_msg_get_num_clock_parents_req::clk
uint8_t clk
Definition: tisci_pm_clock.h:354
tisci_msg_get_freq_req::clk32
uint32_t clk32
Definition: tisci_pm_clock.h:544
tisci_msg_set_freq_resp
Empty response for TISCI_MSG_SET_FREQ.
Definition: tisci_pm_clock.h:448
__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:377
tisci_msg_get_freq_resp::freq_hz
uint64_t freq_hz
Definition: tisci_pm_clock.h:557
tisci_msg_get_freq_resp
Result of get frequency request.
Definition: tisci_pm_clock.h:555
tisci_msg_set_clock_parent_req::clk32
uint32_t clk32
Definition: tisci_pm_clock.h:257
tisci_msg_get_freq_resp::hdr
struct tisci_header hdr
Definition: tisci_pm_clock.h:556
tisci_msg_set_clock_parent_resp::hdr
struct tisci_header hdr
Definition: tisci_pm_clock.h:270
tisci_msg_set_freq_resp::hdr
struct tisci_header hdr
Definition: tisci_pm_clock.h:449
tisci_msg_get_freq_req
Get the current frequency of a device's clock.
Definition: tisci_pm_clock.h:540
tisci_msg_get_num_clock_parents_resp::num_parents
uint8_t num_parents
Definition: tisci_pm_clock.h:376
tisci_msg_query_freq_req::target_freq_hz
uint64_t target_freq_hz
Definition: tisci_pm_clock.h:496
tisci_msg_get_clock_resp
Clock state response.
Definition: tisci_pm_clock.h:201
tisci_msg_get_num_clock_parents_resp
Num clock parents response.
Definition: tisci_pm_clock.h:374
tisci_msg_get_clock_req::hdr
struct tisci_header hdr
Definition: tisci_pm_clock.h:181
tisci_msg_get_clock_parent_req::clk
uint8_t clk
Definition: tisci_pm_clock.h:303
tisci_msg_set_clock_req::device
uint32_t device
Definition: tisci_pm_clock.h:140
tisci_msg_get_num_clock_parents_req::hdr
struct tisci_header hdr
Definition: tisci_pm_clock.h:352
tisci_msg_query_freq_req::max_freq_hz
uint64_t max_freq_hz
Definition: tisci_pm_clock.h:497
tisci_msg_get_num_clock_parents_req
Return the number of possible parents for a clock.
Definition: tisci_pm_clock.h:351
tisci_msg_get_clock_parent_resp::parent32
uint32_t parent32
Definition: tisci_pm_clock.h:326
tisci_msg_query_freq_req
Determine the result of a hypothetical set frequency operation.
Definition: tisci_pm_clock.h:492
tisci_msg_query_freq_req::clk32
uint32_t clk32
Definition: tisci_pm_clock.h:499
tisci_msg_get_freq_req::hdr
struct tisci_header hdr
Definition: tisci_pm_clock.h:541
tisci_msg_get_freq_req::device
uint32_t device
Definition: tisci_pm_clock.h:542
tisci_msg_set_freq_req::device
uint32_t device
Definition: tisci_pm_clock.h:432
tisci_msg_get_clock_parent_resp::parent
uint8_t parent
Definition: tisci_pm_clock.h:325
tisci_msg_set_clock_req::clk32
uint32_t clk32
Definition: tisci_pm_clock.h:143
tisci_msg_set_clock_parent_req::clk
uint8_t clk
Definition: tisci_pm_clock.h:255
tisci_header
Header that prefixes all TISCI messages.
Definition: tisci_protocol.h:89
tisci_msg_query_freq_resp::freq_hz
uint64_t freq_hz
Definition: tisci_pm_clock.h:512
tisci_msg_get_num_clock_parents_req::device
uint32_t device
Definition: tisci_pm_clock.h:353
tisci_msg_get_clock_resp::hdr
struct tisci_header hdr
Definition: tisci_pm_clock.h:202
tisci_msg_set_clock_parent_req
Set the clock parent.
Definition: tisci_pm_clock.h:252
tisci_msg_get_clock_resp::programmed_state
uint8_t programmed_state
Definition: tisci_pm_clock.h:203
tisci_msg_set_clock_req::hdr
struct tisci_header hdr
Definition: tisci_pm_clock.h:139
tisci_msg_set_freq_req::max_freq_hz
uint64_t max_freq_hz
Definition: tisci_pm_clock.h:435
tisci_msg_query_freq_req::min_freq_hz
uint64_t min_freq_hz
Definition: tisci_pm_clock.h:495
tisci_msg_get_clock_parent_req::hdr
struct tisci_header hdr
Definition: tisci_pm_clock.h:301
tisci_msg_set_freq_req::min_freq_hz
uint64_t min_freq_hz
Definition: tisci_pm_clock.h:433
tisci_msg_set_clock_req
Mark a clock as required/not required.
Definition: tisci_pm_clock.h:138
tisci_msg_set_clock_parent_req::device
uint32_t device
Definition: tisci_pm_clock.h:254
tisci_msg_get_clock_parent_resp::hdr
struct tisci_header hdr
Definition: tisci_pm_clock.h:324
tisci_msg_query_freq_req::device
uint32_t device
Definition: tisci_pm_clock.h:494
tisci_msg_set_clock_req::clk
uint8_t clk
Definition: tisci_pm_clock.h:141
tisci_msg_get_clock_parent_req::device
uint32_t device
Definition: tisci_pm_clock.h:302
tisci_msg_get_clock_parent_req
Return the current clock parent.
Definition: tisci_pm_clock.h:300
tisci_msg_query_freq_resp::hdr
struct tisci_header hdr
Definition: tisci_pm_clock.h:511
tisci_msg_get_clock_parent_resp
Clock parent response.
Definition: tisci_pm_clock.h:323
tisci_msg_set_clock_resp
Empty response for TISCI_MSG_SET_CLOCK.
Definition: tisci_pm_clock.h:154
tisci_msg_get_clock_req
Get the current state of a clock.
Definition: tisci_pm_clock.h:180
tisci_msg_set_clock_parent_resp
Empty response for TISCI_MSG_SET_CLOCK_PARENT.
Definition: tisci_pm_clock.h:269
tisci_msg_set_clock_parent_req::hdr
struct tisci_header hdr
Definition: tisci_pm_clock.h:253
tisci_msg_query_freq_req::clk
uint8_t clk
Definition: tisci_pm_clock.h:498
tisci_msg_get_clock_req::clk32
uint32_t clk32
Definition: tisci_pm_clock.h:184
tisci_msg_get_clock_parent_req::clk32
uint32_t clk32
Definition: tisci_pm_clock.h:304
tisci_msg_get_num_clock_parents_resp::hdr
struct tisci_header hdr
Definition: tisci_pm_clock.h:375
tisci_msg_get_clock_req::clk
uint8_t clk
Definition: tisci_pm_clock.h:183
tisci_msg_set_freq_req::clk
uint8_t clk
Definition: tisci_pm_clock.h:436
tisci_msg_set_clock_resp::hdr
struct tisci_header hdr
Definition: tisci_pm_clock.h:155
tisci_msg_get_freq_req::clk
uint8_t clk
Definition: tisci_pm_clock.h:543
tisci_msg_set_freq_req::hdr
struct tisci_header hdr
Definition: tisci_pm_clock.h:431
tisci_msg_query_freq_req::hdr
struct tisci_header hdr
Definition: tisci_pm_clock.h:493
tisci_msg_get_num_clock_parents_req::clk32
uint32_t clk32
Definition: tisci_pm_clock.h:355
tisci_msg_set_freq_req
Set the desired frequency for a clock.
Definition: tisci_pm_clock.h:430
tisci_msg_set_clock_req::state
uint8_t state
Definition: tisci_pm_clock.h:142
tisci_msg_get_clock_req::device
uint32_t device
Definition: tisci_pm_clock.h:182
tisci_msg_set_freq_req::target_freq_hz
uint64_t target_freq_hz
Definition: tisci_pm_clock.h:434
tisci_msg_get_clock_resp::current_state
uint8_t current_state
Definition: tisci_pm_clock.h:204
tisci_msg_query_freq_resp
Result of a query operation.
Definition: tisci_pm_clock.h:510
tisci_msg_set_clock_parent_req::parent
uint8_t parent
Definition: tisci_pm_clock.h:256
tisci_msg_set_freq_req::clk32
uint32_t clk32
Definition: tisci_pm_clock.h:437
tisci_msg_set_clock_parent_req::parent32
uint32_t parent32
Definition: tisci_pm_clock.h:258