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

w83977af.h

Go to the documentation of this file.
00001 #ifndef W83977AF_H
00002 #define W83977AF_H
00003 
00004 #define W977_EFIO_BASE 0x370
00005 #define W977_EFIO2_BASE 0x3f0
00006 #define W977_DEVICE_IR 0x06
00007 
00008 
00009 /*
00010  * Enter extended function mode
00011  */
00012 static inline void w977_efm_enter(unsigned int efio)
00013 {
00014         outb(0x87, efio);
00015         outb(0x87, efio);
00016 }
00017 
00018 /*
00019  * Select a device to configure 
00020  */
00021 
00022 static inline void w977_select_device(__u8 devnum, unsigned int efio)
00023 {
00024         outb(0x07, efio);
00025         outb(devnum, efio+1);
00026 } 
00027 
00028 /* 
00029  * Write a byte to a register
00030  */
00031 static inline void w977_write_reg(__u8 reg, __u8 value, unsigned int efio)
00032 {
00033         outb(reg, efio);
00034         outb(value, efio+1);
00035 }
00036 
00037 /*
00038  * read a byte from a register
00039  */
00040 static inline __u8 w977_read_reg(__u8 reg, unsigned int efio)
00041 {
00042         outb(reg, efio);
00043         return inb(efio+1);
00044 }
00045 
00046 /*
00047  * Exit extended function mode
00048  */
00049 static inline void w977_efm_exit(unsigned int efio)
00050 {
00051         outb(0xAA, efio);
00052 }
00053 #endif