File indexing completed on 2025-05-11 08:23:54
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034
0035
0036 #ifndef LIBBSP_POWERPC_MPC55XXEVB_MPC55XX_CONFIG_H
0037 #define LIBBSP_POWERPC_MPC55XXEVB_MPC55XX_CONFIG_H
0038
0039 #include <stddef.h>
0040
0041 #include <libcpu/powerpc-utility.h>
0042
0043 #include <bsp/start.h>
0044
0045 #include <mpc55xx/regs.h>
0046 #include <mpc55xx/regs-mmu.h>
0047 #include <mpc55xx/siu.h>
0048
0049 #ifdef __cplusplus
0050 extern "C" {
0051 #endif
0052
0053 typedef struct {
0054 uint32_t index : 10;
0055 uint32_t count : 10;
0056 uint32_t output : 1;
0057 union SIU_PCR_tag pcr;
0058 } mpc55xx_siu_pcr_config;
0059
0060 extern BSP_START_DATA_SECTION const mpc55xx_siu_pcr_config
0061 mpc55xx_start_config_siu_pcr [];
0062
0063 extern BSP_START_DATA_SECTION const size_t
0064 mpc55xx_start_config_siu_pcr_count [];
0065
0066 extern BSP_START_DATA_SECTION const struct
0067 MMU_tag mpc55xx_start_config_mmu_early [];
0068
0069 extern BSP_START_DATA_SECTION const size_t
0070 mpc55xx_start_config_mmu_early_count [];
0071
0072 extern BSP_START_DATA_SECTION const struct
0073 MMU_tag mpc55xx_start_config_mmu [];
0074
0075 extern BSP_START_DATA_SECTION const size_t
0076 mpc55xx_start_config_mmu_count [];
0077
0078 #ifdef MPC55XX_HAS_FMPLL
0079 typedef struct {
0080 union FMPLL_SYNCR_tag syncr_tmp;
0081 union FMPLL_SYNCR_tag syncr_final;
0082 } mpc55xx_clock_config;
0083 #endif
0084
0085 #ifdef MPC55XX_HAS_FMPLL_ENHANCED
0086 typedef struct {
0087 union FMPLL_ESYNCR2_tag esyncr2_tmp;
0088 union FMPLL_ESYNCR2_tag esyncr2_final;
0089 union FMPLL_ESYNCR1_tag esyncr1_final;
0090 } mpc55xx_clock_config;
0091 #endif
0092
0093 #ifdef MPC55XX_HAS_MODE_CONTROL
0094 typedef struct {
0095 struct {
0096 PLLD_CR_32B_tag cr;
0097 PLLD_MR_32B_tag mr;
0098 } fmpll [2];
0099 CGM_OC_EN_32B_tag oc_en;
0100 CGM_OCDS_SC_32B_tag ocds_sc;
0101 CGM_SC_DC0_3_32B_tag sc_dc0_3;
0102 CGM_AUXCLK_tag auxclk [5];
0103 } mpc55xx_clock_config;
0104 #endif
0105
0106 extern BSP_START_DATA_SECTION const mpc55xx_clock_config
0107 mpc55xx_start_config_clock [];
0108
0109 #ifdef MPC55XX_HAS_EBI
0110 typedef struct {
0111 union EBI_MCR_tag ebi_mcr;
0112 uint32_t siu_eccr_ebdf;
0113 } mpc55xx_ebi_config;
0114
0115 extern BSP_START_DATA_SECTION const mpc55xx_ebi_config
0116 mpc55xx_start_config_ebi [];
0117
0118 extern BSP_START_DATA_SECTION const size_t
0119 mpc55xx_start_config_ebi_count [];
0120
0121 extern BSP_START_DATA_SECTION const struct EBI_CS_tag
0122 mpc55xx_start_config_ebi_cs [];
0123
0124 extern BSP_START_DATA_SECTION const size_t
0125 mpc55xx_start_config_ebi_cs_count [];
0126
0127 extern BSP_START_DATA_SECTION const struct EBI_CAL_CS_tag
0128 mpc55xx_start_config_ebi_cal_cs [];
0129
0130 extern BSP_START_DATA_SECTION const size_t
0131 mpc55xx_start_config_ebi_cal_cs_count [];
0132 #endif
0133
0134
0135
0136
0137
0138
0139
0140
0141
0142
0143
0144
0145
0146
0147 void mpc55xx_start_prologue(void);
0148
0149 void mpc55xx_start_early(void);
0150
0151 void mpc55xx_start_flash(void);
0152
0153 void mpc55xx_start_cache(void);
0154
0155 void mpc55xx_start_clock(void);
0156
0157 void mpc55xx_start_watchdog(void);
0158
0159 void mpc55xx_start_mmu_apply_config(const struct MMU_tag *config, size_t count);
0160
0161 uint32_t mpc55xx_get_system_clock(void);
0162
0163 LINKER_SYMBOL(bsp_ram_start)
0164 LINKER_SYMBOL(bsp_ram_end)
0165 LINKER_SYMBOL(bsp_ram_size)
0166
0167 LINKER_SYMBOL(bsp_ram_1_start)
0168 LINKER_SYMBOL(bsp_ram_1_end)
0169 LINKER_SYMBOL(bsp_ram_1_size)
0170
0171 LINKER_SYMBOL(bsp_rom_start)
0172 LINKER_SYMBOL(bsp_rom_end)
0173 LINKER_SYMBOL(bsp_rom_size)
0174
0175 #ifdef MPC55XX_BOOTFLAGS
0176 extern uint32_t mpc55xx_bootflag_0 [];
0177 #endif
0178
0179 #ifdef __cplusplus
0180 }
0181 #endif
0182
0183 #endif