1 /*
2 * Arm SCP/MCP Software
3 * Copyright (c) 2019-2021, Arm Limited and Contributors. All rights reserved.
4 *
5 * SPDX-License-Identifier: BSD-3-Clause
6 */
7
8 #include "n1sdp_scp_mmap.h"
9
10 #include <mod_n1sdp_timer_sync.h>
11
12 #include <fwk_element.h>
13 #include <fwk_id.h>
14 #include <fwk_macros.h>
15 #include <fwk_module.h>
16
17 #include <fmw_cmsis.h>
18
19 static const struct fwk_element n1sdp_tsync_element_table[] = {
20 [0] = {
21 .name = "TIMER_SYNC",
22 .data = &((struct mod_n1sdp_tsync_config) {
23 .irq = TIMER_SYNC_IRQ,
24 .reg = SCP_TIMER_SYNC_BASE,
25 .ccix_delay = 25,
26 .sync_timeout = 0x200,
27 .sync_interval = 0x500,
28 .off_threshold = 0xF,
29 .target_cnt_base = 0x2A430000,
30 .local_offset = SCP_SYS1_BASE,
31 .remote_offset = (4UL * FWK_TIB),
32 })
33 },
34 [1] = { 0 },
35 };
36
n1sdp_tsync_get_element_table(fwk_id_t module_id)37 static const struct fwk_element *n1sdp_tsync_get_element_table(
38 fwk_id_t module_id)
39 {
40 return n1sdp_tsync_element_table;
41 }
42
43 struct fwk_module_config config_n1sdp_timer_sync = {
44 .elements = FWK_MODULE_DYNAMIC_ELEMENTS(n1sdp_tsync_get_element_table),
45 };
46