diff options
author | Aditya Angadi <aditya.angadi@arm.com> | 2020-11-04 11:45:12 +0530 |
---|---|---|
committer | Thomas Abraham <thomas.abraham@arm.com> | 2020-11-28 01:48:28 +0530 |
commit | fe7afba118b5dac7367863e91a84a39a329e2d08 (patch) | |
tree | 4a942a322a25d15f452eebb1ca06394c561cf89f | |
parent | 7143bf57bd8ee072c628e991990210c8b1b74557 (diff) |
product/rdn2: add config data for SID driver module
SID peripheral on this platform provides information about the platform
ID and config ID. So add the configuration data for SID module. The
base address of the SID register block is provided for the SID module
to read out the IDs from the SID registers.
Change-Id: Ie6fa5a4c1c4694818bfad82d19406ab7710f2f1d
Signed-off-by: Aditya Angadi <aditya.angadi@arm.com>
-rw-r--r-- | product/rdn2/include/scp_css_mmap.h | 15 | ||||
-rw-r--r-- | product/rdn2/include/scp_mmap.h | 13 | ||||
-rw-r--r-- | product/rdn2/src/config_sid.c | 48 |
3 files changed, 76 insertions, 0 deletions
diff --git a/product/rdn2/include/scp_css_mmap.h b/product/rdn2/include/scp_css_mmap.h new file mode 100644 index 00000000..4c35d505 --- /dev/null +++ b/product/rdn2/include/scp_css_mmap.h @@ -0,0 +1,15 @@ +/* + * Arm SCP/MCP Software + * Copyright (c) 2020, Arm Limited and Contributors. All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef SCP_CSS_MMAP_H +#define SCP_CSS_MMAP_H + +#include "scp_mmap.h" + +#define SCP_SID_BASE (SCP_SYSTEM_ACCESS_PORT1_BASE + 0x2A4A0000) + +#endif /* SCP_CSS_MMAP_H */ diff --git a/product/rdn2/include/scp_mmap.h b/product/rdn2/include/scp_mmap.h new file mode 100644 index 00000000..9752f020 --- /dev/null +++ b/product/rdn2/include/scp_mmap.h @@ -0,0 +1,13 @@ +/* + * Arm SCP/MCP Software + * Copyright (c) 2020, Arm Limited and Contributors. All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef SCP_MMAP_H +#define SCP_MMAP_H + +#define SCP_SYSTEM_ACCESS_PORT1_BASE 0xA0000000 + +#endif /* SCP_MMAP_H */ diff --git a/product/rdn2/src/config_sid.c b/product/rdn2/src/config_sid.c new file mode 100644 index 00000000..7465d806 --- /dev/null +++ b/product/rdn2/src/config_sid.c @@ -0,0 +1,48 @@ +/* + * Arm SCP/MCP Software + * Copyright (c) 2020, Arm Limited and Contributors. All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#include "scp_css_mmap.h" + +#include <mod_sid.h> + +#include <fwk_element.h> +#include <fwk_id.h> +#include <fwk_module.h> + +static const struct fwk_element subsystem_table[] = { + { + .name = "RD-N2", + .data = &(struct mod_sid_subsystem_config) { + .part_number = 0x7B7, + } + }, + { 0 }, +}; + +static const struct fwk_element *get_subsystem_table(fwk_id_t id) +{ + return subsystem_table; +} + +const struct fwk_module_config config_sid = { + .data = &(struct mod_sid_config) { + .sid_base = SCP_SID_BASE, + .pcid_expected = { + .PID0 = 0xD2, + .PID1 = 0xB0, + .PID2 = 0x0B, + .PID3 = 0x00, + .PID4 = 0x04, + .CID0 = 0x0D, + .CID1 = 0xF0, + .CID2 = 0x05, + .CID3 = 0xB1, + }, + }, + + .elements = FWK_MODULE_DYNAMIC_ELEMENTS(get_subsystem_table), +}; |