diff options
| author | Linus Torvalds <torvalds@home.osdl.org> | 2004-02-05 04:36:49 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@home.osdl.org> | 2004-02-05 04:36:49 -0800 |
| commit | 29052d817ebbc4065e14d1f07fadc613fa06449b (patch) | |
| tree | 0789be5d65ab07385473941f75d9778b33e2caef /include/asm-ppc/nvram.h | |
| parent | 12a981f8fd62fb34823626844a5c76d6614055fe (diff) | |
| parent | 4d41d2454360871a9bb538f2b1396a7c67aa92f9 (diff) | |
Merge PPC update
Diffstat (limited to 'include/asm-ppc/nvram.h')
| -rw-r--r-- | include/asm-ppc/nvram.h | 25 |
1 files changed, 21 insertions, 4 deletions
diff --git a/include/asm-ppc/nvram.h b/include/asm-ppc/nvram.h index d65bb55baf9d..31ef16e3fc4f 100644 --- a/include/asm-ppc/nvram.h +++ b/include/asm-ppc/nvram.h @@ -34,23 +34,40 @@ enum { /* Return partition offset in nvram */ extern int pmac_get_partition(int partition); -/* Direct access to XPRAM */ +/* Direct access to XPRAM on PowerMacs */ extern u8 pmac_xpram_read(int xpaddr); extern void pmac_xpram_write(int xpaddr, u8 data); +/* Synchronize NVRAM */ +extern void nvram_sync(void); + +/* Normal access to NVRAM */ +extern unsigned char nvram_read_byte(int i); +extern void nvram_write_byte(unsigned char c, int i); + /* Some offsets in XPRAM */ #define PMAC_XPRAM_MACHINE_LOC 0xe4 #define PMAC_XPRAM_SOUND_VOLUME 0x08 -/* Machine location structure in XPRAM */ +/* Machine location structure in PowerMac XPRAM */ struct pmac_machine_location { unsigned int latitude; /* 2+30 bit Fractional number */ unsigned int longitude; /* 2+30 bit Fractional number */ unsigned int delta; /* mix of GMT delta and DLS */ }; -/* /dev/nvram ioctls */ -#define PMAC_NVRAM_GET_OFFSET _IOWR('p', 0x40, int) /* Get NVRAM partition offset */ +/* + * /dev/nvram ioctls + * + * Note that PMAC_NVRAM_GET_OFFSET is still supported, but is + * definitely obsolete. Do not use it if you can avoid it + */ + +#define OBSOLETE_PMAC_NVRAM_GET_OFFSET \ + _IOWR('p', 0x40, int) + +#define IOC_NVRAM_GET_OFFSET _IOWR('p', 0x42, int) /* Get NVRAM partition offset */ +#define IOC_NVRAM_SYNC _IO('p', 0x43) /* Sync NVRAM image */ #endif #endif /* __KERNEL__ */ |
