1 /*
2  * Arm SCP/MCP Software
3  * Copyright (c) 2020-2021, Arm Limited and Contributors. All rights reserved.
4  *
5  * SPDX-License-Identifier: BSD-3-Clause
6  *
7  * Description:
8  *     Juno Debug module.
9  */
10 
11 #ifndef MOD_JUNO_DEBUG_H
12 #define MOD_JUNO_DEBUG_H
13 
14 #include <fwk_id.h>
15 
16 #include <stdint.h>
17 
18 /*!
19  * \brief Element-specific clock configuration.
20  */
21 struct juno_css_debug_dev {
22     /*! Divider for ATCLK */
23     uint32_t div_atclk;
24 
25     /*! Divider for TRACECLK */
26     uint32_t div_traceclk;
27 
28     /*! Divider for PCLK */
29     uint32_t div_pclk;
30 
31     /*! Flag indicating whether manual reset is required */
32     bool manual_reset_required;
33 };
34 
35 /*!
36  * \brief Element configuration.
37  */
38 struct mod_juno_debug_dev_config {
39     /*! Pointer to device-specific clock settings */
40     struct juno_css_debug_dev *clk_settings;
41 
42     /*! Identifier of the DBGSYS power domain */
43     fwk_id_t pd_dbgsys_id;
44 
45     /*! Identifier of the BIG_SSTOP power domain */
46     fwk_id_t pd_big_sstop_id;
47 
48     /*! Identifier of the LITTLE_SSTOP power domain */
49     fwk_id_t pd_little_sstop_id;
50 };
51 
52 /*!
53  * \brief Module configuration.
54  */
55 struct mod_juno_debug_config {
56     /*!
57      * \brief Identifier of the timer.
58      *
59      * \details Used for time-out when applying clock settings.
60      */
61     fwk_id_t timer_id;
62 };
63 
64 /*!
65  * \brief Juno Debug API indices.
66  */
67 enum mod_juno_debug_api_idx {
68     /*! Index of the driver API */
69     MOD_JUNO_DEBUG_API_IDX_DRIVER,
70 
71     /*! Number of APIs for the Juno Debug driver module */
72     MOD_JUNO_DEBUG_API_IDX_COUNT,
73 };
74 
75 #endif  /* MOD_JUNO_DEBUG_H */
76