blob: 396986894ba9e1d15ad68e4b06e744070cdeb755 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
|
/*
* 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 */
#if ATSAM_CHANGE_CLOCK_FROM_SRAM != 0
/* Note: fast_text is the simplest section to put this code into. Other
* possibilities would include creating a new section. */
#define ATSAM_START_SRAM_SECTION BSP_FAST_TEXT_SECTION
#else
#define ATSAM_START_SRAM_SECTION
#endif
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;
};
ATSAM_START_SRAM_SECTION
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;
};
ATSAM_START_SRAM_SECTION
extern const struct BOARD_Sdram_Config BOARD_Sdram_Config;
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* ATSAM_CLOCK_CONFIG_H */
|