summaryrefslogtreecommitdiff
path: root/common/gaia_power.c
diff options
context:
space:
mode:
authorRandall Spangler <rspangler@chromium.org>2012-04-24 17:55:01 -0700
committerRandall Spangler <rspangler@chromium.org>2012-04-24 18:34:46 -0700
commit470916fb0f856945f2a93c7fd160845b5f659be1 (patch)
tree18652a5cff68223ec72650afc12e1e2e727c8529 /common/gaia_power.c
parent135f14bf498ab19b6e75efc3a0d18ef7c8a8752d (diff)
downloadchrome-ec-470916fb0f856945f2a93c7fd160845b5f659be1.tar.gz
Use console output instead of uart output for console commands
This completes console output cleanup. The remaining calls to uart_puts() and uart_printf() actually need to be that way. Signed-off-by: Randall Spangler <rspangler@chromium.org> BUG=chrome-os-partner:7464 TEST=manual Change-Id: Ib1d6d370d30429017b3d11994894fece75fab6ea
Diffstat (limited to 'common/gaia_power.c')
-rw-r--r--common/gaia_power.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/common/gaia_power.c b/common/gaia_power.c
index 110157481c..ec06fb2d98 100644
--- a/common/gaia_power.c
+++ b/common/gaia_power.c
@@ -11,9 +11,12 @@
#include "gpio.h"
#include "task.h"
#include "timer.h"
-#include "uart.h"
#include "util.h"
+/* Console output macros */
+#define CPUTS(outstr) cputs(CC_CHIPSET, outstr)
+#define CPRINTF(format, args...) cprintf(CC_CHIPSET, format, ## args)
+
/* Time necessary for the 5v regulator output to stabilize */
#define DELAY_5V_SETUP 1000 /* 1ms */
@@ -56,7 +59,7 @@ static int wait_in_signal(enum gpio_signal signal, int value, int timeout)
if ((now.val >= deadline.val) ||
(task_wait_event(deadline.val - now.val) ==
TASK_EVENT_TIMER)) {
- uart_printf("Timeout waiting for GPIO %d\n", signal);
+ CPRINTF("Timeout waiting for GPIO %d\n", signal);
return EC_ERROR_TIMEOUT;
}
}
@@ -179,7 +182,7 @@ void gaia_power_task(void)
/* Power ON state */
ap_on = 1;
- uart_printf("AP running ...\n");
+ CPUTS("AP running ...\n");
/* Wait for power off from AP or long power button press */
wait_for_power_off();
@@ -187,7 +190,7 @@ void gaia_power_task(void)
gpio_set_level(GPIO_EN_PP3300, 0);
gpio_set_level(GPIO_EN_PP1350, 0);
gpio_set_level(GPIO_EN_PP5000, 0);
- uart_printf("Shutdown complete.\n");
+ CPUTS("Shutdown complete.\n");
/* Ensure the power button is released */
wait_in_signal(GPIO_EC_PWRON, 0, -1);