2018-11-28 06:01:51 +00:00
|
|
|
/*
|
2019-02-13 15:58:00 +00:00
|
|
|
* Copyright (c) 2018-2019, ARM Limited and Contributors. All rights reserved.
|
2018-11-28 06:01:51 +00:00
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
|
|
*/
|
|
|
|
|
2018-12-14 00:18:21 +00:00
|
|
|
#include <plat/common/platform.h>
|
2018-11-28 06:01:51 +00:00
|
|
|
|
2019-02-13 15:58:00 +00:00
|
|
|
#include <sgi_variant.h>
|
|
|
|
|
2018-11-28 06:01:51 +00:00
|
|
|
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;
|
|
|
|
}
|