diff --git a/devices/memctrl/hmc.cpp b/devices/memctrl/hmc.cpp
index 3909c0f..48736cd 100644
--- a/devices/memctrl/hmc.cpp
+++ b/devices/memctrl/hmc.cpp
@@ -24,6 +24,7 @@ along with this program. If not, see .
Author: Max Poliakovski
*/
+#include
#include
#include
@@ -63,3 +64,9 @@ void HMC::write(uint32_t reg_start, uint32_t offset, uint32_t value, int size)
break;
}
}
+
+static const DeviceDescription Hmc_Descriptor = {
+ HMC::create, {}, {}
+};
+
+REGISTER_DEVICE(HMC, Hmc_Descriptor);
diff --git a/devices/memctrl/hmc.h b/devices/memctrl/hmc.h
index 19a632f..5c6880b 100644
--- a/devices/memctrl/hmc.h
+++ b/devices/memctrl/hmc.h
@@ -35,6 +35,7 @@ along with this program. If not, see .
#include
#include
+#include
/** Bit in the HMC control register telling us where the frame bufffer
for the on-board video is located. */
@@ -45,6 +46,10 @@ public:
HMC();
~HMC() = default;
+ static std::unique_ptr create() {
+ return std::unique_ptr(new HMC());
+ }
+
/* MMIODevice methods */
uint32_t read(uint32_t reg_start, uint32_t offset, int size);
void write(uint32_t reg_start, uint32_t offset, uint32_t value, int size);