Chandni Cherukuri | 3aa09f7 | 2018-11-28 11:31:51 +0530 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2018, ARM Limited and Contributors. All rights reserved. |
| 3 | * |
| 4 | * SPDX-License-Identifier: BSD-3-Clause |
| 5 | */ |
| 6 | |
Antonio Nino Diaz | e0f9063 | 2018-12-14 00:18:21 +0000 | [diff] [blame] | 7 | #include <plat/common/platform.h> |
Chandni Cherukuri | 3aa09f7 | 2018-11-28 11:31:51 +0530 | [diff] [blame] | 8 | |
| 9 | unsigned int plat_arm_sgi_get_platform_id(void) |
| 10 | { |
| 11 | return mmio_read_32(SSC_VERSION) & SSC_VERSION_PART_NUM_MASK; |
| 12 | } |
| 13 | |
| 14 | unsigned 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 | } |