aboutsummaryrefslogtreecommitdiff
path: root/plat/arm/board/sgi575/sgi575_plat.c
blob: a8ca916d98d5210b7e36d4d644329ec334155197 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/*
 * Copyright (c) 2018, ARM Limited and Contributors. All rights reserved.
 *
 * SPDX-License-Identifier: BSD-3-Clause
 */

#include <platform.h>

unsigned int plat_arm_sgi_get_platform_id(void)
{
	return mmio_read_32(SSC_VERSION) & SSC_VERSION_PART_NUM_MASK;
}

unsigned int plat_arm_sgi_get_config_id(void)
{
	return (mmio_read_32(SSC_VERSION) >> SSC_VERSION_CONFIG_SHIFT)
			& SSC_VERSION_CONFIG_MASK;
}