nvram.h
1.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#ifndef _NVRAM_H_
#define _NVRAM_H_
#include <stdio.h>
#define PASS 0
#define FAIL -1
/*
* Set this value for whatever scaling of sys clock to speed up timing
*/
/* converted to command line with default */
/*
#define SYSCLK_SCALE 20
*/
/*
* Values below for wait are exact. Need to add a little to make sure
* event is triggered:
*/
#define EXTRA_WAIT 100
/* increased to fix timeout failure on virage 2 nms recall.
*/
#define MORE_EXTRA_WAIT 400
void print_crsto_1(FILE *fp, int reg);
void print_crsto_0(FILE *fp, int reg);
void print_ctrl(FILE *fp, int reg);
int get_sys_clk_ns(int sysclk_scale);
int get_vpp(int reg);
int get_mrcl_tecc_bias(int x, unsigned char * newmrcl,
unsigned char * newtecc, unsigned char * newbias);
int nms_ready(FILE *LogFp, int ctrl_reg);
int nms_recall(int sysclk_scale, FILE *LogFp, int ctrl_reg);
int nms_store_default(FILE *LogFp, int ctrl_reg);
int nms_store(FILE *LogFp, int ctrl_reg, int store_pw, int vpp_level, int vpp_max, int vpp_delta, int max_pulses, int dumb_pulses);
int nms_store_interrupt(FILE *LogFp, int ctrl_reg, int store_pw, int vpp_level, int vpp_max, int vpp_delta, int max_pulses, int dumb_pulses);
int nms_store_checkvpp(FILE *LogFp, int ctrl_reg, int store_pw, int vpp_level,
int vpp_max, int vpp_delta, int max_pulses,
int dumb_pulses,
int *expected_array, int size);
#endif