From 8ac176585a82d983bdd6c86f23dd6549ccd88a0e Mon Sep 17 00:00:00 2001 From: Vishwanatha HG <vishwanatha.hg@arm.com> Date: Tue, 8 May 2018 16:17:31 +0530 Subject: [PATCH] css/sgi: remove redundant copy of gic driver data Instead of instantiating a local copy of GICv3 driver data for SGI platforms, reuse the existing instance of GICv3 driver data available in the arm common platform code. Change-Id: If6f38e15d1f0e20cea96fff98091da300015d295 Signed-off-by: Chandni Cherukuri <chandni.cherukuri@arm.com> Signed-off-by: Vishwanatha HG <vishwanatha.hg@arm.com> --- plat/arm/css/sgi/sgi-common.mk | 1 - plat/arm/css/sgi/sgi_gic_config.c | 18 ------------------ plat/arm/css/sgi/sgi_plat_config.c | 18 ------------------ 3 files changed, 37 deletions(-) delete mode 100644 plat/arm/css/sgi/sgi_gic_config.c diff --git a/plat/arm/css/sgi/sgi-common.mk b/plat/arm/css/sgi/sgi-common.mk index 659351a8b..f6ef95a03 100644 --- a/plat/arm/css/sgi/sgi-common.mk +++ b/plat/arm/css/sgi/sgi-common.mk @@ -19,7 +19,6 @@ ENT_GIC_SOURCES := drivers/arm/gic/common/gic_common.c \ drivers/arm/gic/v3/gicv3_helpers.c \ plat/common/plat_gicv3.c \ plat/arm/common/arm_gicv3.c \ - ${CSS_ENT_BASE}/sgi_gic_config.c \ drivers/arm/gic/v3/gic600.c diff --git a/plat/arm/css/sgi/sgi_gic_config.c b/plat/arm/css/sgi/sgi_gic_config.c deleted file mode 100644 index dfccc1b6d..000000000 --- a/plat/arm/css/sgi/sgi_gic_config.c +++ /dev/null @@ -1,18 +0,0 @@ -/* - * Copyright (c) 2018, ARM Limited and Contributors. All rights reserved. - * - * SPDX-License-Identifier: BSD-3-Clause - */ - -#include <sgi_plat_config.h> - -void plat_arm_gic_driver_init(void) -{ - /* - * The GICv3 driver is initialized in EL3 and does not need - * to be initialized again in S-EL1. This is because the S-EL1 - * can use GIC system registers to manage interrupts and does - * not need GIC interface base addresses to be configured. - */ - gicv3_driver_init(get_plat_config()->gic_data); -} diff --git a/plat/arm/css/sgi/sgi_plat_config.c b/plat/arm/css/sgi/sgi_plat_config.c index 96d31e21c..29b99a3c2 100644 --- a/plat/arm/css/sgi/sgi_plat_config.c +++ b/plat/arm/css/sgi/sgi_plat_config.c @@ -18,23 +18,6 @@ static css_plat_config_t *css_plat_info; /* The GICv3 driver only needs to be initialized in EL3 */ uintptr_t rdistif_base_addrs[PLATFORM_CORE_COUNT]; -const interrupt_prop_t sgi575_interrupt_props[] = { - CSS_G1S_IRQ_PROPS(INTR_GROUP1S), - ARM_G0_IRQ_PROPS(INTR_GROUP0), -}; - -/* Special definition for SGI575 */ -/* GIC configuration for SGI575 */ -const gicv3_driver_data_t sgi575_gic_data = { - .gicd_base = PLAT_ARM_GICD_BASE, - .gicr_base = PLAT_ARM_GICR_BASE, - .interrupt_props = sgi575_interrupt_props, - .interrupt_props_num = ARRAY_SIZE(sgi575_interrupt_props), - .rdistif_num = PLATFORM_CORE_COUNT, - .rdistif_base_addrs = rdistif_base_addrs, - .mpidr_to_core_pos = plat_arm_calc_core_pos - }; - /* Interconnect configuration for SGI575 */ const css_inteconn_config_t sgi575_inteconn = { .ip_type = ARM_CMN, @@ -43,7 +26,6 @@ const css_inteconn_config_t sgi575_inteconn = { /* Configuration structure for SGI575 */ css_plat_config_t sgi575_config = { - .gic_data = &sgi575_gic_data, .inteconn = &sgi575_inteconn, }; -- GitLab