Files
OpenCellular/include/jtag.h
Alec Berg 10bd1db6d7 lm4: Use low speed clock in deep sleep.
Changed the low power idle task to use the low speed clock in deep
sleep. The low power idle task is currently only enabled for Peppy,
Slippy, and Falco. This change decreases power consumption when
the AP is not running.

Note that the low speed clock is slow enough that the JTAG cannot be
used and the EC console UART cannot be used. To work around that,
this commit detects when the JTAG is in use and when the EC console
is in use, and will not use the low speed clock if either is in use.
The JTAG in use never clears after being set and the console in use
clears after a fixed timeout period.

BUG=None
BRANCH=None
TEST=Passes all unit tests.
Tested that the EC console works when in deep sleep.
Tested that it is possible to run flash_ec when in deep sleep and
using the low speed clock.

Change-Id: Ia65997eb8e607a5df9b2c7d68e4826bfb1e0194c
Signed-off-by: Alec Berg <alecaberg@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/173326
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
2013-10-21 23:59:38 +00:00

31 lines
607 B
C

/* Copyright (c) 2012 The Chromium OS Authors. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
/* JTAG interface for Chrome EC */
#ifndef __CROS_EC_JTAG_H
#define __CROS_EC_JTAG_H
#include "common.h"
/**
* Pre-initialize the JTAG module.
*/
void jtag_pre_init(void);
#ifdef CONFIG_LOW_POWER_IDLE
/**
* Interrupt handler for JTAG clock.
*
* @param signal Signal which triggered the interrupt.
*/
void jtag_interrupt(enum gpio_signal signal);
#else
#define jtag_interrupt NULL
#endif
#endif /* __CROS_EC_JTAG_H */