Files
OpenCellular/include/clock.h
Randall Spangler 7ecb8358b9 Disable PLL at end of init
This saves power.

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

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

Get a proto1 system modified with INA current sensor

1) From chroot:
  dut-control i2c_mux_en:on i2c_mux:rem
  dut-control pp3300_alw_mv pp3300_alw_ma

2) From EC console:
pll
(this should turn the PLL back on; it'll report clock frequency ~66MHz)

3) From chroot:
  dut-control i2c_mux_en:on i2c_mux:rem
  dut-control pp3300_alw_mv pp3300_alw_ma
Current (ma) should be bigger than in step 1

Change-Id: I806953684c57fd60bf481acb01dddffe2f2ad0ed
2012-04-24 09:59:31 -07:00

27 lines
678 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.
*/
/* Clocks and power management settings */
#ifndef __CROS_EC_CLOCK_H
#define __CROS_EC_CLOCK_H
#include "common.h"
/* Set the CPU clocks and PLLs. */
int clock_init(void);
/* Return the current clock frequency in Hz. */
int clock_get_freq(void);
/* Enable or disable the PLL. */
int clock_enable_pll(int enable);
/* Wait <cycles> system clock cycles. Simple busy waiting for before
* clocks/timers are initialized. */
void clock_wait_cycles(uint32_t cycles);
#endif /* __CROS_EC_CLOCK_H */