summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/dev/SConscript2
-rw-r--r--src/dev/i2c/I2C.py (renamed from src/dev/I2C.py)4
-rw-r--r--src/dev/i2c/bus.cc (renamed from src/dev/i2cbus.cc)3
-rw-r--r--src/dev/i2c/bus.hh (renamed from src/dev/i2cbus.hh)9
-rw-r--r--src/dev/i2c/device.hh (renamed from src/dev/i2cdev.hh)6
5 files changed, 12 insertions, 12 deletions
diff --git a/src/dev/SConscript b/src/dev/SConscript
index 53bb28456..4bacb3e3f 100644
--- a/src/dev/SConscript
+++ b/src/dev/SConscript
@@ -42,7 +42,6 @@ if env['TARGET_ISA'] == 'null':
SimObject('BadDevice.py')
SimObject('DiskImage.py')
SimObject('Ethernet.py')
-SimObject('I2C.py')
SimObject('Ide.py')
SimObject('Platform.py')
SimObject('SimpleDisk.py')
@@ -63,7 +62,6 @@ Source('multi_etherlink.cc')
Source('tcp_iface.cc')
Source('etherpkt.cc')
Source('ethertap.cc')
-Source('i2cbus.cc')
Source('i8254xGBe.cc')
Source('ide_ctrl.cc')
Source('ide_disk.cc')
diff --git a/src/dev/I2C.py b/src/dev/i2c/I2C.py
index 2ac463fbc..f249d0648 100644
--- a/src/dev/I2C.py
+++ b/src/dev/i2c/I2C.py
@@ -41,11 +41,11 @@ from Device import BasicPioDevice
class I2CDevice(SimObject):
type = 'I2CDevice'
- cxx_header = "dev/i2cdev.hh"
+ cxx_header = "dev/i2c/device.hh"
abstract = True
i2c_addr = Param.UInt8("Address of device on i2c bus")
class I2CBus(BasicPioDevice):
type = 'I2CBus'
- cxx_header = "dev/i2cbus.hh"
+ cxx_header = "dev/i2c/bus.hh"
devices = VectorParam.I2CDevice([], "Devices")
diff --git a/src/dev/i2cbus.cc b/src/dev/i2c/bus.cc
index 03ca6769c..af5d6c825 100644
--- a/src/dev/i2cbus.cc
+++ b/src/dev/i2c/bus.cc
@@ -37,9 +37,10 @@
* Authors: Peter Enns
*/
-#include "dev/i2cbus.hh"
+#include "dev/i2c/bus.hh"
#include "debug/Checkpoint.hh"
+#include "dev/i2c/device.hh"
#include "mem/packet_access.hh"
// clang complains about std::set being overloaded with Packet::set if
diff --git a/src/dev/i2cbus.hh b/src/dev/i2c/bus.hh
index 7212a59fd..d4f02b827 100644
--- a/src/dev/i2cbus.hh
+++ b/src/dev/i2c/bus.hh
@@ -42,15 +42,16 @@
* Implementiation of an i2c bus
*/
-#ifndef __DEV_I2CBUS__
-#define __DEV_I2CBUS__
+#ifndef __DEV_I2C_BUS_HH__
+#define __DEV_I2C_BUS_HH__
#include <map>
-#include "dev/i2cdev.hh"
#include "dev/io_device.hh"
#include "params/I2CBus.hh"
+class I2CDevice;
+
class I2CBus : public BasicPioDevice
{
protected:
@@ -150,4 +151,4 @@ class I2CBus : public BasicPioDevice
void unserialize(CheckpointIn &cp) override;
};
-#endif //__DEV_I2CBUS
+#endif // __DEV_I2C_BUS_HH__
diff --git a/src/dev/i2cdev.hh b/src/dev/i2c/device.hh
index d101483fd..efef2bf5e 100644
--- a/src/dev/i2cdev.hh
+++ b/src/dev/i2c/device.hh
@@ -42,8 +42,8 @@
* All i2c devices should derive from this class.
*/
-#ifndef __DEV_I2CDEV__
-#define __DEV_I2CDEV__
+#ifndef __DEV_I2C_DEVICE_HH__
+#define __DEV_I2C_DEVICE_HH__
#include "base/types.hh"
#include "params/I2CDevice.hh"
@@ -93,4 +93,4 @@ class I2CDevice : public SimObject
};
-#endif // __DEV_I2CDEV__
+#endif // __DEV_I2C_DEVICE__