Chip-specific generic clock management.
Copyright (c) 2010-2018 Microchip Technology Inc. and its subsidiaries.
Data Structures | |
struct | genclk_config |
Hardware representation of a set of generic clock parameters. More... | |
Macros | |
Chip-specific generic clock definitions | |
#define | GENCLK_DIV_MAX 256 |
Maximum divider supported by the generic clock implementation. More... | |
Enumerations | |
enum | genclk_source { GENCLK_SRC_RCSYS = 0, GENCLK_SRC_OSC32K = 1, GENCLK_SRC_DFLL = 2, GENCLK_SRC_OSC0 = 3, GENCLK_SRC_RC120M = 4, GENCLK_SRC_CLK_CPU = 5, GENCLK_SRC_CLK_HSB = 6, GENCLK_SRC_CLK_PBA = 7, GENCLK_SRC_CLK_PBB = 8, GENCLK_SRC_RC32K = 9, GENCLK_SRC_CLK_1K = 11 } |
Generic clock source ID. More... | |
Functions | |
void | dfll_enable_config_defaults (unsigned int dfll_id) |
Enable the dfll with the default configuration. More... | |
Generic clock configuration | |
static void | genclk_config_defaults (struct genclk_config *cfg, unsigned int id) |
Initialize cfg to the default configuration for the clock identified by id. More... | |
static void | genclk_config_read (struct genclk_config *cfg, unsigned int id) |
Read the currently active configuration of the clock identified by id into cfg. More... | |
static void | genclk_config_write (const struct genclk_config *cfg, unsigned int id) |
Activate the configuration cfg on the clock identified by id. More... | |
static void | genclk_config_set_source (struct genclk_config *cfg, enum genclk_source src) |
Select a new source clock src in configuration cfg. More... | |
static void | genclk_config_set_divider (struct genclk_config *cfg, unsigned int divider) |
Set a new divider in configuration cfg. More... | |
static void | genclk_enable_source (enum genclk_source src) |
Enable the source clock src used by a generic clock. More... | |
Enabling and disabling Generic Clocks | |
static void | genclk_enable (const struct genclk_config *cfg, unsigned int id) |
Activate the configuration cfg on the clock identified by id and enable it. More... | |
static void | genclk_disable (unsigned int id) |
Disable the generic clock identified by id. More... | |