Antonio Nino Diaz | 7298c1f | 2018-12-05 00:09:30 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2018, ARM Limited and Contributors. All rights reserved. |
| 3 | * |
| 4 | * SPDX-License-Identifier: BSD-3-Clause |
| 5 | */ |
| 6 | |
| 7 | #include <stdint.h> |
| 8 | |
| 9 | #include "gxl_private.h" |
| 10 | |
| 11 | #define EFUSE_BASE 0x140 |
| 12 | #define EFUSE_SIZE 0xC0 |
| 13 | |
| 14 | uint64_t gxbb_efuse_read(void *dst, uint32_t offset, uint32_t size) |
| 15 | { |
| 16 | if ((uint64_t)(offset + size) > (uint64_t)EFUSE_SIZE) |
| 17 | return 0; |
| 18 | |
| 19 | return scpi_efuse_read(dst, offset + EFUSE_BASE, size); |
| 20 | } |
| 21 | |
| 22 | uint64_t gxbb_efuse_user_max(void) |
| 23 | { |
| 24 | return EFUSE_SIZE; |
| 25 | } |