Nariman Poushin | 0ece80f | 2018-02-26 06:52:04 +0000 | [diff] [blame] | 1 | /* |
| 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 | |
| 15 | static css_plat_config_t *css_plat_info; |
| 16 | |
| 17 | /* GIC */ |
| 18 | /* The GICv3 driver only needs to be initialized in EL3 */ |
| 19 | uintptr_t rdistif_base_addrs[PLATFORM_CORE_COUNT]; |
| 20 | |
Nariman Poushin | 0ece80f | 2018-02-26 06:52:04 +0000 | [diff] [blame] | 21 | /* Interconnect configuration for SGI575 */ |
| 22 | const css_inteconn_config_t sgi575_inteconn = { |
| 23 | .ip_type = ARM_CMN, |
| 24 | .plat_inteconn_desc = NULL |
| 25 | }; |
| 26 | |
| 27 | /* Configuration structure for SGI575 */ |
| 28 | css_plat_config_t sgi575_config = { |
Nariman Poushin | 0ece80f | 2018-02-26 06:52:04 +0000 | [diff] [blame] | 29 | .inteconn = &sgi575_inteconn, |
| 30 | }; |
| 31 | |
| 32 | /******************************************************************************* |
| 33 | * This function initializes the platform sturcture. |
| 34 | ******************************************************************************/ |
| 35 | void 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 | ******************************************************************************/ |
| 51 | css_plat_config_t *get_plat_config(void) |
| 52 | { |
| 53 | assert(css_plat_info != NULL); |
| 54 | return css_plat_info; |
| 55 | } |