Blame view

include/linux/nvram.h 844 Bytes
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
  #ifndef _LINUX_NVRAM_H
  #define _LINUX_NVRAM_H
  
  #include <linux/ioctl.h>
  
  /* /dev/nvram ioctls */
  #define NVRAM_INIT	_IO('p', 0x40) /* initialize NVRAM and set checksum */
  #define NVRAM_SETCKS	_IO('p', 0x41) /* recalculate checksum */
  
  /* for all current systems, this is where NVRAM starts */
  #define NVRAM_FIRST_BYTE    14
  /* all these functions expect an NVRAM offset, not an absolute */
  #define NVRAM_OFFSET(x)   ((x)-NVRAM_FIRST_BYTE)
  
  #ifdef __KERNEL__
  /* __foo is foo without grabbing the rtc_lock - get it yourself */
  extern unsigned char __nvram_read_byte(int i);
  extern unsigned char nvram_read_byte(int i);
  extern void __nvram_write_byte(unsigned char c, int i);
  extern void nvram_write_byte(unsigned char c, int i);
  extern int __nvram_check_checksum(void);
  extern int nvram_check_checksum(void);
1da177e4c   Linus Torvalds   Linux-2.6.12-rc2
23
24
25
  #endif
  
  #endif  /* _LINUX_NVRAM_H */