rtc_pl031.cc (12772:362544959c40) rtc_pl031.cc (13230:2988dc5d1d6f)
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

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

87 data = rawInt;
88 break;
89 case MaskedISR:
90 data = pendingInt;
91 break;
92 default:
93 if (readId(pkt, ambaId, pioAddr)) {
94 // Hack for variable sized access
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

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

87 data = rawInt;
88 break;
89 case MaskedISR:
90 data = pendingInt;
91 break;
92 default:
93 if (readId(pkt, ambaId, pioAddr)) {
94 // Hack for variable sized access
95 data = pkt->get();
95 data = pkt->getLE<uint32_t>();
96 break;
97 }
98 panic("Tried to read PL031 at offset %#x that doesn't exist\n", daddr);
99 break;
100 }
101
102 switch(pkt->getSize()) {
103 case 1:
96 break;
97 }
98 panic("Tried to read PL031 at offset %#x that doesn't exist\n", daddr);
99 break;
100 }
101
102 switch(pkt->getSize()) {
103 case 1:
104 pkt->set(data);
104 pkt->setLE<uint8_t>(data);
105 break;
106 case 2:
105 break;
106 case 2:
107 pkt->set(data);
107 pkt->setLE<uint16_t>(data);
108 break;
109 case 4:
108 break;
109 case 4:
110 pkt->set(data);
110 pkt->setLE<uint32_t>(data);
111 break;
112 default:
113 panic("Uart read size too big?\n");
114 break;
115 }
116
117
118 pkt->makeAtomicResponse();

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

126 assert(pkt->getSize() == 4);
127 Addr daddr = pkt->getAddr() - pioAddr;
128 DPRINTF(Timer, "Writing to RTC at offset: %#x\n", daddr);
129
130 switch (daddr) {
131 case DataReg:
132 break;
133 case MatchReg:
111 break;
112 default:
113 panic("Uart read size too big?\n");
114 break;
115 }
116
117
118 pkt->makeAtomicResponse();

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

126 assert(pkt->getSize() == 4);
127 Addr daddr = pkt->getAddr() - pioAddr;
128 DPRINTF(Timer, "Writing to RTC at offset: %#x\n", daddr);
129
130 switch (daddr) {
131 case DataReg:
132 break;
133 case MatchReg:
134 matchVal = pkt->get();
134 matchVal = pkt->getLE<uint32_t>();
135 resyncMatch();
136 break;
137 case LoadReg:
138 lastWrittenTick = curTick();
135 resyncMatch();
136 break;
137 case LoadReg:
138 lastWrittenTick = curTick();
139 timeVal = pkt->get();
139 timeVal = pkt->getLE<uint32_t>();
140 loadVal = timeVal;
141 resyncMatch();
142 break;
143 case ControlReg:
144 break; // Can't stop when started
145 case IntMask:
140 loadVal = timeVal;
141 resyncMatch();
142 break;
143 case ControlReg:
144 break; // Can't stop when started
145 case IntMask:
146 maskInt = pkt->get();
146 maskInt = pkt->getLE<uint32_t>();
147 break;
148 case IntClear:
147 break;
148 case IntClear:
149 if (pkt->get()) {
149 if (pkt->getLE<uint32_t>()) {
150 rawInt = false;
151 pendingInt = false;
152 }
153 break;
154 default:
155 if (readId(pkt, ambaId, pioAddr))
156 break;
157 panic("Tried to read PL031 at offset %#x that doesn't exist\n", daddr);

--- 90 unchanged lines hidden ---
150 rawInt = false;
151 pendingInt = false;
152 }
153 break;
154 default:
155 if (readId(pkt, ambaId, pioAddr))
156 break;
157 panic("Tried to read PL031 at offset %#x that doesn't exist\n", daddr);

--- 90 unchanged lines hidden ---