1 //kind of cmos_err for ich5
2 #define RTC_FAILED (1 <<2)
3 #define GEN_PMCON_3 0xa4
4 static void check_cmos_failed(void)
8 byte = pci_read_config8(PCI_DEV(0,0x1f,0),GEN_PMCON_3);
9 if( byte & RTC_FAILED){
10 //clear bit 1 and bit 2
11 byte = cmos_read(RTC_BOOT_BYTE);
13 byte |= CONFIG_MAX_REBOOT_CNT << 4;
14 cmos_write(byte, RTC_BOOT_BYTE);