summaryrefslogtreecommitdiff
path: root/dev/tsunami_io.cc
diff options
context:
space:
mode:
authorAli Saidi <saidi@eecs.umich.edu>2005-01-30 16:58:39 -0500
committerAli Saidi <saidi@eecs.umich.edu>2005-01-30 16:58:39 -0500
commitda269014dad5dce6136c53914d451ff9e6ef3e62 (patch)
tree9a3630767edd8b566d958f691fbff853ff803d3c /dev/tsunami_io.cc
parentc3aaf43c886b12758e47844eaf3988937e31c42e (diff)
downloadgem5-da269014dad5dce6136c53914d451ff9e6ef3e62.tar.xz
removed all tsunami dependence on tlaserreg.h (RTC defines) and
all but tlaser_node.cc dependence on tlaserreg.h dev/tsunami_io.cc: dev/tsunamireg.h: removed tlaserreg.h --HG-- extra : convert_revision : 148a5d79530e5ed721a49279f684a48041deed2b
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: