1 /*
2  * Arm SCP/MCP Software
3  * Copyright (c) 2022, Arm Limited and Contributors. All rights reserved.
4  *
5  * SPDX-License-Identifier: BSD-3-Clause
6  */
7 
8 #include <mod_timer.h>
9 
10 #include <fwk_element.h>
11 #include <fwk_id.h>
12 #include <fwk_module.h>
13 #include <fwk_module_idx.h>
14 
15 #include <fmw_cmsis.h>
16 
17 /*
18  * Timer HAL config
19  */
20 static const struct fwk_element timer_dev_table[2] = {
21     [0] =
22         {
23             .name = "REFCLK",
24             .data = &((struct mod_timer_dev_config){
25                 .id = FWK_ID_ELEMENT_INIT(FWK_MODULE_IDX_GTIMER, 0),
26                 .timer_irq = TIMREFCLK_IRQ,
27             }),
28         },
29     [1] = { 0 },
30 };
31 
timer_get_dev_table(fwk_id_t module_id)32 static const struct fwk_element *timer_get_dev_table(fwk_id_t module_id)
33 {
34     return timer_dev_table;
35 }
36 
37 const struct fwk_module_config config_timer = {
38     .elements = FWK_MODULE_DYNAMIC_ELEMENTS(timer_get_dev_table),
39 };
40