blob: d1a1fbf46f621f112ba4b30a0155f746ae7f5844 [file] [log] [blame]
Chandni Cherukuri3aa09f72018-11-28 11:31:51 +05301/*
2 * Copyright (c) 2018, ARM Limited and Contributors. All rights reserved.
3 *
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
9unsigned int plat_arm_sgi_get_platform_id(void)
10{
11 return mmio_read_32(SSC_VERSION) & SSC_VERSION_PART_NUM_MASK;
12}
13
14unsigned int plat_arm_sgi_get_config_id(void)
15{
16 return (mmio_read_32(SSC_VERSION) >> SSC_VERSION_CONFIG_SHIFT)
17 & SSC_VERSION_CONFIG_MASK;
18}