[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cobalt-developers] Time Problems



The Patch

/* ------------------ mfg-fix-rtc.c ------------------*/
/* original by Tim Hockin, Cobalt Networks            */
#include <stdio.h>
#include <sys/io.h>


int main(int argc, char *argv[])
{
        unsigned char tmp;


        if (ioperm(0x70, 2, 1)) {
                perror("ioperm");
                return 2;
        }


        outb(0xb, 0x70);
        tmp = inb(0x71);
        outb(tmp | 0x80, 0x71);


        outb(0xa, 0x70);
        outb(0x26, 0x71);


        outb(0xb, 0x70);
        outb(0x2, 0x71);


        outb(0xb, 0x70);
        tmp = inb(0x71);
        outb(tmp & ~0x80, 0x71);


        return 0;
}
/* ------------------ mfg-fix-rtc.c ------------------ */



I forget how I compiled it but you run this ONCE and all is fixed.

Contact Cobalt about its use.

Barry

----------------------------------------------------------------------------------------------------------
Barry Titmarsh BMT1-RIPE           Nacamar Ltd (Sheringham Office)
                                                  Knole House 38 Cromer Rd
                                                  Sheringham Norfolk NR268RR
e-mail: barry@xxxxxxxxxxxxxx      voice: +44-1263-821-844
www: www.nacamar.net.uk
----------------------------------------------------------------------------------------------------------