Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
CTCaer
GitHub Repository: CTCaer/hekate
Path: blob/master/bdk/soc/kfuse.h
1476 views
1
/*
2
* Copyright (c) 2018 naehrwert
3
*
4
* This program is free software; you can redistribute it and/or modify it
5
* under the terms and conditions of the GNU General Public License,
6
* version 2, as published by the Free Software Foundation.
7
*
8
* This program is distributed in the hope it will be useful, but WITHOUT
9
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
11
* more details.
12
*
13
* You should have received a copy of the GNU General Public License
14
* along with this program. If not, see <http://www.gnu.org/licenses/>.
15
*/
16
17
#ifndef _KFUSE_H_
18
#define _KFUSE_H_
19
20
#include <utils/types.h>
21
22
#define KFUSE_STATE_CURBLOCK_MASK 0x3F
23
#define KFUSE_STATE_ERRBLOCK_SHIFT 8
24
#define KFUSE_STATE_ERRBLOCK_MASK 0x3F00
25
#define KFUSE_STATE_DONE BIT(16)
26
#define KFUSE_STATE_CRCPASS BIT(17)
27
#define KFUSE_STATE_RESTART BIT(24)
28
#define KFUSE_STATE_STOP BIT(25)
29
#define KFUSE_STATE_SOFTRESET BIT(31)
30
31
#define KFUSE_KEYADDR_AUTOINC BIT(16)
32
33
#define KFUSE_STATE 0x80
34
#define KFUSE_KEYADDR 0x88
35
#define KFUSE_KEYS 0x8C
36
37
#define KFUSE_NUM_WORDS 144
38
39
int kfuse_wait_ready();
40
int kfuse_read(u32 *buf);
41
42
#endif
43
44