diff options
author | Christian Mauderer <Christian.Mauderer@embedded-brains.de> | 2017-07-31 16:18:37 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2017-11-17 14:07:46 +0100 |
commit | 3fbaaa8b743b9514596437aadcc653c897ec0494 (patch) | |
tree | 7d99ac0987b92a7d5f2f2c97f5ebb0e91e275bab /c/src/lib/libbsp/arm/atsam/include/atsam-clock-config.h | |
parent | bsp/atsam: Add getentropy(). (diff) | |
download | rtems-3fbaaa8b743b9514596437aadcc653c897ec0494.tar.bz2 |
bsp/atsam: Make clock application configurable.
Diffstat (limited to 'c/src/lib/libbsp/arm/atsam/include/atsam-clock-config.h')
-rw-r--r-- | c/src/lib/libbsp/arm/atsam/include/atsam-clock-config.h | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/c/src/lib/libbsp/arm/atsam/include/atsam-clock-config.h b/c/src/lib/libbsp/arm/atsam/include/atsam-clock-config.h new file mode 100644 index 0000000000..acf0d0be75 --- /dev/null +++ b/c/src/lib/libbsp/arm/atsam/include/atsam-clock-config.h @@ -0,0 +1,52 @@ +/* + * Copyright (c) 2017 embedded brains GmbH. All rights reserved. + * + * embedded brains GmbH + * Dornierstr. 4 + * 82178 Puchheim + * Germany + * <rtems@embedded-brains.de> + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#ifndef ATSAM_CLOCK_CONFIG_H +#define ATSAM_CLOCK_CONFIG_H + +#include <rtems.h> +#include <bsp/linker-symbols.h> +#include <bspopts.h> + +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + +struct atsam_clock_config { + /* Initialization value for the PMC_PLLAR. */ + uint32_t pllar_init; + /* Initialization value for the PMC_MCKR. */ + uint32_t mckr_init; + /* Resulting frequency in Hz. */ + uint32_t mck_freq; +}; + +extern const struct atsam_clock_config atsam_clock_config; + +#define BOARD_MCK (atsam_clock_config.mck_freq) + +struct BOARD_Sdram_Config { + uint32_t sdramc_tr; + uint32_t sdramc_cr; + uint32_t sdramc_mdr; + uint32_t sdramc_cfr1; +}; + +extern const struct BOARD_Sdram_Config BOARD_Sdram_Config; + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + +#endif /* ATSAM_CLOCK_CONFIG_H */ |