blob: 0d3fd16ab626fc7ff97e61784307efbf6c63b905 [file] [log] [blame]
Chandni Cherukuri3aa09f72018-11-28 11:31:51 +05301/*
Ambroise Vincentb237bca2019-02-13 15:58:00 +00002 * Copyright (c) 2018-2019, ARM Limited and Contributors. All rights reserved.
Chandni Cherukuri3aa09f72018-11-28 11:31:51 +05303 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
Antonio Nino Diaze0f90632018-12-14 00:18:21 +00007#include <plat/common/platform.h>
Chandni Cherukuri3aa09f72018-11-28 11:31:51 +05308
Ambroise Vincentb237bca2019-02-13 15:58:00 +00009#include <sgi_variant.h>
10
Chandni Cherukuri3aa09f72018-11-28 11:31:51 +053011unsigned int plat_arm_sgi_get_platform_id(void)
12{
13 return mmio_read_32(SSC_VERSION) & SSC_VERSION_PART_NUM_MASK;
14}
15
16unsigned int plat_arm_sgi_get_config_id(void)
17{
18 return (mmio_read_32(SSC_VERSION) >> SSC_VERSION_CONFIG_SHIFT)
19 & SSC_VERSION_CONFIG_MASK;
20}