diff options
author | Christian Mauderer <Christian.Mauderer@embedded-brains.de> | 2017-11-17 09:21:59 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2017-11-17 14:13:40 +0100 |
commit | d00a7d1c22fd6e9965ef22c77aaf3be1b418e694 (patch) | |
tree | a15b5add00ae50b197ebdffdf2c4d02188236c4c /c/src/lib/libbsp/arm/atsam/include/atsam-clock-config.h | |
parent | bsp/atsam: Make clock application configurable. (diff) | |
download | rtems-d00a7d1c22fd6e9965ef22c77aaf3be1b418e694.tar.bz2 |
bsp/atsam: Move clock and SDRAM init to SRAM.
If necessary, the BSP can now have it's clock and SDRAM initialization
in the SRAM instead of the SDRAM. This allows to change the clock
frequency during the startup of an SDRAM application.
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 | 10 |
1 files changed, 10 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 index acf0d0be75..396986894b 100644 --- a/c/src/lib/libbsp/arm/atsam/include/atsam-clock-config.h +++ b/c/src/lib/libbsp/arm/atsam/include/atsam-clock-config.h @@ -23,6 +23,14 @@ 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; @@ -32,6 +40,7 @@ struct atsam_clock_config { 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) @@ -43,6 +52,7 @@ struct BOARD_Sdram_Config { uint32_t sdramc_cfr1; }; +ATSAM_START_SRAM_SECTION extern const struct BOARD_Sdram_Config BOARD_Sdram_Config; #ifdef __cplusplus |