kmi.hh (12659:3b44e9f66aac) | kmi.hh (12664:4e4555947641) |
---|---|
1/* 2 * Copyright (c) 2010, 2017-2018 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 --- 92 unchanged lines hidden (view full) --- 101 BitUnion8(InterruptReg) 102 Bitfield<0> rx; 103 Bitfield<1> tx; 104 EndBitUnion(InterruptReg) 105 106 /** raw interrupt register (unmasked) */ 107 InterruptReg rawInterrupts; 108 | 1/* 2 * Copyright (c) 2010, 2017-2018 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 --- 92 unchanged lines hidden (view full) --- 101 BitUnion8(InterruptReg) 102 Bitfield<0> rx; 103 Bitfield<1> tx; 104 EndBitUnion(InterruptReg) 105 106 /** raw interrupt register (unmasked) */ 107 InterruptReg rawInterrupts; 108 |
109 /** Update the status of the interrupt registers and schedule an interrupt 110 * if required */ 111 void updateIntStatus(); | 109 /** Set or clear the TX interrupt */ 110 void setTxInt(bool value); |
112 | 111 |
113 /** Function to generate interrupt */ 114 void generateInterrupt(); | 112 /** Update the RX interrupt using PS/2 device state */ 113 void updateRxInt(); |
115 | 114 |
116 /** Get interrupt value */ 117 InterruptReg getInterrupt() const; | 115 /** 116 * Update the status of the interrupt and control registers and 117 * deliver an interrupt if required. 118 */ 119 void updateIntCtrl(InterruptReg ints, ControlReg ctrl); |
118 | 120 |
119 /** Wrapper to create an event out of the thing */ 120 EventFunctionWrapper intEvent; | 121 void setInterrupts(InterruptReg ints) { updateIntCtrl(ints, control); } 122 void setControl(ControlReg ctrl) { updateIntCtrl(rawInterrupts, ctrl); } |
121 | 123 |
124 /** Get current interrupt value */ 125 InterruptReg getInterrupt() const; 126 |
|
122 /** PS2 device connected to this KMI interface */ 123 PS2Device *ps2; 124 125 public: 126 Pl050(const Pl050Params *p); 127 128 Tick read(PacketPtr pkt) override; 129 Tick write(PacketPtr pkt) override; 130 131 void serialize(CheckpointOut &cp) const override; 132 void unserialize(CheckpointIn &cp) override; 133}; 134 135#endif // __DEV_ARM_PL050_HH__ | 127 /** PS2 device connected to this KMI interface */ 128 PS2Device *ps2; 129 130 public: 131 Pl050(const Pl050Params *p); 132 133 Tick read(PacketPtr pkt) override; 134 Tick write(PacketPtr pkt) override; 135 136 void serialize(CheckpointOut &cp) const override; 137 void unserialize(CheckpointIn &cp) override; 138}; 139 140#endif // __DEV_ARM_PL050_HH__ |