ocotp.h 523 B

123456789101112131415161718192021222324252627
  1. /*
  2. * Copyright (c) 2016 - 2020, Broadcom
  3. *
  4. * SPDX-License-Identifier: BSD-3-Clause
  5. */
  6. #ifndef OCOTP_H
  7. #define OCOTP_H
  8. #include <stdint.h>
  9. struct otpc_map {
  10. /* in words. */
  11. uint32_t otpc_row_size;
  12. /* 128 bit row / 4 words support. */
  13. uint16_t data_r_offset[4];
  14. /* 128 bit row / 4 words support. */
  15. uint16_t data_w_offset[4];
  16. int word_size;
  17. int stride;
  18. };
  19. int bcm_otpc_init(struct otpc_map *map);
  20. int bcm_otpc_read(unsigned int offset, void *val, uint32_t bytes,
  21. uint32_t ecc_flag);
  22. #endif /* OCOTP_H */