RTEMS 6.3
Loading...
Searching...
No Matches
mpc55xx-config.h
Go to the documentation of this file.
1/* SPDX-License-Identifier: BSD-2-Clause */
2
10
11/*
12 * Copyright (C) 2008, 2012 embedded brains GmbH & Co. KG
13 *
14 * Redistribution and use in source and binary forms, with or without
15 * modification, are permitted provided that the following conditions
16 * are met:
17 * 1. Redistributions of source code must retain the above copyright
18 * notice, this list of conditions and the following disclaimer.
19 * 2. Redistributions in binary form must reproduce the above copyright
20 * notice, this list of conditions and the following disclaimer in the
21 * documentation and/or other materials provided with the distribution.
22 *
23 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
24 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
25 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
26 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
27 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
28 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
29 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
30 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
31 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
32 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
33 * POSSIBILITY OF SUCH DAMAGE.
34 */
35
36#ifndef LIBBSP_POWERPC_MPC55XXEVB_MPC55XX_CONFIG_H
37#define LIBBSP_POWERPC_MPC55XXEVB_MPC55XX_CONFIG_H
38
39#include <stddef.h>
40
42
43#include <bsp/start.h>
44
45#include <mpc55xx/regs.h>
46#include <mpc55xx/regs-mmu.h>
47#include <mpc55xx/siu.h>
48
49#ifdef __cplusplus
50extern "C" {
51#endif /* __cplusplus */
52
53typedef struct {
54 uint32_t index : 10;
55 uint32_t count : 10;
56 uint32_t output : 1;
57 union SIU_PCR_tag pcr;
59
60extern BSP_START_DATA_SECTION const mpc55xx_siu_pcr_config
61 mpc55xx_start_config_siu_pcr [];
62
63extern BSP_START_DATA_SECTION const size_t
64 mpc55xx_start_config_siu_pcr_count [];
65
66extern BSP_START_DATA_SECTION const struct
67 MMU_tag mpc55xx_start_config_mmu_early [];
68
69extern BSP_START_DATA_SECTION const size_t
70 mpc55xx_start_config_mmu_early_count [];
71
72extern BSP_START_DATA_SECTION const struct
73 MMU_tag mpc55xx_start_config_mmu [];
74
75extern BSP_START_DATA_SECTION const size_t
76 mpc55xx_start_config_mmu_count [];
77
78#ifdef MPC55XX_HAS_FMPLL
79 typedef struct {
80 union FMPLL_SYNCR_tag syncr_tmp;
81 union FMPLL_SYNCR_tag syncr_final;
82 } mpc55xx_clock_config;
83#endif
84
85#ifdef MPC55XX_HAS_FMPLL_ENHANCED
86 typedef struct {
87 union FMPLL_ESYNCR2_tag esyncr2_tmp;
88 union FMPLL_ESYNCR2_tag esyncr2_final;
89 union FMPLL_ESYNCR1_tag esyncr1_final;
90 } mpc55xx_clock_config;
91#endif
92
93#ifdef MPC55XX_HAS_MODE_CONTROL
94 typedef struct {
95 struct {
96 PLLD_CR_32B_tag cr;
97 PLLD_MR_32B_tag mr;
98 } fmpll [2];
99 CGM_OC_EN_32B_tag oc_en;
100 CGM_OCDS_SC_32B_tag ocds_sc;
101 CGM_SC_DC0_3_32B_tag sc_dc0_3;
102 CGM_AUXCLK_tag auxclk [5];
103 } mpc55xx_clock_config;
104#endif
105
106extern BSP_START_DATA_SECTION const mpc55xx_clock_config
107 mpc55xx_start_config_clock [];
108
109#ifdef MPC55XX_HAS_EBI
110 typedef struct {
111 union EBI_MCR_tag ebi_mcr;
112 uint32_t siu_eccr_ebdf;
113 } mpc55xx_ebi_config;
114
115 extern BSP_START_DATA_SECTION const mpc55xx_ebi_config
116 mpc55xx_start_config_ebi [];
117
118 extern BSP_START_DATA_SECTION const size_t
119 mpc55xx_start_config_ebi_count [];
120
121 extern BSP_START_DATA_SECTION const struct EBI_CS_tag
122 mpc55xx_start_config_ebi_cs [];
123
124 extern BSP_START_DATA_SECTION const size_t
125 mpc55xx_start_config_ebi_cs_count [];
126
127 extern BSP_START_DATA_SECTION const struct EBI_CAL_CS_tag
128 mpc55xx_start_config_ebi_cal_cs [];
129
130 extern BSP_START_DATA_SECTION const size_t
131 mpc55xx_start_config_ebi_cal_cs_count [];
132#endif
133
147void mpc55xx_start_prologue(void);
148
149void mpc55xx_start_early(void);
150
151void mpc55xx_start_flash(void);
152
153void mpc55xx_start_cache(void);
154
155void mpc55xx_start_clock(void);
156
157void mpc55xx_start_watchdog(void);
158
159void mpc55xx_start_mmu_apply_config(const struct MMU_tag *config, size_t count);
160
161uint32_t mpc55xx_get_system_clock(void);
162
163LINKER_SYMBOL(bsp_ram_start)
164LINKER_SYMBOL(bsp_ram_end)
165LINKER_SYMBOL(bsp_ram_size)
166
167LINKER_SYMBOL(bsp_ram_1_start)
168LINKER_SYMBOL(bsp_ram_1_end)
169LINKER_SYMBOL(bsp_ram_1_size)
170
171LINKER_SYMBOL(bsp_rom_start)
172LINKER_SYMBOL(bsp_rom_end)
173LINKER_SYMBOL(bsp_rom_size)
174
175#ifdef MPC55XX_BOOTFLAGS
176 extern uint32_t mpc55xx_bootflag_0 [];
177#endif
178
179#ifdef __cplusplus
180}
181#endif /* __cplusplus */
182
183#endif /* LIBBSP_POWERPC_MPC55XXEVB_MPC55XX_CONFIG_H */
void mpc55xx_start_prologue(void)
Start prologue.
Definition start-prologue.c:38
General purpose assembler macros, linker command file support and some inline functions for direct re...
Register definitions for the MPC55xx and MPC56xx microcontroller family.
System Integration Unit Access (SIU).
Definition fsl-mpc551x.h:473
Definition fsl-mpc551x.h:441
Definition regs-mmu.h:60
Definition mpc55xx-config.h:53
Definition fsl-mpc564xL.h:960