Chandni Cherukuri | 3aa09f7 | 2018-11-28 11:31:51 +0530 | [diff] [blame] | 1 | /* |
Ambroise Vincent | b237bca | 2019-02-13 15:58:00 +0000 | [diff] [blame] | 2 | * Copyright (c) 2018-2019, ARM Limited and Contributors. All rights reserved. |
Chandni Cherukuri | 3aa09f7 | 2018-11-28 11:31:51 +0530 | [diff] [blame] | 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 | |
Ambroise Vincent | b237bca | 2019-02-13 15:58:00 +0000 | [diff] [blame] | 9 | #include <sgi_variant.h> |
| 10 | |
Chandni Cherukuri | 3aa09f7 | 2018-11-28 11:31:51 +0530 | [diff] [blame] | 11 | unsigned int plat_arm_sgi_get_platform_id(void) |
| 12 | { |
| 13 | return mmio_read_32(SSC_VERSION) & SSC_VERSION_PART_NUM_MASK; |
| 14 | } |
| 15 | |
| 16 | unsigned int plat_arm_sgi_get_config_id(void) |
| 17 | { |
| 18 | return (mmio_read_32(SSC_VERSION) >> SSC_VERSION_CONFIG_SHIFT) |
| 19 | & SSC_VERSION_CONFIG_MASK; |
| 20 | } |