=================================================================== RCS file: /cvs/funnyos/arch/sam7s64/dev/sartt.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- funnyos/arch/sam7s64/dev/sartt.c 2007/11/24 20:51:30 1.1 +++ funnyos/arch/sam7s64/dev/sartt.c 2007/12/16 23:23:16 1.2 @@ -1,5 +1,5 @@ /* - * $Id: sartt.c,v 1.1 2007/11/24 20:51:30 nbrk Exp $ + * $Id: sartt.c,v 1.2 2007/12/16 23:23:16 nbrk Exp $ */ #include #include @@ -9,7 +9,6 @@ #include #include -#include /* XXX */ #include /* @@ -73,11 +72,8 @@ panic("sartt_sethz: can't calibrate timer: default device not configured\n"); /* program prescaler (which is 2^16/HZ) and enable timer interrupts */ - bus_write_4(sarttdd->sr_bhp, (uint32_t)AT91C_RTTC_RTMR, AT91C_RTTC_RTTINCIEN | (32768 / hz)); - - /* enable coresponding interrupt source in AIC */ - saaic_unmask_intr(1); - /* XXX should not be here */ + //bus_write_4(sarttdd->sr_bhp, (uint32_t)AT91C_RTTC_RTMR, AT91C_RTTC_RTTINCIEN | (32768 / hz)); + bus_write_4(sarttdd->sr_bhp, (uint32_t)AT91C_RTTC_RTMR, AT91C_RTTC_RTTRST | 32768); } @@ -90,8 +86,7 @@ if (sarttdd == NULL) panic("sartt_getsec: can't get seconds from rtc: default device not configured\n"); - /* TODO */ - return(0); + return(bus_read_4(sarttdd->sr_bhp, (uint32_t)AT91C_RTTC_RTVR)); }