blob: 830b3e4cd5873381c842093d71c16e53f966ea91 [file] [log] [blame]
Sheetal Tigadoliad0943e2019-12-18 19:44:43 +05301/*
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
12struct 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
23int bcm_otpc_init(struct otpc_map *map);
24int bcm_otpc_read(unsigned int offset, void *val, uint32_t bytes,
25 uint32_t ecc_flag);
26
27#endif /* OCOTP_H */