timer_sp804.cc (7733:08d6a773d1b6) | timer_sp804.cc (7823:dac01f14f20f) |
---|---|
1/* 2 * Copyright (c) 2010 ARM Limited 3 * All rights reserved 4 * 5 * The license below extends only to copyright in the software and shall 6 * not be construed as granting a license to any other intellectual 7 * property including but not limited to intellectual property relating 8 * to a hardware implementation of the functionality of the software --- 79 unchanged lines hidden (view full) --- 88 switch(daddr) { 89 case LoadReg: 90 pkt->set<uint32_t>(loadValue); 91 break; 92 case CurrentReg: 93 DPRINTF(Timer, "Event schedule for %d, clock=%d, prescale=%d\n", 94 zeroEvent.when(), clock, control.timerPrescale); 95 Tick time; | 1/* 2 * Copyright (c) 2010 ARM Limited 3 * All rights reserved 4 * 5 * The license below extends only to copyright in the software and shall 6 * not be construed as granting a license to any other intellectual 7 * property including but not limited to intellectual property relating 8 * to a hardware implementation of the functionality of the software --- 79 unchanged lines hidden (view full) --- 88 switch(daddr) { 89 case LoadReg: 90 pkt->set<uint32_t>(loadValue); 91 break; 92 case CurrentReg: 93 DPRINTF(Timer, "Event schedule for %d, clock=%d, prescale=%d\n", 94 zeroEvent.when(), clock, control.timerPrescale); 95 Tick time; |
96 time = zeroEvent.when() - curTick; | 96 time = zeroEvent.when() - curTick(); |
97 time = time / clock / power(16, control.timerPrescale); 98 DPRINTF(Timer, "-- returning counter at %d\n", time); 99 pkt->set<uint32_t>(time); 100 break; 101 case ControlReg: 102 pkt->set<uint32_t>(control); 103 break; 104 case RawISR: --- 78 unchanged lines hidden (view full) --- 183 time *= bits(val,15,0); 184 else 185 time *= val; 186 187 if (zeroEvent.scheduled()) { 188 DPRINTF(Timer, "-- Event was already schedule, de-scheduling\n"); 189 parent->deschedule(zeroEvent); 190 } | 97 time = time / clock / power(16, control.timerPrescale); 98 DPRINTF(Timer, "-- returning counter at %d\n", time); 99 pkt->set<uint32_t>(time); 100 break; 101 case ControlReg: 102 pkt->set<uint32_t>(control); 103 break; 104 case RawISR: --- 78 unchanged lines hidden (view full) --- 183 time *= bits(val,15,0); 184 else 185 time *= val; 186 187 if (zeroEvent.scheduled()) { 188 DPRINTF(Timer, "-- Event was already schedule, de-scheduling\n"); 189 parent->deschedule(zeroEvent); 190 } |
191 parent->schedule(zeroEvent, curTick + time); 192 DPRINTF(Timer, "-- Scheduling new event for: %d\n", curTick + time); | 191 parent->schedule(zeroEvent, curTick() + time); 192 DPRINTF(Timer, "-- Scheduling new event for: %d\n", curTick() + time); |
193} 194 195void 196Sp804::Timer::counterAtZero() 197{ 198 if (!control.timerEnable) 199 return; 200 --- 94 unchanged lines hidden --- | 193} 194 195void 196Sp804::Timer::counterAtZero() 197{ 198 if (!control.timerEnable) 199 return; 200 --- 94 unchanged lines hidden --- |