dev: Move i2c functionality to src/dev/i2c/

--HG--
rename : src/dev/I2C.py => src/dev/i2c/I2C.py
rename : src/dev/i2cbus.cc => src/dev/i2c/bus.cc
rename : src/dev/i2cbus.hh => src/dev/i2c/bus.hh
rename : src/dev/i2cdev.hh => src/dev/i2c/device.hh
This commit is contained in:
Andreas Sandberg 2015-12-10 10:35:18 +00:00
parent 38e2860c36
commit ef097ac438
5 changed files with 12 additions and 12 deletions

View file

@ -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')

View file

@ -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")

View file

@ -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

View file

@ -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__

View file

@ -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__