summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDoug Anderson <dianders@chromium.org>2011-10-20 16:04:53 -0700
committerDoug Anderson <dianders@chromium.org>2011-10-25 10:15:15 -0700
commit28f587c69545fee3d7f2c3f2239d1e26bcc91141 (patch)
tree5a9fe08f040e9e025865996ca5d017cd18e4a2ac
parentd69f2460c5db7d74b8431d4f1c373b6bd1b7e38a (diff)
pmu: Move definition of abs() and stp() out of pmu header file
These two functions were only used in pmu.c, so there was no reason for them to be in the header file. They probably should be moved elsewhere eventually, but this is a better location than they were. BUG=None TEST=Compiled Change-Id: Ia13cfd0fd828589862bfd555c3a34d3b6b4bda1c Signed-off-by: Doug Anderson <dianders@chromium.org> Reviewed-on: http://gerrit.chromium.org/gerrit/10455 Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Warren <twarren@nvidia.com>
-rw-r--r--arch/arm/include/asm/arch-tegra2/pmu.h14
-rw-r--r--board/nvidia/common/pmu.c14
2 files changed, 14 insertions, 14 deletions
diff --git a/arch/arm/include/asm/arch-tegra2/pmu.h b/arch/arm/include/asm/arch-tegra2/pmu.h
index cf150a9b16a..140636edf19 100644
--- a/arch/arm/include/asm/arch-tegra2/pmu.h
+++ b/arch/arm/include/asm/arch-tegra2/pmu.h
@@ -24,20 +24,6 @@
#ifndef _PMU_H_
#define _PMU_H_
-/*
- * abs() handles unsigned ints, shorts and chars and returns a signed long.
- */
-#define abs(x) ({ \
- long ret; \
- { \
- typeof((x)) __x = (x); \
- ret = (__x < 0) ? -__x : __x; \
- } \
- ret; \
- })
-
-#define stp(x, y) ((x < y) ? VDD_TRANSITION_STEP : -VDD_TRANSITION_STEP)
-
#define DVC_I2C_BUS_NUMBER 0
#define PMU_I2C_ADDRESS 0x34
diff --git a/board/nvidia/common/pmu.c b/board/nvidia/common/pmu.c
index 71da479f27e..a71d436baf4 100644
--- a/board/nvidia/common/pmu.c
+++ b/board/nvidia/common/pmu.c
@@ -32,6 +32,20 @@
#include <i2c.h>
#include "board.h"
+/*
+ * abs() handles unsigned ints, shorts and chars and returns a signed long.
+ */
+#define abs(x) ({ \
+ long ret; \
+ { \
+ typeof((x)) __x = (x); \
+ ret = (__x < 0) ? -__x : __x; \
+ } \
+ ret; \
+ })
+
+#define stp(x, y) ((x < y) ? VDD_TRANSITION_STEP : -VDD_TRANSITION_STEP)
+
struct vdd_settings {
int data;
int nominal;