Files
OpenCellular/include/watchdog.h
Randall Spangler e9328ac4f6 Support dynamically changing the system clock
Add nopll command to turn off the PLL, reducing the system clock to 16Mhz.

Signed-off-by: Randall Spangler <rspangler@chromium.org>

BUG=chrome-os-partner:8798
TEST=manual

boot system
press power button to boot x86
temps   // should print all temperatures
timerinfo
timerinfo
timerinfo  // convince yourself this is counting up at about 1MHz
nopll  // this drops the system clock to 16MHz
temps   // should still print all temperatures
timerinfo
timerinfo
timerinfo  // should still be counting up at about 1MHz

Change-Id: Ie29ceb17af348148bffadf63d60c1b731f4c3f6d
2012-04-09 10:33:35 -07:00

22 lines
661 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.
*/
/* Watchdog driver */
#ifndef __CROS_EC_WATCHDOG_H
#define __CROS_EC_WATCHDOG_H
/* Initialize the watchdog. This will cause the CPU to reboot if it has been
* more than 2 watchdog periods since watchdog_reload() has been called. */
int watchdog_init(int period_ms);
/* Reload the watchdog counter */
void watchdog_reload(void);
/* Notifies the module the system clock frequency has changed to <freq>. */
void watchdog_clock_changed(int freq);
#endif /* __CROS_EC_WATCHDOG_H */