Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
nvram.c File Reference
#include <linux/export.h>
#include <linux/kernel.h>
#include <linux/stddef.h>
#include <linux/string.h>
#include <linux/nvram.h>
#include <linux/init.h>
#include <linux/delay.h>
#include <linux/errno.h>
#include <linux/adb.h>
#include <linux/pmu.h>
#include <linux/bootmem.h>
#include <linux/completion.h>
#include <linux/spinlock.h>
#include <asm/sections.h>
#include <asm/io.h>
#include <asm/prom.h>
#include <asm/machdep.h>
#include <asm/nvram.h>
#include "pmac.h"

Go to the source code of this file.

Data Structures

struct  chrp_header
 
struct  core99_header
 

Macros

#define DEBUG
 
#define DBG(x...)   printk(x)
 
#define NVRAM_SIZE   0x2000 /* 8kB of non-volatile RAM */
 
#define CORE99_SIGNATURE   0x5a
 
#define CORE99_ADLER_START   0x14
 
#define SM_FLASH_STATUS_DONE   0x80
 
#define SM_FLASH_STATUS_ERR   0x38
 
#define SM_FLASH_CMD_ERASE_CONFIRM   0xd0
 
#define SM_FLASH_CMD_ERASE_SETUP   0x20
 
#define SM_FLASH_CMD_RESET   0xff
 
#define SM_FLASH_CMD_WRITE_SETUP   0x40
 
#define SM_FLASH_CMD_CLEAR_STATUS   0x50
 
#define SM_FLASH_CMD_READ_STATUS   0x70
 

Functions

int __init pmac_nvram_init (void)
 
int pmac_get_partition (int partition)
 
u8 pmac_xpram_read (int xpaddr)
 
void pmac_xpram_write (int xpaddr, u8 data)
 
 EXPORT_SYMBOL (pmac_get_partition)
 
 EXPORT_SYMBOL (pmac_xpram_read)
 
 EXPORT_SYMBOL (pmac_xpram_write)
 

Macro Definition Documentation

#define CORE99_ADLER_START   0x14

Definition at line 43 of file nvram.c.

#define CORE99_SIGNATURE   0x5a

Definition at line 42 of file nvram.c.

#define DBG (   x...)    printk(x)

Definition at line 35 of file nvram.c.

#define DEBUG

Definition at line 32 of file nvram.c.

#define NVRAM_SIZE   0x2000 /* 8kB of non-volatile RAM */

Definition at line 40 of file nvram.c.

#define SM_FLASH_CMD_CLEAR_STATUS   0x50

Definition at line 53 of file nvram.c.

#define SM_FLASH_CMD_ERASE_CONFIRM   0xd0

Definition at line 49 of file nvram.c.

#define SM_FLASH_CMD_ERASE_SETUP   0x20

Definition at line 50 of file nvram.c.

#define SM_FLASH_CMD_READ_STATUS   0x70

Definition at line 54 of file nvram.c.

#define SM_FLASH_CMD_RESET   0xff

Definition at line 51 of file nvram.c.

#define SM_FLASH_CMD_WRITE_SETUP   0x40

Definition at line 52 of file nvram.c.

#define SM_FLASH_STATUS_DONE   0x80

Definition at line 46 of file nvram.c.

#define SM_FLASH_STATUS_ERR   0x38

Definition at line 47 of file nvram.c.

Function Documentation

EXPORT_SYMBOL ( pmac_get_partition  )
EXPORT_SYMBOL ( pmac_xpram_read  )
EXPORT_SYMBOL ( pmac_xpram_write  )
int pmac_get_partition ( int  partition)

Definition at line 625 of file nvram.c.

int __init pmac_nvram_init ( void  )

Definition at line 560 of file nvram.c.

u8 pmac_xpram_read ( int  xpaddr)

Definition at line 630 of file nvram.c.

void pmac_xpram_write ( int  xpaddr,
u8  data 
)

Definition at line 640 of file nvram.c.