source: rtems/c/src/lib/libbsp/powerpc/mpc55xxevb/include/mpc55xx-config.h @ 4b53f191

4.115
Last change on this file since 4b53f191 was 4b53f191, checked in by Sebastian Huber <sebastian.huber@…>, on 02/06/13 at 10:38:29

bsp/mpc55xx: Add MPC55XX_ENABLE_START_PROLOGUE

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