Main Page | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals

prep_nvram.c File Reference

#include <linux/init.h>
#include <linux/delay.h>
#include <linux/malloc.h>
#include <linux/ioport.h>
#include <asm/segment.h>
#include <asm/io.h>
#include <asm/processor.h>
#include <asm/machdep.h>
#include <asm/prep_nvram.h>

Include dependency graph for prep_nvram.c:

Go to the source code of this file.

Defines

#define MAX_PREP_NVRAM   0x8000
#define PREP_NVRAM_AS0   0x74
#define PREP_NVRAM_AS1   0x75
#define PREP_NVRAM_DATA   0x77

Functions

unsigned char prep_nvram_read_val (int addr)
void prep_nvram_write_val (int addr, unsigned char val)
unsigned char rs_nvram_read_val (int addr)
void rs_nvram_write_val (int addr, unsigned char val)
 __initfunc (void init_prep_nvram(void))
__prep char * prep_nvram_get_var (const char *name)
__prep char * prep_nvram_first_var (void)
__prep char * prep_nvram_next_var (char *name)

Variables

static char nvramData [MAX_PREP_NVRAM]
static NVRAM_MAPnvram = (NVRAM_MAP *)&nvramData[0]
unsigned char * rs_pcNvRAM


Define Documentation

#define MAX_PREP_NVRAM   0x8000
 

Definition at line 21 of file prep_nvram.c.

Referenced by __initfunc().

#define PREP_NVRAM_AS0   0x74
 

Definition at line 25 of file prep_nvram.c.

Referenced by __initfunc(), prep_nvram_read_val(), and prep_nvram_write_val().

#define PREP_NVRAM_AS1   0x75
 

Definition at line 26 of file prep_nvram.c.

Referenced by prep_nvram_read_val(), and prep_nvram_write_val().

#define PREP_NVRAM_DATA   0x77
 

Definition at line 27 of file prep_nvram.c.

Referenced by prep_nvram_read_val(), and prep_nvram_write_val().


Function Documentation

__initfunc void   init_prep_nvram(void)  ) 
 

Definition at line 60 of file prep_nvram.c.

References _ISA_MEM_BASE, _PREP_Radstone, _prep_type, _HEADER::GEAddress, _NVRAM_MAP::GEArea, _HEADER::GELength, _NVRAM_MAP::Header, i, ioremap, MAX_PREP_NVRAM, machdep_calls::nvram_read_val, ppc_md, PREP_NVRAM_AS0, request_region, rs_pcNvRAM, and x8.

__prep char* prep_nvram_first_var void   ) 
 

Definition at line 135 of file prep_nvram.c.

References _HEADER::GELength, _NVRAM_MAP::Header, and NULL.

Referenced by prep_nvram_get_var().

__prep char* prep_nvram_get_var const char *  name  ) 
 

Definition at line 115 of file prep_nvram.c.

References NULL, prep_nvram_first_var(), prep_nvram_next_var(), strlen, and strncmp().

Referenced by __initfunc().

Here is the call graph for this function:

__prep char* prep_nvram_next_var char *  name  ) 
 

Definition at line 146 of file prep_nvram.c.

References _NVRAM_MAP::GEArea, _HEADER::GELength, _NVRAM_MAP::Header, and NULL.

Referenced by prep_nvram_get_var().

unsigned char prep_nvram_read_val int  addr  ) 
 

Definition at line 31 of file prep_nvram.c.

References inb, outb, PREP_NVRAM_AS0, PREP_NVRAM_AS1, and PREP_NVRAM_DATA.

Referenced by __initfunc().

void prep_nvram_write_val int  addr,
unsigned char  val
 

Definition at line 38 of file prep_nvram.c.

References outb, PREP_NVRAM_AS0, PREP_NVRAM_AS1, and PREP_NVRAM_DATA.

Referenced by __initfunc().

unsigned char rs_nvram_read_val int  addr  ) 
 

Definition at line 49 of file prep_nvram.c.

References rs_pcNvRAM.

Referenced by __initfunc().

void rs_nvram_write_val int  addr,
unsigned char  val
 

Definition at line 54 of file prep_nvram.c.

References rs_pcNvRAM.

Referenced by __initfunc().


Variable Documentation

NVRAM_MAP* nvram = (NVRAM_MAP *)&nvramData[0] [static]
 

Definition at line 23 of file prep_nvram.c.

Referenced by ncr_attach().

char nvramData[MAX_PREP_NVRAM] [static]
 

Definition at line 22 of file prep_nvram.c.

unsigned char* rs_pcNvRAM
 

Definition at line 29 of file prep_nvram.c.

Referenced by __initfunc(), rs_nvram_read_val(), and rs_nvram_write_val().