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

4.115
Last change on this file since c499856 was c499856, checked in by Chris Johns <chrisj@…>, on 03/20/14 at 21:10:47

Change all references of rtems.com to rtems.org.

  • 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.org/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#include <mpc55xx/siu.h>
35
36#ifdef __cplusplus
37extern "C" {
38#endif /* __cplusplus */
39
40typedef struct {
41  uint32_t index : 10;
42  uint32_t count : 10;
43  uint32_t output : 1;
44  union SIU_PCR_tag pcr;
45} mpc55xx_siu_pcr_config;
46
47extern BSP_START_DATA_SECTION const mpc55xx_siu_pcr_config
48  mpc55xx_start_config_siu_pcr [];
49
50extern BSP_START_DATA_SECTION const size_t
51  mpc55xx_start_config_siu_pcr_count [];
52
53extern BSP_START_DATA_SECTION const struct
54  MMU_tag mpc55xx_start_config_mmu_early [];
55
56extern BSP_START_DATA_SECTION const size_t
57  mpc55xx_start_config_mmu_early_count [];
58
59extern BSP_START_DATA_SECTION const struct
60  MMU_tag mpc55xx_start_config_mmu [];
61
62extern BSP_START_DATA_SECTION const size_t
63  mpc55xx_start_config_mmu_count [];
64
65#ifdef MPC55XX_HAS_FMPLL
66  typedef struct {
67    union FMPLL_SYNCR_tag syncr_tmp;
68    union FMPLL_SYNCR_tag syncr_final;
69  } mpc55xx_clock_config;
70#endif
71
72#ifdef MPC55XX_HAS_FMPLL_ENHANCED
73  typedef struct {
74    union FMPLL_ESYNCR2_tag esyncr2_tmp;
75    union FMPLL_ESYNCR2_tag esyncr2_final;
76    union FMPLL_ESYNCR1_tag esyncr1_final;
77  } mpc55xx_clock_config;
78#endif
79
80#ifdef MPC55XX_HAS_MODE_CONTROL
81  typedef struct {
82    struct {
83      PLLD_CR_32B_tag cr;
84      PLLD_MR_32B_tag mr;
85    } fmpll [2];
86    CGM_OC_EN_32B_tag oc_en;
87    CGM_OCDS_SC_32B_tag ocds_sc;
88    CGM_SC_DC0_3_32B_tag sc_dc0_3;
89    CGM_AUXCLK_tag auxclk [5];
90  } mpc55xx_clock_config;
91#endif
92
93extern BSP_START_DATA_SECTION const mpc55xx_clock_config
94  mpc55xx_start_config_clock [];
95
96#ifdef MPC55XX_HAS_EBI
97  typedef struct {
98    union EBI_MCR_tag ebi_mcr;
99    uint32_t siu_eccr_ebdf;
100  } mpc55xx_ebi_config;
101
102  extern BSP_START_DATA_SECTION const mpc55xx_ebi_config
103    mpc55xx_start_config_ebi [];
104
105  extern BSP_START_DATA_SECTION const size_t
106    mpc55xx_start_config_ebi_count [];
107
108  extern BSP_START_DATA_SECTION const struct EBI_CS_tag
109    mpc55xx_start_config_ebi_cs [];
110
111  extern BSP_START_DATA_SECTION const size_t
112    mpc55xx_start_config_ebi_cs_count [];
113
114  extern BSP_START_DATA_SECTION const struct EBI_CAL_CS_tag
115    mpc55xx_start_config_ebi_cal_cs [];
116
117  extern BSP_START_DATA_SECTION const size_t
118    mpc55xx_start_config_ebi_cal_cs_count [];
119#endif
120
121/**
122 * @brief Start prologue.
123 *
124 * In case the BSP enabled the MPC55XX_ENABLE_START_PROLOGUE option, then this
125 * function will be called directly after the Boot Assist Module (BAM) jumped
126 * to the start entry defined by the reset configuration.
127 *
128 * This function executes in the context initialized by the BAM.  There exists
129 * no valid stack pointer and the internal RAM has an invalid ECC state.
130 *
131 * The default implementation does nothing.  The application may provide its
132 * own implementation.
133 */
134void mpc55xx_start_prologue(void);
135
136void mpc55xx_start_early(void);
137
138void mpc55xx_start_flash(void);
139
140void mpc55xx_start_cache(void);
141
142void mpc55xx_start_clock(void);
143
144void mpc55xx_start_watchdog(void);
145
146void mpc55xx_start_mmu_apply_config(const struct MMU_tag *config, size_t count);
147
148uint32_t mpc55xx_get_system_clock(void);
149
150LINKER_SYMBOL(bsp_ram_start)
151LINKER_SYMBOL(bsp_ram_end)
152LINKER_SYMBOL(bsp_ram_size)
153
154LINKER_SYMBOL(bsp_ram_1_start)
155LINKER_SYMBOL(bsp_ram_1_end)
156LINKER_SYMBOL(bsp_ram_1_size)
157
158LINKER_SYMBOL(bsp_rom_start)
159LINKER_SYMBOL(bsp_rom_end)
160LINKER_SYMBOL(bsp_rom_size)
161
162#ifdef MPC55XX_BOOTFLAGS
163  extern uint32_t mpc55xx_bootflag_0 [];
164#endif
165
166#ifdef __cplusplus
167}
168#endif /* __cplusplus */
169
170#endif /* LIBBSP_POWERPC_MPC55XXEVB_MPC55XX_CONFIG_H */
Note: See TracBrowser for help on using the repository browser.