blob: 5bf14e3a166e0fc714012daa2aab69170f0d9ee4 [file] [log] [blame]
Aditya Angadid61740b2020-11-19 18:05:33 +05301/*
2 * Copyright (c) 2020, ARM Limited and Contributors. All rights reserved.
3 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
7#include <plat/common/platform.h>
8#include <sgi_plat.h>
9
10unsigned int plat_arm_sgi_get_platform_id(void)
11{
12 return mmio_read_32(SID_REG_BASE + SID_SYSTEM_ID_OFFSET)
13 & SID_SYSTEM_ID_PART_NUM_MASK;
14}
15
16unsigned int plat_arm_sgi_get_config_id(void)
17{
18 return mmio_read_32(SID_REG_BASE + SID_SYSTEM_CFG_OFFSET);
19}
20
21unsigned int plat_arm_sgi_get_multi_chip_mode(void)
22{
23 return (mmio_read_32(SID_REG_BASE + SID_NODE_ID_OFFSET) &
24 SID_MULTI_CHIP_MODE_MASK) >>
25 SID_MULTI_CHIP_MODE_SHIFT;
26}
27
28void bl31_platform_setup(void)
29{
30 sgi_bl31_common_platform_setup();
31}