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