Deleted Added
sdiff udiff text old ( 3943:68e673d2db04 ) new ( 4762:c94e103c83ad )
full compact
1/*
2 * Copyright (c) 2004-2005 The Regents of The University of Michigan
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

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

32
33/** @file
34 * Tsunami I/O Space mapping including RTC/timer interrupts
35 */
36
37#ifndef __DEV_TSUNAMI_IO_HH__
38#define __DEV_TSUNAMI_IO_HH__
39
40#include "dev/io_device.hh"
41#include "base/range.hh"
42#include "dev/alpha/tsunami.hh"
43#include "sim/eventq.hh"
44
45/**
46 * Tsunami I/O device is a catch all for all the south bridge stuff we care
47 * to implement.
48 */
49class TsunamiIO : public BasicPioDevice
50{

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

80 const std::string &name() const { return _name; }
81
82 /** RTC periodic interrupt event */
83 RTCEvent event;
84
85 /** Current RTC register address/index */
86 int addr;
87
88 /** should the year be interpreted as BCD? */
89 bool year_is_bcd;
90
91 /** Data for real-time clock function */
92 union {
93 uint8_t clock_data[10];
94
95 struct {
96 uint8_t sec;
97 uint8_t sec_alrm;
98 uint8_t min;

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

109 /** RTC status register A */
110 uint8_t stat_regA;
111
112 /** RTC status register B */
113 uint8_t stat_regB;
114
115 public:
116 RTC(const std::string &name, Tsunami* tsunami,
117 const std::vector<int> &t, bool bcd, Tick i);
118
119 /** RTC address port: write address of RTC RAM data to access */
120 void writeAddr(const uint8_t data);
121
122 /** RTC write data */
123 void writeData(const uint8_t data);
124
125 /** RTC read data */

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

308
309 public:
310 /**
311 * Return the freqency of the RTC
312 * @return interrupt rate of the RTC
313 */
314 Tick frequency() const;
315
316 struct Params : public BasicPioDevice::Params
317 {
318 Tick frequency;
319 Tsunami *tsunami;
320 std::vector<int> init_time;
321 bool year_is_bcd;
322 };
323
324 protected:
325 const Params *params() const { return (const Params*)_params; }
326
327 public:
328 /**
329 * Initialize all the data for devices supported by Tsunami I/O.
330 * @param p pointer to Params struct
331 */
332 TsunamiIO(Params *p);
333
334 virtual Tick read(PacketPtr pkt);
335 virtual Tick write(PacketPtr pkt);
336
337 /**
338 * Post an PIC interrupt to the CPU via the CChip
339 * @param bitvector interrupt to post.
340 */
341 void postPIC(uint8_t bitvector);

--- 23 unchanged lines hidden ---