1 /*
2  * Copyright (c) 2018-2019, ARM Limited and Contributors. All rights reserved.
3  *
4  * SPDX-License-Identifier: BSD-3-Clause
5  */
6 
7 #include <stdint.h>
8 
9 #include "aml_private.h"
10 
11 #define EFUSE_BASE	0x140
12 #define EFUSE_SIZE	0xC0
13 
aml_efuse_read(void * dst,uint32_t offset,uint32_t size)14 uint64_t aml_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 aml_scpi_efuse_read(dst, offset + EFUSE_BASE, size);
20 }
21 
aml_efuse_user_max(void)22 uint64_t aml_efuse_user_max(void)
23 {
24 	return EFUSE_SIZE;
25 }
26