@@ -22,10 +22,10 @@
#include <linux/platform_device.h>
#include <linux/thermal.h>
-#define KIRKWOOD_THERMAL_VALID_OFFSET 9
-#define KIRKWOOD_THERMAL_VALID_MASK 0x1
-#define KIRKWOOD_THERMAL_TEMP_OFFSET 10
-#define KIRKWOOD_THERMAL_TEMP_MASK 0x1FF
+#define MVEBU_THERMAL_VALID_OFFSET 9
+#define MVEBU_THERMAL_VALID_MASK 0x1
+#define MVEBU_THERMAL_TEMP_OFFSET 10
+#define MVEBU_THERMAL_TEMP_MASK 0x1FF
/* Marvell EBU Thermal Sensor Dev Structure */
struct mvebu_thermal_priv {
@@ -41,15 +41,15 @@ static int mvebu_get_temp(struct thermal_zone_device *thermal,
reg = readl_relaxed(priv->sensor);
/* Valid check */
- if (!((reg >> KIRKWOOD_THERMAL_VALID_OFFSET) &
- KIRKWOOD_THERMAL_VALID_MASK)) {
+ if (!((reg >> MVEBU_THERMAL_VALID_OFFSET) &
+ MVEBU_THERMAL_VALID_MASK)) {
dev_err(&thermal->device,
"Temperature sensor reading not valid\n");
return -EIO;
}
- reg = (reg >> KIRKWOOD_THERMAL_TEMP_OFFSET) &
- KIRKWOOD_THERMAL_TEMP_MASK;
+ reg = (reg >> MVEBU_THERMAL_TEMP_OFFSET) &
+ MVEBU_THERMAL_TEMP_MASK;
*temp = ((2363302UL - (7339*reg)) / 10);
return 0;
This definitions will be also valid for other SoC, such as Armada 370 and Armada XP. Therefore we rename them as 'mvebu'. Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com> --- drivers/thermal/mvebu_thermal.c | 16 ++++++++-------- 1 files changed, 8 insertions(+), 8 deletions(-)