From aa80cc9edbfb46b1a83342a32858c1cf48ac61a2 Mon Sep 17 00:00:00 2001 From: Glenn Bergmans Date: Fri, 22 Jan 2016 15:40:14 +0000 Subject: [PATCH] arm: DT autogeneration - Generate energy controller node Adds Device Tree methods for the energy controller to allow for DVFS simulations with automatically generated DTB files Change-Id: Id8682f07dff1bbe63987e757faa0694e03ee86ab Reviewed-by: Andreas Sandberg Reviewed-by: Curtis Dunham Reviewed-on: https://gem5-review.googlesource.com/5966 Maintainer: Andreas Sandberg --- src/dev/arm/EnergyCtrl.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/dev/arm/EnergyCtrl.py b/src/dev/arm/EnergyCtrl.py index 4e504bf80..571f94178 100644 --- a/src/dev/arm/EnergyCtrl.py +++ b/src/dev/arm/EnergyCtrl.py @@ -1,4 +1,4 @@ -# Copyright (c) 2012-2014 ARM Limited +# Copyright (c) 2012-2014, 2016 ARM Limited # All rights reserved. # # The license below extends only to copyright in the software and shall @@ -35,13 +35,23 @@ # # Authors: Vasileios Spiliopoulos # Akash Bagdia +# Glenn Bergmans from m5.params import * from m5.SimObject import SimObject from Device import BasicPioDevice from m5.proxy import * +from m5.util.fdthelper import * class EnergyCtrl(BasicPioDevice): type = 'EnergyCtrl' cxx_header = "dev/arm/energy_ctrl.hh" dvfs_handler = Param.DVFSHandler(Parent.dvfs_handler, "DVFS handler") + + def generateDeviceTree(self, state): + node = self.generateBasicPioDeviceNode(state, 'gem5_energy_ctrl', + self.pio_addr, 0x1000) + + node.appendCompatible("arm,gem5-energy-ctrl") + + yield node -- 2.30.2