mc146818.cc (5949:04ed7a1d9904) mc146818.cc (6617:6d3645f68654)
1/*
2 * Copyright (c) 2004-2005 The Regents of The University of Michigan
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

--- 82 unchanged lines hidden (view full) ---

91 switch (addr) {
92 case RTC_STAT_REGA:
93 // The "update in progress" bit is read only.
94 if ((data & ~RTCA_UIP) != (RTCA_32768HZ | RTCA_1024HZ))
95 panic("Unimplemented RTC register A value write!\n");
96 replaceBits(stat_regA, data, 6, 0);
97 break;
98 case RTC_STAT_REGB:
1/*
2 * Copyright (c) 2004-2005 The Regents of The University of Michigan
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

--- 82 unchanged lines hidden (view full) ---

91 switch (addr) {
92 case RTC_STAT_REGA:
93 // The "update in progress" bit is read only.
94 if ((data & ~RTCA_UIP) != (RTCA_32768HZ | RTCA_1024HZ))
95 panic("Unimplemented RTC register A value write!\n");
96 replaceBits(stat_regA, data, 6, 0);
97 break;
98 case RTC_STAT_REGB:
99 if ((data & ~(RTCB_PRDC_IE | RTCB_SQWE)) != (RTCB_BIN | RTCB_24HR))
99 if ((data & ~(RTCB_PRDC_IE | RTCB_SQWE)) != RTCB_24HR)
100 panic("Write to RTC reg B bits that are not implemented!\n");
101
102 if (data & RTCB_PRDC_IE) {
103 if (!event.scheduled())
104 event.scheduleIntr();
105 } else {
106 if (event.scheduled())
107 deschedule(event);

--- 85 unchanged lines hidden ---
100 panic("Write to RTC reg B bits that are not implemented!\n");
101
102 if (data & RTCB_PRDC_IE) {
103 if (!event.scheduled())
104 event.scheduleIntr();
105 } else {
106 if (event.scheduled())
107 deschedule(event);

--- 85 unchanged lines hidden ---