nvram_util.h 999 Bytes
#ifndef _NVRAM_UTIL_H_
#define _NVRAM_UTIL_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
#define DELAY_MULT 1

#define SYSCLK_NS 10
/* increased to fix timeout failure on virage 2 nms recall.
 */
#define MORE_EXTRA_WAIT 400

/* for prints to screen */

static char buf[512];
/*
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, 
*/
int nms_recall(int sysclk_scale, int ctrl_reg);
int nms_store_default(int ctrl_reg);
int nms_store(int ctrl_reg, int store_pw, int vpp_level, int vpp_max, int vpp_delta, int max_pulses, int dumb_pulses);

#endif