From e9328ac4f63351b4282916034270aa86b7e74922 Mon Sep 17 00:00:00 2001 From: Randall Spangler Date: Fri, 6 Apr 2012 09:33:41 -0700 Subject: 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 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 --- include/watchdog.h | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'include/watchdog.h') diff --git a/include/watchdog.h b/include/watchdog.h index 75a5e0b4a5..569352bc6a 100644 --- a/include/watchdog.h +++ b/include/watchdog.h @@ -1,21 +1,21 @@ -/* Copyright (c) 2011 The Chromium OS Authors. All rights reserved. +/* 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 _WATCHDOG_H -#define _WATCHDOG_H +#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); -/** - * Initialize the watchdog - * with a reloading period of milliseconds. - * It reboots the CPU if the counter has not been reloaded for twice the period. - */ -int watchdog_init(int period_ms); +/* Notifies the module the system clock frequency has changed to . */ +void watchdog_clock_changed(int freq); -#endif /* _WATCHDOG_H */ +#endif /* __CROS_EC_WATCHDOG_H */ -- cgit v1.2.1