rtc_pl031.cc (8993:d5f9445010da) | rtc_pl031.cc (9806:3f262c18ad5d) |
---|---|
1/* 2 * Copyright (c) 2010-2012 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 --- 34 unchanged lines hidden (view full) --- 43#include "debug/Checkpoint.hh" 44#include "debug/Timer.hh" 45#include "dev/arm/amba_device.hh" 46#include "dev/arm/rtc_pl031.hh" 47#include "dev/mc146818.hh" 48#include "mem/packet.hh" 49#include "mem/packet_access.hh" 50 | 1/* 2 * Copyright (c) 2010-2012 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 --- 34 unchanged lines hidden (view full) --- 43#include "debug/Checkpoint.hh" 44#include "debug/Timer.hh" 45#include "dev/arm/amba_device.hh" 46#include "dev/arm/rtc_pl031.hh" 47#include "dev/mc146818.hh" 48#include "mem/packet.hh" 49#include "mem/packet_access.hh" 50 |
51using namespace AmbaDev; 52 | |
53PL031::PL031(Params *p) 54 : AmbaIntDevice(p), timeVal(mkutctime(&p->time)), lastWrittenTick(0), 55 loadVal(0), matchVal(0), rawInt(false), maskInt(false), 56 pendingInt(false), matchEvent(this) 57{ 58 pioSize = 0xfff; 59} 60 --- 27 unchanged lines hidden (view full) --- 88 break; 89 case RawISR: 90 data = rawInt; 91 break; 92 case MaskedISR: 93 data = pendingInt; 94 break; 95 default: | 51PL031::PL031(Params *p) 52 : AmbaIntDevice(p), timeVal(mkutctime(&p->time)), lastWrittenTick(0), 53 loadVal(0), matchVal(0), rawInt(false), maskInt(false), 54 pendingInt(false), matchEvent(this) 55{ 56 pioSize = 0xfff; 57} 58 --- 27 unchanged lines hidden (view full) --- 86 break; 87 case RawISR: 88 data = rawInt; 89 break; 90 case MaskedISR: 91 data = pendingInt; 92 break; 93 default: |
96 if (AmbaDev::readId(pkt, ambaId, pioAddr)) { | 94 if (readId(pkt, ambaId, pioAddr)) { |
97 // Hack for variable sized access 98 data = pkt->get<uint32_t>(); 99 break; 100 } 101 panic("Tried to read PL031 at offset %#x that doesn't exist\n", daddr); 102 break; 103 } 104 --- 46 unchanged lines hidden (view full) --- 151 break; 152 case IntClear: 153 if (pkt->get<uint32_t>()) { 154 rawInt = false; 155 pendingInt = false; 156 } 157 break; 158 default: | 95 // Hack for variable sized access 96 data = pkt->get<uint32_t>(); 97 break; 98 } 99 panic("Tried to read PL031 at offset %#x that doesn't exist\n", daddr); 100 break; 101 } 102 --- 46 unchanged lines hidden (view full) --- 149 break; 150 case IntClear: 151 if (pkt->get<uint32_t>()) { 152 rawInt = false; 153 pendingInt = false; 154 } 155 break; 156 default: |
159 if (AmbaDev::readId(pkt, ambaId, pioAddr)) | 157 if (readId(pkt, ambaId, pioAddr)) |
160 break; 161 panic("Tried to read PL031 at offset %#x that doesn't exist\n", daddr); 162 break; 163 } 164 165 pkt->makeAtomicResponse(); 166 return pioDelay; 167} --- 84 unchanged lines hidden --- | 158 break; 159 panic("Tried to read PL031 at offset %#x that doesn't exist\n", daddr); 160 break; 161 } 162 163 pkt->makeAtomicResponse(); 164 return pioDelay; 165} --- 84 unchanged lines hidden --- |