[Skiboot] [PATCH 1/3] dts: remove unused defines

Cédric Le Goater clg at kaod.org
Sat Jan 21 02:29:36 AEDT 2017


Also move the definitions closer to the code using them.

Signed-off-by: Cédric Le Goater <clg at kaod.org>
---
 hw/dts.c | 23 ++++++-----------------
 1 file changed, 6 insertions(+), 17 deletions(-)

diff --git a/hw/dts.c b/hw/dts.c
index dbbe35b4c651..4d7e38fe749b 100644
--- a/hw/dts.c
+++ b/hw/dts.c
@@ -21,23 +21,6 @@
 #include <skiboot.h>
 #include <opal-api.h>
 
-/* Per core Digital Thermal Sensors */
-#define EX_THERM_DTS_RESULT0	0x10050000
-#define EX_THERM_DTS_RESULT1	0x10050001
-
-/* Per core Digital Thermal Sensors control registers */
-#define EX_THERM_MODE_REG	0x1005000F
-#define EX_THERM_CONTROL_REG	0x10050012
-#define EX_THERM_ERR_STATUS_REG	0x10050013
-
-/* Per memory controller Digital Thermal Sensors */
-#define THERM_MEM_DTS_RESULT0	0x2050000
-
-/* Per memory controller Digital Thermal Sensors control registers */
-#define THERM_MEM_MODE_REG	0x205000F
-#define THERM_MEM_CONTROL_REG	0x2050012
-#define THERM_MEM_ERR_STATUS_REG	0x2050013
-
 struct dts {
 	uint8_t		valid;
 	uint8_t		trip;
@@ -132,6 +115,10 @@ static void dts_decode_one_dts(uint16_t raw, struct dts *dts)
 	}
 }
 
+/* Per core Digital Thermal Sensors */
+#define EX_THERM_DTS_RESULT0	0x10050000
+#define EX_THERM_DTS_RESULT1	0x10050001
+
 /* Different sensor locations */
 #define P8_CT_ZONE_LSU	0
 #define P8_CT_ZONE_ISU	1
@@ -209,6 +196,8 @@ static int dts_read_core_temp(uint32_t pir, struct dts *dts)
 	return rc;
 }
 
+/* Per memory controller Digital Thermal Sensors */
+#define THERM_MEM_DTS_RESULT0	0x2050000
 
 /* Different sensor locations */
 #define P8_MEM_DTS0	0
-- 
2.7.4



More information about the Skiboot mailing list