System clock management is fairly straightforward apart from one thing: Enabling and disabling bus bridges. When all peripherals on a given bus are disabled, the bridge to the bus may be disabled. Only the PBA, PBB and PBC busses support this, and it is not practical to disable the PBA bridge as it includes the Power Manager, so turning it off would make it impossible to turn anything back on again.
Functions | |
void | sysclk_priv_disable_module (unsigned int bus_id, unsigned int module_index) |
Disable a maskable module clock. More... | |
void | sysclk_priv_enable_module (unsigned int bus_id, unsigned int module_index) |
Enable a maskable module clock. More... | |
Initial module clock masks | |
These are the mask values written to the xxxMASK registers during initialization if the user has overridden the default behavior of all clocks left enabled. These values assume that:
| |
#define | SYSCLK_INIT_MINIMAL_CPUMASK |
Initial value of CPUMASK. More... | |
#define | SYSCLK_INIT_MINIMAL_HSBMASK |
Initial value of HSBMASK. More... | |
#define | SYSCLK_INIT_MINIMAL_PBAMASK |
Initial value of PBAMASK. More... | |
#define | SYSCLK_INIT_MINIMAL_PBBMASK 0 |
Initial value of PBBMASK. More... | |
#define | SYSCLK_INIT_MINIMAL_PBCMASK 0 |
Initial value of PBCMASK. More... | |
#define SYSCLK_INIT_MINIMAL_CPUMASK |
Initial value of CPUMASK.
Referenced by sysclk_init().
#define SYSCLK_INIT_MINIMAL_HSBMASK |
Initial value of HSBMASK.
Referenced by sysclk_init().
#define SYSCLK_INIT_MINIMAL_PBAMASK |
Initial value of PBAMASK.
Referenced by sysclk_init().
#define SYSCLK_INIT_MINIMAL_PBBMASK 0 |
Initial value of PBBMASK.
Referenced by sysclk_init().
#define SYSCLK_INIT_MINIMAL_PBCMASK 0 |
Initial value of PBCMASK.
Referenced by sysclk_init().
void sysclk_priv_disable_module | ( | unsigned int | bus_id, |
unsigned int | module_index | ||
) |
Disable a maskable module clock.
bus_id | Bus index, given by the AVR32_PM_CLK_GRP_xxx definitions. |
module_index | Index of the module to be disabled. This is the bit number in the corresponding xxxMASK register. |
References cpu_irq_restore(), and cpu_irq_save().
Referenced by sysclk_disable_cpu_module(), sysclk_disable_hsb_module(), sysclk_disable_pba_module(), sysclk_disable_pbb_module(), and sysclk_disable_pbc_module().
void sysclk_priv_enable_module | ( | unsigned int | bus_id, |
unsigned int | module_index | ||
) |
Enable a maskable module clock.
bus_id | Bus index, given by the AVR32_PM_CLK_GRP_xxx definitions. |
module_index | Index of the module to be enabled. This is the bit number in the corresponding xxxMASK register. |
References cpu_irq_restore(), and cpu_irq_save().
Referenced by sysclk_enable_cpu_module(), sysclk_enable_hsb_module(), sysclk_enable_pba_module(), sysclk_enable_pbb_module(), and sysclk_enable_pbc_module().