aml_efuse.c 487 B

12345678910111213141516171819202122232425
  1. /*
  2. * Copyright (c) 2018-2019, ARM Limited and Contributors. All rights reserved.
  3. *
  4. * SPDX-License-Identifier: BSD-3-Clause
  5. */
  6. #include <stdint.h>
  7. #include "aml_private.h"
  8. #define EFUSE_BASE 0x140
  9. #define EFUSE_SIZE 0xC0
  10. uint64_t aml_efuse_read(void *dst, uint32_t offset, uint32_t size)
  11. {
  12. if ((uint64_t)(offset + size) > (uint64_t)EFUSE_SIZE)
  13. return 0;
  14. return aml_scpi_efuse_read(dst, offset + EFUSE_BASE, size);
  15. }
  16. uint64_t aml_efuse_user_max(void)
  17. {
  18. return EFUSE_SIZE;
  19. }