Author: stepan Date: 2009-11-19 14:05:10 +0100 (Thu, 19 Nov 2009) New Revision: 48
Modified: trunk/SerialICE/mainboard/dell_s1850.c Log: Clean up DELL S1850 init code (cosmetical). It seems the BMC is an EC in the classical sense.
Modified: trunk/SerialICE/mainboard/dell_s1850.c =================================================================== --- trunk/SerialICE/mainboard/dell_s1850.c 2009-11-19 12:55:28 UTC (rev 47) +++ trunk/SerialICE/mainboard/dell_s1850.c 2009-11-19 13:05:10 UTC (rev 48) @@ -45,8 +45,8 @@
#define nftransport 0xc
-#define OBF 0 -#define IBF 1 +#define OBF (1 << 0) +#define IBF (1 << 1)
#define ipmidata 0xca0 #define ipmicsr 0xca4 @@ -54,7 +54,7 @@
static inline void ibfzero(void) { - while(inb(ipmicsr) & (1<<IBF)) + while(inb(ipmicsr) & IBF) ; } static inline void clearobf(void) @@ -64,9 +64,10 @@
static inline void waitobf(void) { - while((inb(ipmicsr) & (1<<OBF)) == 0) + while((inb(ipmicsr) & OBF) == 0) ; } + /* quite possibly the stupidest interface ever designed. */ static inline void first_cmd_byte(unsigned char byte) { @@ -80,7 +81,6 @@
static inline void next_cmd_byte(unsigned char byte) { - ibfzero(); clearobf(); outb(byte, ipmidata); @@ -156,6 +156,5 @@ mainboard_set_ich5(); bmc_foad(); superio_init(); - outb('F', 0x3f8); }