i8254.hh (5636:27a9526eea1f) i8254.hh (5642:102cf92b8ea9)
1/*
2 * Copyright (c) 2008 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;

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

39{
40
41class IntPin;
42
43class I8254 : public BasicPioDevice
44{
45 protected:
46 Tick latency;
1/*
2 * Copyright (c) 2008 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;

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

39{
40
41class IntPin;
42
43class I8254 : public BasicPioDevice
44{
45 protected:
46 Tick latency;
47 Intel8254Timer pit;
47 class X86Intel8254Timer : public Intel8254Timer
48 {
49 protected:
50 I8254 * parent;
48
51
52 void
53 counterInterrupt(unsigned int num)
54 {
55 parent->counterInterrupt(num);
56 }
57
58 public:
59 X86Intel8254Timer(const std::string &name, I8254 * _parent) :
60 Intel8254Timer(_parent, name), parent(_parent)
61 {}
62 };
63
64
65 X86Intel8254Timer pit;
66
49 IntPin *intPin;
67 IntPin *intPin;
68
69 void counterInterrupt(unsigned int num);
50
51 public:
52 typedef I8254Params Params;
53
54 const Params *
55 params() const
56 {
57 return dynamic_cast<const Params *>(_params);
58 }
59
60 I8254(Params *p) : BasicPioDevice(p), latency(p->pio_latency),
70
71 public:
72 typedef I8254Params Params;
73
74 const Params *
75 params() const
76 {
77 return dynamic_cast<const Params *>(_params);
78 }
79
80 I8254(Params *p) : BasicPioDevice(p), latency(p->pio_latency),
61 pit(this, p->name), intPin(p->int_pin)
81 pit(p->name, this), intPin(p->int_pin)
62 {
63 pioSize = 4;
64 }
65 Tick read(PacketPtr pkt);
66
67 Tick write(PacketPtr pkt);
68
69 bool

--- 27 unchanged lines hidden ---
82 {
83 pioSize = 4;
84 }
85 Tick read(PacketPtr pkt);
86
87 Tick write(PacketPtr pkt);
88
89 bool

--- 27 unchanged lines hidden ---