blob: 01413c2dad9c5f927b99d5eb7caa9f5dabce102d [file] [log] [blame]
Eric Biederman6aa31cc2003-06-10 21:22:07 +00001void smbus_read_byte(void)
2{
3 unsigned char host_status_register;
4 unsigned char byte;
5 int result;
6
7 host_status_register = __builtin_inb(0x1234);
8
9 /* read results of transaction */
10 byte = __builtin_inb(0x4567);
11
12 result = byte;
13 if (host_status_register != 0x02) {
14 result = -1;
15 }
16}