diff options
author | Chris Kay <chris.kay@arm.com> | 2020-01-27 09:15:45 +0000 |
---|---|---|
committer | jimqui01 <54316584+jimqui01@users.noreply.github.com> | 2020-03-03 15:11:04 +0000 |
commit | 7a7080fbc30a03b623a38ce9b74d3a2b40ba10fe (patch) | |
tree | 4b69eb9751b258f8fc1f32beba68a1f46dc3d4f6 /product/sgm775 | |
parent | d7d3600a09578c1beb1634d8826ef2830e9952a1 (diff) |
sgm775: Add config_sid module
This patch adds config_sid module for sgm775 based
plaforms. It also adds config_system_info for
sgm775 platform.
Change-Id: I949755877d1144bbb5a822082675feeb66da7fbe
Signed-off-by: Raphael Gault <raphael.gault@arm.com>
Signed-off-by: Girish Pathak <girish.pathak@arm.com>
Diffstat (limited to 'product/sgm775')
-rw-r--r-- | product/sgm775/include/sgm775_ssc.h | 4 | ||||
-rw-r--r-- | product/sgm775/scp_ramfw/firmware.mk | 7 | ||||
-rw-r--r-- | product/sgm775/scp_romfw/firmware.mk | 10 | ||||
-rw-r--r-- | product/sgm775/src/config_sid.c | 44 | ||||
-rw-r--r-- | product/sgm775/src/config_system_info.c | 23 |
5 files changed, 85 insertions, 3 deletions
diff --git a/product/sgm775/include/sgm775_ssc.h b/product/sgm775/include/sgm775_ssc.h index def93175..06a8beea 100644 --- a/product/sgm775/include/sgm775_ssc.h +++ b/product/sgm775/include/sgm775_ssc.h @@ -39,4 +39,8 @@ struct ssc_reg { FWK_R uint32_t COMPID3; }; +enum ssc_part { + SSC_PART_SGM_775 = 0x790, +}; + #endif /* SGM775_SSC_H */ diff --git a/product/sgm775/scp_ramfw/firmware.mk b/product/sgm775/scp_ramfw/firmware.mk index fb72e295..3a23d945 100644 --- a/product/sgm775/scp_ramfw/firmware.mk +++ b/product/sgm775/scp_ramfw/firmware.mk @@ -13,6 +13,9 @@ BS_FIRMWARE_HAS_MULTITHREADING := yes BS_FIRMWARE_HAS_NOTIFICATION := yes BS_FIRMWARE_MODULES := \ + sid \ + system_info \ + pcid \ pl011 \ log \ gtimer \ @@ -70,6 +73,8 @@ BS_FIRMWARE_SOURCES := \ config_scmi_perf.c \ config_scmi_system_power.c \ config_scmi_apcore.c \ - config_system_power.c + config_system_power.c \ + config_sid.c \ + config_system_info.c include $(BS_DIR)/firmware.mk diff --git a/product/sgm775/scp_romfw/firmware.mk b/product/sgm775/scp_romfw/firmware.mk index 34cbfe00..ee112cb9 100644 --- a/product/sgm775/scp_romfw/firmware.mk +++ b/product/sgm775/scp_romfw/firmware.mk @@ -13,7 +13,10 @@ BS_FIRMWARE_HAS_MULTITHREADING := no BS_FIRMWARE_HAS_NOTIFICATION := yes BS_FIRMWARE_MODULE_HEADERS_ONLY := timer \ power_domain -BS_FIRMWARE_MODULES := ppu_v0 \ +BS_FIRMWARE_MODULES := sid \ + system_info \ + pcid \ + ppu_v0 \ ppu_v1 \ pl011 \ log \ @@ -25,6 +28,7 @@ BS_FIRMWARE_MODULES := ppu_v0 \ pik_clock \ clock \ sds + BS_FIRMWARE_SOURCES := config_log.c \ config_timer.c \ config_msys_rom.c \ @@ -36,6 +40,8 @@ BS_FIRMWARE_SOURCES := config_log.c \ config_clock.c \ sgm775_core.c \ config_ppu_v0.c \ - config_ppu_v1.c + config_ppu_v1.c \ + config_sid.c \ + config_system_info.c include $(BS_DIR)/firmware.mk diff --git a/product/sgm775/src/config_sid.c b/product/sgm775/src/config_sid.c new file mode 100644 index 00000000..068f6df8 --- /dev/null +++ b/product/sgm775/src/config_sid.c @@ -0,0 +1,44 @@ +/* + * Arm SCP/MCP Software + * Copyright (c) 2017-2020, Arm Limited and Contributors. All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#include <fwk_element.h> +#include <fwk_module.h> +#include <mod_sid.h> +#include <sgm775_mmap.h> +#include <sgm775_ssc.h> + +static const struct fwk_element subsystem_table[] = { + { + .name = "SGM-775", + .data = &(struct mod_sid_subsystem_config) { + .part_number = SSC_PART_SGM_775, + } + }, + { 0 }, +}; + +static const struct fwk_element *get_subsystem_table(fwk_id_t id) +{ + return subsystem_table; +} + +struct fwk_module_config config_sid = { + .get_element_table = get_subsystem_table, + .data = &(struct mod_sid_config) { + .sid_base = SSC_BASE, + .pcid_expected = { + .PID0 = 0x44, + .PID1 = 0xB8, + .PID2 = 0x1B, + .PID4 = 0x04, + .CID0 = 0x0D, + .CID1 = 0xF0, + .CID2 = 0x05, + .CID3 = 0xB1, + }, + }, +}; diff --git a/product/sgm775/src/config_system_info.c b/product/sgm775/src/config_system_info.c new file mode 100644 index 00000000..6fc99805 --- /dev/null +++ b/product/sgm775/src/config_system_info.c @@ -0,0 +1,23 @@ +/* + * Arm SCP/MCP Software + * Copyright (c) 2020, Arm Limited and Contributors. All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#include <fwk_macros.h> +#include <fwk_module.h> +#include <fwk_module_idx.h> +#include <mod_system_info.h> +#include <mod_sid.h> + +const struct fwk_module_config config_system_info = { + .get_element_table = NULL, + .data = &((struct mod_system_info_config) { + .system_info_driver_module_id = + FWK_ID_MODULE_INIT(FWK_MODULE_IDX_SID), + .system_info_driver_data_api_id = + FWK_ID_API_INIT(FWK_MODULE_IDX_SID, + MOD_SID_SYSTEM_INFO_DRIVER_DATA_API_IDX), + }), +}; |