diff options
author | Amit Daniel Kachhap <amit.kachhap@arm.com> | 2018-07-23 14:19:56 +0530 |
---|---|---|
committer | ronald-cron-arm <39518861+ronald-cron-arm@users.noreply.github.com> | 2018-10-18 17:22:34 +0000 |
commit | 22b7594c87aba35340db9ac3822a0e0779c22536 (patch) | |
tree | 8ff32296415be8b49b4fd66672539b907edf67f3 /product/sgi575 | |
parent | 4ee0fb7142d79df115265f8a12c1d93138e42102 (diff) |
sgi575/scp_ramfw: Add and enable scmi_apcore configuration
Change-Id: I4f71912bfb8a8d592c3571a9e6f24e1f5664cfc8
Signed-off-by: Amit Daniel Kachhap <amit.kachhap@arm.com>
Diffstat (limited to 'product/sgi575')
-rw-r--r-- | product/sgi575/include/sgi575_core.h | 3 | ||||
-rw-r--r-- | product/sgi575/scp_ramfw/config_scmi.c | 2 | ||||
-rw-r--r-- | product/sgi575/scp_ramfw/config_scmi_apcore.c | 32 | ||||
-rw-r--r-- | product/sgi575/scp_ramfw/firmware.mk | 4 |
4 files changed, 39 insertions, 2 deletions
diff --git a/product/sgi575/include/sgi575_core.h b/product/sgi575/include/sgi575_core.h index 616dbd33..2a61dcf9 100644 --- a/product/sgi575/include/sgi575_core.h +++ b/product/sgi575/include/sgi575_core.h @@ -8,6 +8,9 @@ #ifndef SGI575_CORE_H #define SGI575_CORE_H +#define SGI575_CORE_PER_CLUSTER0_MAX 4 +#define SGI575_CORE_PER_CLUSTER1_MAX 4 + unsigned int sgi575_core_get_core_per_cluster_count(unsigned int cluster); unsigned int sgi575_core_get_core_count(void); unsigned int sgi575_core_get_cluster_count(void); diff --git a/product/sgi575/scp_ramfw/config_scmi.c b/product/sgi575/scp_ramfw/config_scmi.c index 642a2956..35311ec6 100644 --- a/product/sgi575/scp_ramfw/config_scmi.c +++ b/product/sgi575/scp_ramfw/config_scmi.c @@ -62,7 +62,7 @@ static struct mod_scmi_agent agent_table[] = { const struct fwk_module_config config_scmi = { .get_element_table = get_service_table, .data = &((struct mod_scmi_config) { - .protocol_count_max = 8, + .protocol_count_max = 9, .agent_count = FWK_ARRAY_SIZE(agent_table) - 1, .agent_table = agent_table, .vendor_identifier = "arm", diff --git a/product/sgi575/scp_ramfw/config_scmi_apcore.c b/product/sgi575/scp_ramfw/config_scmi_apcore.c new file mode 100644 index 00000000..62883dfd --- /dev/null +++ b/product/sgi575/scp_ramfw/config_scmi_apcore.c @@ -0,0 +1,32 @@ +/* + * Arm SCP/MCP Software + * Copyright (c) 2018, Arm Limited and Contributors. All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#include <fwk_element.h> +#include <fwk_macros.h> +#include <fwk_module.h> +#include <mod_scmi_apcore.h> +#include <scp_sgi575_pik.h> +#include <sgi575_core.h> + +static const struct mod_scmi_apcore_reset_register_group + reset_reg_group_table[] = { + { + .base_register = + (uintptr_t)&PIK_CLUSTER(0)->STATIC_CONFIG[0].RVBARADDR_LW, + .register_count = + (SGI575_CORE_PER_CLUSTER0_MAX + SGI575_CORE_PER_CLUSTER1_MAX), + }, + }; + +const struct fwk_module_config config_scmi_apcore = { + .data = &((struct mod_scmi_apcore_config){ + .reset_register_width = MOD_SCMI_APCORE_REG_WIDTH_64, + .reset_register_group_count = + FWK_ARRAY_SIZE(reset_reg_group_table), + .reset_register_group_table = &reset_reg_group_table[0], + }), +}; diff --git a/product/sgi575/scp_ramfw/firmware.mk b/product/sgi575/scp_ramfw/firmware.mk index c6e018ad..f9e2ce5c 100644 --- a/product/sgi575/scp_ramfw/firmware.mk +++ b/product/sgi575/scp_ramfw/firmware.mk @@ -39,7 +39,8 @@ BS_FIRMWARE_MODULES := \ mock_psu \ psu \ dvfs \ - scmi_perf + scmi_perf \ + scmi_apcore BS_FIRMWARE_SOURCES := \ rtx_config.c \ @@ -67,6 +68,7 @@ BS_FIRMWARE_SOURCES := \ config_psu.c \ config_dvfs.c \ config_scmi_perf.c \ + config_scmi_apcore.c \ config_apcontext.c include $(BS_DIR)/firmware.mk |