summaryrefslogtreecommitdiff
path: root/dev/tsunami_io.cc
diff options
context:
space:
mode:
authorKevin Lim <ktlim@umich.edu>2005-02-04 18:25:49 -0500
committerKevin Lim <ktlim@umich.edu>2005-02-04 18:25:49 -0500
commit1e7a744c09d0bde70e0f83179fdf4d6059585e4b (patch)
tree9bbc7713c4bb79abb3f76b07547d8822f0557caa /dev/tsunami_io.cc
parentc389c2e327cc3ee1c988855b05505660c6670172 (diff)
parentb78d7c2f16dac11ed468de45a088a362605c6493 (diff)
downloadgem5-1e7a744c09d0bde70e0f83179fdf4d6059585e4b.tar.xz
Hand merge
--HG-- extra : convert_revision : 86c7399b79c17558041a73056745227f70fe8b3b
Diffstat (limited to 'dev/tsunami_io.cc')
-rw-r--r--dev/tsunami_io.cc23
1 files changed, 12 insertions, 11 deletions
diff --git a/dev/tsunami_io.cc b/dev/tsunami_io.cc
index a223c95c7..94a951d2c 100644
--- a/dev/tsunami_io.cc
+++ b/dev/tsunami_io.cc
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004 The Regents of The University of Michigan
+ * Copyright (c) 2004-2005 The Regents of The University of Michigan
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -45,6 +45,7 @@
#include "sim/builder.hh"
#include "dev/tsunami_cchip.hh"
#include "dev/tsunamireg.h"
+#include "dev/rtcreg.h"
#include "mem/functional_mem/memory_control.hh"
using namespace std;
@@ -217,36 +218,36 @@ TsunamiIO::read(MemReqPtr &req, uint8_t *data)
return No_Fault;
case TSDEV_RTC_DATA:
switch(RTCAddress) {
- case RTC_CONTROL_REGISTERA:
+ case RTC_CNTRL_REGA:
*(uint8_t*)data = uip << 7 | 0x26;
uip = !uip;
return No_Fault;
- case RTC_CONTROL_REGISTERB:
+ case RTC_CNTRL_REGB:
// DM and 24/12 and UIE
*(uint8_t*)data = 0x46;
return No_Fault;
- case RTC_CONTROL_REGISTERC:
+ case RTC_CNTRL_REGC:
// If we want to support RTC user access in linux
// This won't work, but for now it's fine
*(uint8_t*)data = 0x00;
return No_Fault;
- case RTC_CONTROL_REGISTERD:
+ case RTC_CNTRL_REGD:
panic("RTC Control Register D not implemented");
- case RTC_SECOND:
+ case RTC_SEC:
*(uint8_t *)data = tm.tm_sec;
return No_Fault;
- case RTC_MINUTE:
+ case RTC_MIN:
*(uint8_t *)data = tm.tm_min;
return No_Fault;
- case RTC_HOUR:
+ case RTC_HR:
*(uint8_t *)data = tm.tm_hour;
return No_Fault;
- case RTC_DAY_OF_WEEK:
+ case RTC_DOW:
*(uint8_t *)data = tm.tm_wday;
return No_Fault;
- case RTC_DAY_OF_MONTH:
+ case RTC_DOM:
*(uint8_t *)data = tm.tm_mday;
- case RTC_MONTH:
+ case RTC_MON:
*(uint8_t *)data = tm.tm_mon + 1;
return No_Fault;
case RTC_YEAR: