amba_device.hh (7584:28ddf6d9e982) amba_device.hh (7587:177151a54462)
1/*
2 * Copyright (c) 2010 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

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

45 * This is a base class for AMBA devices that have to respond to Device and
46 * Implementer ID calls.
47 */
48
49#ifndef __DEV_ARM_AMBA_DEVICE_H__
50#define __DEV_ARM_AMBA_DEVICE_H__
51
52#include "base/range.hh"
1/*
2 * Copyright (c) 2010 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

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

45 * This is a base class for AMBA devices that have to respond to Device and
46 * Implementer ID calls.
47 */
48
49#ifndef __DEV_ARM_AMBA_DEVICE_H__
50#define __DEV_ARM_AMBA_DEVICE_H__
51
52#include "base/range.hh"
53#include "mem/packet.hh"
54#include "mem/packet_access.hh"
53#include "dev/io_device.hh"
54#include "params/AmbaDevice.hh"
55#include "dev/io_device.hh"
56#include "params/AmbaDevice.hh"
57#include "params/AmbaDmaDevice.hh"
55
58
59namespace AmbaDev {
60
61const int AMBA_PER_ID0 = 0xFE0;
62const int AMBA_PER_ID1 = 0xFE4;
63const int AMBA_PER_ID2 = 0xFE8;
64const int AMBA_PER_ID3 = 0xFEC;
65const int AMBA_CEL_ID0 = 0xFF0;
66const int AMBA_CEL_ID1 = 0xFF4;
67const int AMBA_CEL_ID2 = 0xFF8;
68const int AMBA_CEL_ID3 = 0xFFC;
69
70bool readId(PacketPtr pkt, uint64_t amba_id, Addr pio_addr);
71}
72
56class AmbaDevice : public BasicPioDevice
57{
58 protected:
73class AmbaDevice : public BasicPioDevice
74{
75 protected:
59 static const int AMBA_PER_ID0 = 0xFE0;
60 static const int AMBA_PER_ID1 = 0xFE4;
61 static const int AMBA_PER_ID2 = 0xFE8;
62 static const int AMBA_PER_ID3 = 0xFEC;
63 static const int AMBA_CEL_ID0 = 0xFF0;
64 static const int AMBA_CEL_ID1 = 0xFF4;
65 static const int AMBA_CEL_ID2 = 0xFF8;
66 static const int AMBA_CEL_ID3 = 0xFFC;
67
68 uint64_t ambaId;
69
70 public:
76 uint64_t ambaId;
77
78 public:
71 typedef AmbaDeviceParams Params;
72 const Params *
73 params() const
74 {
75 return dynamic_cast<const Params *>(_params);
76 }
79 typedef AmbaDeviceParams Params;
77 AmbaDevice(const Params *p);
80 AmbaDevice(const Params *p);
81};
78
82
79 bool readId(PacketPtr pkt);
83class AmbaDmaDevice : public DmaDevice
84{
85 protected:
86 uint64_t ambaId;
87
88 public:
89 typedef AmbaDmaDeviceParams Params;
90 AmbaDmaDevice(const Params *p);
80};
81
91};
92
82#endif //__DEV_ARM_AMBA_FAKE_H__
93
94#endif //__DEV_ARM_AMBA_DEVICE_H__