blob: 29b99a3c26339f856d5ee97f50d73447fde9f331 [file] [log] [blame]
Nariman Poushin0ece80f2018-02-26 06:52:04 +00001/*
2 * Copyright (c) 2018, ARM Limited and Contributors. All rights reserved.
3 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
7#include <assert.h>
8#include <debug.h>
9#include <plat_arm.h>
10#include <platform_def.h>
11#include <sgi_variant.h>
12#include <sgi_plat_config.h>
13#include <string.h>
14
15static css_plat_config_t *css_plat_info;
16
17/* GIC */
18/* The GICv3 driver only needs to be initialized in EL3 */
19uintptr_t rdistif_base_addrs[PLATFORM_CORE_COUNT];
20
Nariman Poushin0ece80f2018-02-26 06:52:04 +000021/* Interconnect configuration for SGI575 */
22const css_inteconn_config_t sgi575_inteconn = {
23 .ip_type = ARM_CMN,
24 .plat_inteconn_desc = NULL
25};
26
27/* Configuration structure for SGI575 */
28css_plat_config_t sgi575_config = {
Nariman Poushin0ece80f2018-02-26 06:52:04 +000029 .inteconn = &sgi575_inteconn,
30};
31
32/*******************************************************************************
33 * This function initializes the platform sturcture.
34 ******************************************************************************/
35void plat_config_init(void)
36{
37 /* Get the platform configurations */
38 switch (GET_SGI_PART_NUM) {
39 case SGI575_SSC_VER_PART_NUM:
40 css_plat_info = &sgi575_config;
41 break;
42 default:
43 ERROR("Not a valid sgi variant!\n");
44 panic();
45 }
46}
47
48/*******************************************************************************
49 * This function returns the platform structure pointer.
50 ******************************************************************************/
51css_plat_config_t *get_plat_config(void)
52{
53 assert(css_plat_info != NULL);
54 return css_plat_info;
55}