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