1 /*
2 * Arm SCP/MCP Software
3 * Copyright (c) 2020-2022, Arm Limited and Contributors. All rights reserved.
4 *
5 * SPDX-License-Identifier: BSD-3-Clause
6 */
7
8 #include "scp_css_mmap.h"
9
10 #include <mod_sid.h>
11
12 #include <fwk_element.h>
13 #include <fwk_id.h>
14 #include <fwk_module.h>
15
16 static const struct fwk_element subsystem_table[] = {
17 { .name = "RD-N2",
18 .data =
19 &(struct mod_sid_subsystem_config){
20 #if (PLATFORM_VARIANT == 0 || PLATFORM_VARIANT == 2)
21 .part_number = 0x7B7,
22 #elif (PLATFORM_VARIANT == 3)
23 .part_number = 0x7F1,
24 #else
25 .part_number = 0x7B6,
26 #endif
27 } },
28 { .name = "RD-V2",
29 .data =
30 &(struct mod_sid_subsystem_config){
31 .part_number = 0x7F2,
32 } },
33 { 0 },
34 };
35
get_subsystem_table(fwk_id_t id)36 static const struct fwk_element *get_subsystem_table(fwk_id_t id)
37 {
38 return subsystem_table;
39 }
40
41 const struct fwk_module_config config_sid = {
42 .data = &(struct mod_sid_config) {
43 .sid_base = SCP_SID_BASE,
44 .pcid_expected = {
45 .PID0 = 0xD2,
46 .PID1 = 0xB0,
47 .PID2 = 0x0B,
48 .PID3 = 0x00,
49 .PID4 = 0x04,
50 .CID0 = 0x0D,
51 .CID1 = 0xF0,
52 .CID2 = 0x05,
53 .CID3 = 0xB1,
54 },
55 },
56
57 .elements = FWK_MODULE_DYNAMIC_ELEMENTS(get_subsystem_table),
58 };
59