File indexing completed on 2025-05-11 08:23:52
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
0037
0038
0039
0040
0041
0042 #ifndef LIBBSP_POWERPC_GEN5200_BSP_H
0043 #define LIBBSP_POWERPC_GEN5200_BSP_H
0044
0045
0046
0047
0048
0049
0050
0051
0052
0053
0054
0055 #include <bspopts.h>
0056
0057 #include <libcpu/powerpc-utility.h>
0058
0059
0060
0061
0062
0063 LINKER_SYMBOL(bsp_ram_start);
0064 LINKER_SYMBOL(bsp_ram_end);
0065 LINKER_SYMBOL(bsp_ram_size);
0066
0067 LINKER_SYMBOL(bsp_rom_start);
0068 LINKER_SYMBOL(bsp_rom_end);
0069 LINKER_SYMBOL(bsp_rom_size);
0070
0071 LINKER_SYMBOL(bsp_dpram_start);
0072 LINKER_SYMBOL(bsp_dpram_end);
0073 LINKER_SYMBOL(bsp_dpram_size);
0074
0075 LINKER_SYMBOL(bsp_section_text_start);
0076 LINKER_SYMBOL(bsp_section_text_end);
0077 LINKER_SYMBOL(bsp_section_text_size);
0078
0079 LINKER_SYMBOL(bsp_section_data_start);
0080 LINKER_SYMBOL(bsp_section_data_end);
0081 LINKER_SYMBOL(bsp_section_data_size);
0082
0083 LINKER_SYMBOL(bsp_section_bss_start);
0084 LINKER_SYMBOL(bsp_section_bss_end);
0085 LINKER_SYMBOL(bsp_section_bss_size);
0086
0087 LINKER_SYMBOL(bsp_work_area_start);
0088
0089 LINKER_SYMBOL(MBAR);
0090
0091
0092
0093 #ifdef MPC5200_BOARD_PM520_ZE30
0094 #define PM520_ZE30
0095 #endif
0096
0097 #ifdef MPC5200_BOARD_PM520_CR825
0098 #define PM520_CR825
0099 #endif
0100
0101 #ifdef MPC5200_BOARD_ICECUBE
0102 #define icecube
0103 #endif
0104
0105 #ifdef MPC5200_BOARD_BRS5L
0106 #define BRS5L
0107 #endif
0108
0109
0110
0111
0112
0113
0114
0115 #if defined(MPC5200_BOARD_PM520_ZE30)
0116 #define PM520
0117 #endif
0118
0119
0120
0121 #if defined(MPC5200_BOARD_PM520_CR825)
0122 #define PM520
0123 #endif
0124
0125 #if !defined(HAS_UBOOT)
0126
0127 #define NEED_LOW_LEVEL_INIT
0128 #endif
0129
0130 #if defined(MPC5200_BOARD_BRS5L)
0131
0132
0133
0134
0135 #define HAS_NVRAM_93CXX
0136
0137 #elif defined(MPC5200_BOARD_BRS6L)
0138 #define MPC5200_BRS6L_FPGA_BEGIN 0x800000
0139 #define MPC5200_BRS6L_FPGA_SIZE (64 * 1024)
0140 #define MPC5200_BRS6L_FPGA_END \
0141 (MPC5200_BRS6L_FPGA_BEGIN + MPC5200_BRS6L_FPGA_SIZE)
0142
0143 #define MPC5200_BRS6L_MRAM_BEGIN 0xff000000
0144 #define MPC5200_BRS6L_MRAM_SIZE (4 * 1024 * 1024)
0145 #define MPC5200_BRS6L_MRAM_END \
0146 (MPC5200_BRS6L_MRAM_BEGIN + MPC5200_BRS6L_MRAM_SIZE)
0147 #elif defined (PM520)
0148
0149
0150
0151 #elif defined (MPC5200_BOARD_ICECUBE)
0152
0153
0154
0155
0156
0157
0158
0159 #elif defined (MPC5200_BOARD_DP2)
0160
0161
0162
0163 #else
0164 #error "board type not defined"
0165 #endif
0166
0167 #ifndef ASM
0168
0169 #include <rtems.h>
0170 #include <bsp/i2cdrv.h>
0171 #include <bsp/irq.h>
0172 #include <bsp/vectors.h>
0173 #include <bsp/u-boot.h>
0174 #include <bsp/default-initial-extension.h>
0175
0176 #ifdef __cplusplus
0177 extern "C" {
0178 #endif
0179
0180
0181
0182
0183 struct rtems_bsdnet_ifconfig;
0184 extern int rtems_mpc5200_fec_driver_attach_detach (struct rtems_bsdnet_ifconfig *config, int attaching);
0185 #define RTEMS_BSP_NETWORK_DRIVER_NAME "eth1"
0186 #define RTEMS_BSP_NETWORK_DRIVER_ATTACH rtems_mpc5200_fec_driver_attach_detach
0187
0188
0189
0190
0191
0192
0193
0194
0195
0196
0197
0198
0199
0200
0201
0202
0203 #ifdef HAS_NVRAM_93CXX
0204 #define NVRAM_DRIVER_TABLE_ENTRY \
0205 { nvram_driver_initialize, nvram_driver_open, nvram_driver_close, \
0206 nvram_driver_read, nvram_driver_write, NULL }
0207 #endif
0208
0209
0210
0211
0212 #define RTEMS_BSP_HAS_IDE_DRIVER
0213
0214
0215
0216
0217
0218
0219
0220 #define ATA_USE_INT
0221
0222
0223 #if defined(HAS_UBOOT)
0224 #define IPB_CLOCK (bsp_uboot_board_info.bi_ipbfreq)
0225 #define XLB_CLOCK (bsp_uboot_board_info.bi_busfreq)
0226 #define G2_CLOCK (bsp_uboot_board_info.bi_intfreq)
0227 #elif defined(MPC5200_BOARD_BRS5L) || defined(MPC5200_BOARD_BRS6L)
0228 #define IPB_CLOCK 66000000
0229 #define XLB_CLOCK 132000000
0230 #define G2_CLOCK 396000000
0231 #else
0232 #define IPB_CLOCK 33000000
0233 #define XLB_CLOCK 66000000
0234 #define G2_CLOCK 231000000
0235 #endif
0236
0237 #if defined(HAS_UBOOT)
0238 #define GEN5200_CONSOLE_BAUD (bsp_uboot_board_info.bi_baudrate)
0239 #else
0240 #define GEN5200_CONSOLE_BAUD 115200
0241 #endif
0242
0243
0244
0245
0246
0247
0248
0249
0250
0251
0252
0253
0254
0255 #define BSP_Convert_decrementer( _value ) \
0256 (int) (((_value) * 4000) / (XLB_CLOCK/10000))
0257
0258
0259 #define USE_SLICETIMER_0 TRUE
0260 #define USE_SLICETIMER_1 FALSE
0261
0262 void *bsp_idle_thread( uintptr_t ignored );
0263 #define BSP_IDLE_TASK_BODY bsp_idle_thread
0264
0265
0266 void BSP_IRQ_Benchmarking_Reset(void);
0267 void BSP_IRQ_Benchmarking_Report(void);
0268
0269 #if defined(HAS_UBOOT)
0270
0271 const char *bsp_uboot_getenv(
0272 const char *name
0273 );
0274 #endif
0275
0276 void cpu_init(void);
0277
0278 int mpc5200_eth_mii_read(
0279 int phyAddr,
0280 void *arg,
0281 unsigned regAddr,
0282 uint32_t *retVal
0283 );
0284
0285 #ifdef __cplusplus
0286 }
0287 #endif
0288
0289 #endif
0290
0291
0292
0293 #endif