source: rtems/bsps/powerpc/mpc55xxevb/include/bsp/mpc55xx-config.h @ e560ee85

Last change on this file since e560ee85 was e560ee85, checked in by Joel Sherrill <joel@…>, on 03/01/22 at 21:38:55

bsps/powerpc/: Scripted embedded brains header file clean up

Updates #4625.

  • Property mode set to 100644
File size: 3.9 KB
Line 
1/**
2 * @file
3 *
4 * @ingroup RTEMSBSPsPowerPCMPC55XX
5 *
6 * @brief Low-level configuration.
7 */
8
9/*
10 * Copyright (c) 2008-2012 embedded brains GmbH.  All rights reserved.
11 *
12 * The license and distribution terms for this file may be
13 * found in the file LICENSE in this distribution or at
14 * http://www.rtems.org/license/LICENSE.
15 */
16
17#ifndef LIBBSP_POWERPC_MPC55XXEVB_MPC55XX_CONFIG_H
18#define LIBBSP_POWERPC_MPC55XXEVB_MPC55XX_CONFIG_H
19
20#include <stddef.h>
21
22#include <libcpu/powerpc-utility.h>
23
24#include <bsp/start.h>
25
26#include <mpc55xx/regs.h>
27#include <mpc55xx/regs-mmu.h>
28#include <mpc55xx/siu.h>
29
30#ifdef __cplusplus
31extern "C" {
32#endif /* __cplusplus */
33
34typedef struct {
35  uint32_t index : 10;
36  uint32_t count : 10;
37  uint32_t output : 1;
38  union SIU_PCR_tag pcr;
39} mpc55xx_siu_pcr_config;
40
41extern BSP_START_DATA_SECTION const mpc55xx_siu_pcr_config
42  mpc55xx_start_config_siu_pcr [];
43
44extern BSP_START_DATA_SECTION const size_t
45  mpc55xx_start_config_siu_pcr_count [];
46
47extern BSP_START_DATA_SECTION const struct
48  MMU_tag mpc55xx_start_config_mmu_early [];
49
50extern BSP_START_DATA_SECTION const size_t
51  mpc55xx_start_config_mmu_early_count [];
52
53extern BSP_START_DATA_SECTION const struct
54  MMU_tag mpc55xx_start_config_mmu [];
55
56extern BSP_START_DATA_SECTION const size_t
57  mpc55xx_start_config_mmu_count [];
58
59#ifdef MPC55XX_HAS_FMPLL
60  typedef struct {
61    union FMPLL_SYNCR_tag syncr_tmp;
62    union FMPLL_SYNCR_tag syncr_final;
63  } mpc55xx_clock_config;
64#endif
65
66#ifdef MPC55XX_HAS_FMPLL_ENHANCED
67  typedef struct {
68    union FMPLL_ESYNCR2_tag esyncr2_tmp;
69    union FMPLL_ESYNCR2_tag esyncr2_final;
70    union FMPLL_ESYNCR1_tag esyncr1_final;
71  } mpc55xx_clock_config;
72#endif
73
74#ifdef MPC55XX_HAS_MODE_CONTROL
75  typedef struct {
76    struct {
77      PLLD_CR_32B_tag cr;
78      PLLD_MR_32B_tag mr;
79    } fmpll [2];
80    CGM_OC_EN_32B_tag oc_en;
81    CGM_OCDS_SC_32B_tag ocds_sc;
82    CGM_SC_DC0_3_32B_tag sc_dc0_3;
83    CGM_AUXCLK_tag auxclk [5];
84  } mpc55xx_clock_config;
85#endif
86
87extern BSP_START_DATA_SECTION const mpc55xx_clock_config
88  mpc55xx_start_config_clock [];
89
90#ifdef MPC55XX_HAS_EBI
91  typedef struct {
92    union EBI_MCR_tag ebi_mcr;
93    uint32_t siu_eccr_ebdf;
94  } mpc55xx_ebi_config;
95
96  extern BSP_START_DATA_SECTION const mpc55xx_ebi_config
97    mpc55xx_start_config_ebi [];
98
99  extern BSP_START_DATA_SECTION const size_t
100    mpc55xx_start_config_ebi_count [];
101
102  extern BSP_START_DATA_SECTION const struct EBI_CS_tag
103    mpc55xx_start_config_ebi_cs [];
104
105  extern BSP_START_DATA_SECTION const size_t
106    mpc55xx_start_config_ebi_cs_count [];
107
108  extern BSP_START_DATA_SECTION const struct EBI_CAL_CS_tag
109    mpc55xx_start_config_ebi_cal_cs [];
110
111  extern BSP_START_DATA_SECTION const size_t
112    mpc55xx_start_config_ebi_cal_cs_count [];
113#endif
114
115/**
116 * @brief Start prologue.
117 *
118 * In case the BSP enabled the MPC55XX_ENABLE_START_PROLOGUE option, then this
119 * function will be called directly after the Boot Assist Module (BAM) jumped
120 * to the start entry defined by the reset configuration.
121 *
122 * This function executes in the context initialized by the BAM.  There exists
123 * no valid stack pointer and the internal RAM has an invalid ECC state.
124 *
125 * The default implementation does nothing.  The application may provide its
126 * own implementation.
127 */
128void mpc55xx_start_prologue(void);
129
130void mpc55xx_start_early(void);
131
132void mpc55xx_start_flash(void);
133
134void mpc55xx_start_cache(void);
135
136void mpc55xx_start_clock(void);
137
138void mpc55xx_start_watchdog(void);
139
140void mpc55xx_start_mmu_apply_config(const struct MMU_tag *config, size_t count);
141
142uint32_t mpc55xx_get_system_clock(void);
143
144LINKER_SYMBOL(bsp_ram_start)
145LINKER_SYMBOL(bsp_ram_end)
146LINKER_SYMBOL(bsp_ram_size)
147
148LINKER_SYMBOL(bsp_ram_1_start)
149LINKER_SYMBOL(bsp_ram_1_end)
150LINKER_SYMBOL(bsp_ram_1_size)
151
152LINKER_SYMBOL(bsp_rom_start)
153LINKER_SYMBOL(bsp_rom_end)
154LINKER_SYMBOL(bsp_rom_size)
155
156#ifdef MPC55XX_BOOTFLAGS
157  extern uint32_t mpc55xx_bootflag_0 [];
158#endif
159
160#ifdef __cplusplus
161}
162#endif /* __cplusplus */
163
164#endif /* LIBBSP_POWERPC_MPC55XXEVB_MPC55XX_CONFIG_H */
Note: See TracBrowser for help on using the repository browser.