#include <app/clk-config.h>
#include <board/clk.h>
#include <flash/flashc.h>
#include <pm/pm_v2.h>


Go to the source code of this file.
Enumerations | |
| enum | pm_mainclk_src |
| Main clock source. More... | |
| enum | pm_pll_src |
| PLL clock source. More... | |
| enum | pm_genclk_src |
| Generic clock source. More... | |
Functions | |
| static uint32_t | pm_priv_osc_startup (unsigned long us) |
| Get the OSCCTRL startup value corresponding to a given number of microseconds. | |
| static unsigned long | get_main_clock_rate (void) |
| Get the main synchronous clock rate in Hz. | |
| static unsigned long | get_cpu_clock_rate (void) |
| Get the CPU clock rate in Hz. | |
| static unsigned long | get_hsb_clock_rate (void) |
| Get the HSB clock rate in Hz. | |
| static unsigned long | get_pba_clock_rate (void) |
| Get the PBA clock rate in Hz. | |
| static unsigned long | get_pbb_clock_rate (void) |
| Get the PBB clock rate in Hz. | |
| static unsigned long | get_smc_hclk_rate (void) |
| Get the rate of the bus clock connected to the SMC. | |
| static unsigned long | get_usart_pclk_rate (unsigned int id) |
| Get the rate of the bus clock connected to a USART. | |
| static unsigned long | get_spi_pclk_rate (unsigned int id) |
| Get the rate of the bus clock connected to a SPI controller. | |
| static unsigned long | get_mci_pclk_rate (unsigned int id) |
| Get the rate of the bus clock connected to a MMC controller. | |
| static void | pm_init_osc (unsigned int id) |
| Enable an on-chip oscillator. | |
| static int | clk_enable_usbb (void) |
| Enable the USBB clock. | |
Variables | |
| unsigned long | main_clock_rate |
| The main clock rate in Hz, if not constant. | |
Definition in file clk.h.
| enum pm_genclk_src |
| enum pm_mainclk_src |
| enum pm_pll_src |
| static int clk_enable_usbb | ( | void | ) | [inline, static] |
Enable the USBB clock.
Definition at line 328 of file clk.h.
Referenced by usbb_init().
| static unsigned long get_cpu_clock_rate | ( | void | ) | [inline, static] |
| static unsigned long get_hsb_clock_rate | ( | void | ) | [inline, static] |
Get the HSB clock rate in Hz.
Definition at line 220 of file clk.h.
Referenced by get_smc_hclk_rate().
| static unsigned long get_main_clock_rate | ( | void | ) | [inline, static] |
| static unsigned long get_mci_pclk_rate | ( | unsigned int | id | ) | [inline, static] |
Get the rate of the bus clock connected to a MMC controller.
| id | The ID of the MMC controller of which to query the bus clock rate. |
Definition at line 275 of file clk.h.
References get_pba_clock_rate().
Referenced by sdmmc_mcihost_init().

| static unsigned long get_pba_clock_rate | ( | void | ) | [inline, static] |
Get the PBA clock rate in Hz.
Definition at line 226 of file clk.h.
Referenced by get_mci_pclk_rate(), and timer_init().
| static unsigned long get_pbb_clock_rate | ( | void | ) | [inline, static] |
Get the PBB clock rate in Hz.
Definition at line 232 of file clk.h.
Referenced by get_spi_pclk_rate(), and get_usart_pclk_rate().
| static unsigned long get_smc_hclk_rate | ( | void | ) | [inline, static] |
Get the rate of the bus clock connected to the SMC.
Definition at line 239 of file clk.h.
References get_hsb_clock_rate().

| static unsigned long get_spi_pclk_rate | ( | unsigned int | id | ) | [inline, static] |
Get the rate of the bus clock connected to a SPI controller.
| id | The ID of the SPI controller of which to query the bus clock rate. |
Definition at line 263 of file clk.h.
References get_pbb_clock_rate().

| static unsigned long get_usart_pclk_rate | ( | unsigned int | id | ) | [inline, static] |
Get the rate of the bus clock connected to a USART.
| id | The ID of the USART of which to query the bus clock rate. |
Definition at line 251 of file clk.h.
References get_pbb_clock_rate().

| static void pm_init_osc | ( | unsigned int | id | ) | [inline, static] |
Enable an on-chip oscillator.
| id | The ID of the oscillator to enable (0 or 1). |
| STATUS_OK | The oscillator was successfully started | |
| -STATUS_TIMEOUT | Timed out waiting for the oscillator to start |
Definition at line 288 of file clk.h.
References assert, BOARD_OSC0_STARTUP_US, BOARD_OSC0_XTAL, BOARD_OSC1_STARTUP_US, BOARD_OSC1_XTAL, pm_priv_osc_startup(), and unhandled_case.

| static uint32_t pm_priv_osc_startup | ( | unsigned long | us | ) | [inline, static] |
Get the OSCCTRL startup value corresponding to a given number of microseconds.
For internal use only.
| us | The startup time in microseconds |
Definition at line 95 of file clk.h.
References build_assert, and is_constant.
Referenced by pm_init_osc().
| unsigned long main_clock_rate |
The main clock rate in Hz, if not constant.
Definition at line 60 of file pm.c.
Referenced by pm_priv_set_main_clock().
1.5.8