tsunami_io.cc (5606:6da7a58b0bc8) tsunami_io.cc (5635:b65e232e7755)
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;

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

109 // no load physical byte instruction
110 pkt->set(picr);
111 break;
112 case TSDEV_PIC2_ISR:
113 // PIC2 not implemnted... just return 0
114 pkt->set(0x00);
115 break;
116 case TSDEV_TMR0_DATA:
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;

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

109 // no load physical byte instruction
110 pkt->set(picr);
111 break;
112 case TSDEV_PIC2_ISR:
113 // PIC2 not implemnted... just return 0
114 pkt->set(0x00);
115 break;
116 case TSDEV_TMR0_DATA:
117 pkt->set(pitimer.counter0.read());
117 pkt->set(pitimer.readCounter(0));
118 break;
119 case TSDEV_TMR1_DATA:
118 break;
119 case TSDEV_TMR1_DATA:
120 pkt->set(pitimer.counter1.read());
120 pkt->set(pitimer.readCounter(1));
121 break;
122 case TSDEV_TMR2_DATA:
121 break;
122 case TSDEV_TMR2_DATA:
123 pkt->set(pitimer.counter2.read());
123 pkt->set(pitimer.readCounter(2));
124 break;
125 case TSDEV_RTC_DATA:
126 pkt->set(rtc.readData(rtcAddr));
127 break;
128 case TSDEV_CTRL_PORTB:
124 break;
125 case TSDEV_RTC_DATA:
126 pkt->set(rtc.readData(rtcAddr));
127 break;
128 case TSDEV_CTRL_PORTB:
129 if (pitimer.counter2.outputHigh())
129 if (pitimer.outputHigh(2))
130 pkt->set(PORTB_SPKR_HIGH);
131 else
132 pkt->set(0x00);
133 break;
134 default:
135 panic("I/O Read - va%#x size %d\n", pkt->getAddr(), pkt->getSize());
136 }
137 } else if (pkt->getSize() == sizeof(uint64_t)) {

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

184 break;
185 case TSDEV_DMA1_MODE:
186 mode1 = pkt->get<uint8_t>();
187 break;
188 case TSDEV_DMA2_MODE:
189 mode2 = pkt->get<uint8_t>();
190 break;
191 case TSDEV_TMR0_DATA:
130 pkt->set(PORTB_SPKR_HIGH);
131 else
132 pkt->set(0x00);
133 break;
134 default:
135 panic("I/O Read - va%#x size %d\n", pkt->getAddr(), pkt->getSize());
136 }
137 } else if (pkt->getSize() == sizeof(uint64_t)) {

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

184 break;
185 case TSDEV_DMA1_MODE:
186 mode1 = pkt->get<uint8_t>();
187 break;
188 case TSDEV_DMA2_MODE:
189 mode2 = pkt->get<uint8_t>();
190 break;
191 case TSDEV_TMR0_DATA:
192 pitimer.counter0.write(pkt->get<uint8_t>());
192 pitimer.writeCounter(0, pkt->get<uint8_t>());
193 break;
194 case TSDEV_TMR1_DATA:
193 break;
194 case TSDEV_TMR1_DATA:
195 pitimer.counter1.write(pkt->get<uint8_t>());
195 pitimer.writeCounter(1, pkt->get<uint8_t>());
196 break;
197 case TSDEV_TMR2_DATA:
196 break;
197 case TSDEV_TMR2_DATA:
198 pitimer.counter2.write(pkt->get<uint8_t>());
198 pitimer.writeCounter(2, pkt->get<uint8_t>());
199 break;
200 case TSDEV_TMR_CTRL:
201 pitimer.writeControl(pkt->get<uint8_t>());
202 break;
203 case TSDEV_RTC_ADDR:
204 rtcAddr = pkt->get<uint8_t>();
205 break;
206 case TSDEV_RTC_DATA:

--- 83 unchanged lines hidden ---
199 break;
200 case TSDEV_TMR_CTRL:
201 pitimer.writeControl(pkt->get<uint8_t>());
202 break;
203 case TSDEV_RTC_ADDR:
204 rtcAddr = pkt->get<uint8_t>();
205 break;
206 case TSDEV_RTC_DATA:

--- 83 unchanged lines hidden ---