RTEMS  5.1
atsam-clock-config.h
1 /*
2  * Copyright (c) 2017 embedded brains GmbH. All rights reserved.
3  *
4  * embedded brains GmbH
5  * Dornierstr. 4
6  * 82178 Puchheim
7  * Germany
8  * <rtems@embedded-brains.de>
9  *
10  * The license and distribution terms for this file may be
11  * found in the file LICENSE in this distribution or at
12  * http://www.rtems.org/license/LICENSE.
13  */
14 
15 #ifndef ATSAM_CLOCK_CONFIG_H
16 #define ATSAM_CLOCK_CONFIG_H
17 
18 #include <rtems.h>
19 #include <bsp/linker-symbols.h>
20 #include <bspopts.h>
21 
22 #ifdef __cplusplus
23 extern "C" {
24 #endif /* __cplusplus */
25 
26 #if ATSAM_CHANGE_CLOCK_FROM_SRAM != 0
27 /* Note: fast_text is the simplest section to put this code into. Other
28  * possibilities would include creating a new section. */
29 #define ATSAM_START_SRAM_SECTION BSP_FAST_TEXT_SECTION
30 #else
31 #define ATSAM_START_SRAM_SECTION
32 #endif
33 
35  /* Initialization value for the PMC_PLLAR. */
36  uint32_t pllar_init;
37  /* Initialization value for the PMC_MCKR. */
38  uint32_t mckr_init;
39  /* Resulting frequency in Hz. */
40  uint32_t mck_freq;
41 };
42 
43 ATSAM_START_SRAM_SECTION
44 extern const struct atsam_clock_config atsam_clock_config;
45 
46 #define BOARD_MCK (atsam_clock_config.mck_freq)
47 
48 typedef struct BOARD_Sdram_Config {
49  uint32_t sdramc_tr;
50  uint32_t sdramc_cr;
51  uint32_t sdramc_mdr;
52  uint32_t sdramc_cfr1;
53  uint32_t sdramc_lpr;
55 
56 ATSAM_START_SRAM_SECTION
58 
59 #ifdef __cplusplus
60 }
61 #endif /* __cplusplus */
62 
63 #endif /* ATSAM_CLOCK_CONFIG_H */
Definition: atsam-clock-config.h:48
Definition: atsam-clock-config.h:34