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 #ifndef __MPC5200_h__
0035 #define __MPC5200_h__
0036
0037
0038 #define CSRR0 58
0039 #define CSRR1 59
0040 #define DABR2 1000
0041 #define DBCR 1001
0042 #define IBCR 1002
0043 #define IABR2 1018
0044
0045
0046
0047
0048 #define MBAR_RESET 0x80000000
0049
0050
0051
0052
0053 #define ONCHIP_SRAM_OFFSET 0x8000
0054 #define ONCHIP_SRAM_SIZE 0x4000
0055
0056 #ifndef ASM
0057 #include <rtems.h>
0058
0059 #include <bsp/utility.h>
0060
0061 #ifdef __cplusplus
0062 extern "C" {
0063 #endif
0064
0065 #define MPC5200_CAN_NO 2
0066 #define MPC5200_PSC_NO 6
0067
0068
0069
0070 #define MPC5200_PSC_REG_SETS 7
0071
0072 #define MPC5200_GPT_NO 8
0073 #define MPC5200_SLT_NO 2
0074
0075
0076
0077
0078 #define FEC_INTR_HBERR 0x80000000
0079 #define FEC_INTR_BABR 0x40000000
0080 #define FEC_INTR_BABT 0x20000000
0081 #define FEC_INTR_GRA 0x10000000
0082 #define FEC_INTR_TFINT 0x08000000
0083
0084
0085
0086 #define FEC_INTR_MII 0x00800000
0087
0088 #define FEC_INTR_LATE_COL 0x00200000
0089 #define FEC_INTR_COL_RETRY 0x00100000
0090 #define FEC_INTR_XFIFO_UN 0x00080000
0091 #define FEC_INTR_XFIFO_ERR 0x00040000
0092 #define FEC_INTR_RFIFO_ERR 0x00020000
0093
0094
0095 #define FEC_INTR_HBEEN FEC_INTR_HBERR
0096 #define FEC_INTR_BREN FEC_INTR_BABR
0097 #define FEC_INTR_BTEN FEC_INTR_BABT
0098 #define FEC_INTR_GRAEN FEC_INTR_GRA
0099 #define FEC_INTR_TFINTEN FEC_INTR_TFINT
0100 #define FEC_INTR_MIIEN FEC_INTR_MII
0101 #define FEC_INTR_LCEN FEC_INTR_LATE_COL
0102 #define FEC_INTR_CRLEN FEC_INTR_COL_RETRY
0103 #define FEC_INTR_XFUNEN FEC_INTR_XFIFO_UN
0104 #define FEC_INTR_XFERREN FEC_INTR_XFIFO_ERR
0105 #define FEC_INTR_RFERREN FEC_INTR_RFIFO_ERR
0106 #define FEC_INTR_CLEAR_ALL 0xffffffff
0107 #define FEC_INTR_MASK_ALL 0x00000000
0108
0109
0110
0111
0112 #define FEC_ECNTRL_TAG 0xf0000000
0113
0114 #define FEC_ECNTRL_TESTMD 0x04000000
0115
0116 #define FEC_ECNTRL_OE 0x00000004
0117 #define FEC_ECNTRL_EN 0x00000002
0118 #define FEC_ECNTRL_RESET 0x00000001
0119
0120
0121
0122
0123
0124 #define FEC_RCNTRL_MAX_FL 0x07ff0000
0125 #define FEC_RCNTRL_MAX_FL_SHIFT 16
0126
0127 #define FEC_RCNTRL_FCE 0x00000020
0128 #define FEC_RCNTRL_BC_REJ 0x00000010
0129 #define FEC_RCNTRL_PROM 0x00000008
0130 #define FEC_RCNTRL_MII_MODE 0x00000004
0131 #define FEC_RCNTRL_DRT 0x00000002
0132 #define FEC_RCNTRL_LOOP 0x00000001
0133
0134
0135
0136
0137
0138 #define FEC_XCNTRL_RFC_PAUS 0x00000010
0139 #define FEC_XCNTRL_TFC_PAUS 0x00000008
0140 #define FEC_XCNTRL_FDEN 0x00000004
0141 #define FEC_XCNTRL_HBC 0x00000002
0142 #define FEC_XCNTRL_GTS 0x00000001
0143
0144
0145
0146
0147
0148 #define FEC_XSTAT_DEF 0x02000000
0149 #define FEC_XSTAT_HB 0x01000000
0150 #define FEC_XSTAT_LC 0x00800000
0151 #define FEC_XSTAT_RL 0x00400000
0152 #define FEC_XSTAT_RC 0x003c0000
0153 #define FEC_XSTAT_UN 0x00020000
0154 #define FEX_XSTAT_CSL 0x00010000
0155
0156
0157
0158
0159
0160 #define FEC_XWMRK_64 0x00000000
0161 #define FEC_XWMRK_128 0x00000001
0162 #define FEC_XWMRK_192 0x00000002
0163 #define FEC_XWMRK_256 0x00000003
0164 #define FEC_XWMRK_320 0x00000004
0165 #define FEC_XWMRK_384 0x00000005
0166 #define FEC_XWMRK_448 0x00000006
0167 #define FEC_XWMRK_512 0x00000007
0168 #define FEC_XWMRK_576 0x00000008
0169 #define FEC_XWMRK_640 0x00000009
0170 #define FEC_XWMRK_704 0x0000000a
0171 #define FEC_XWMRK_768 0x0000000b
0172 #define FEC_XWMRK_832 0x0000000c
0173 #define FEC_XWMRK_896 0x0000000d
0174 #define FEC_XWMRK_960 0x0000000e
0175 #define FEC_XWMRK_1024 0x0000000f
0176
0177
0178
0179
0180
0181 #define FEC_FSM_CRC 0x02000000
0182 #define FEC_FSM_ENFSM 0x01000000
0183
0184
0185
0186
0187
0188
0189 #define FEC_FIFO_STAT_IP 0x80000000
0190
0191 #define FEC_FIFO_STAT_FRAME 0x0f000000
0192 #define FEC_FIFO_STAT_FAE 0x00800000
0193 #define FEC_FIFO_STAT_RXW 0x00400000
0194 #define FEC_FIFO_STAT_UF 0x00200000
0195 #define FEC_FIFO_STAT_OF 0x00100000
0196 #define FEC_FIFO_STAT_FR 0x00080000
0197 #define FEC_FIFO_STAT_FULL 0x00040000
0198 #define FEC_FIFO_STAT_ALARM 0x00020000
0199 #define FEC_FIFO_STAT_EMPTY 0x00010000
0200
0201 #define FEC_FIFO_STAT_ERROR ( FEC_FIFO_STAT_IP \
0202 | FEC_FIFO_STAT_FAE \
0203 | FEC_FIFO_STAT_RXW \
0204 | FEC_FIFO_STAT_UF \
0205 | FEC_FIFO_STAT_OF \
0206 )
0207
0208
0209 #define FEC_FIFO_CNTRL_WCTL 0x40000000
0210 #define FEC_FIFO_CNTRL_WFR 0x20000000
0211
0212 #define FEC_FIFO_CNTRL_FRAME 0x08000000
0213 #define FEC_FIFO_CNTRL_GR 0x07000000
0214 #define FEC_FIFO_CNTRL_GR_SHIFT 24
0215 #define FEC_FIFO_CNTRL_IP_MASK 0x00800000
0216 #define FEC_FIFO_CNTRL_FAE_MASK 0x00400000
0217 #define FEC_FIFO_CNTRL_RXW_MASK 0x00200000
0218 #define FEC_FIFO_CNTRL_UF_MASK 0x00100000
0219 #define FEC_FIFO_CNTRL_OF_MASK 0x00080000
0220
0221
0222 #define SDMA_TCR_EN BSP_BBIT16(0)
0223 #define SDMA_TCR_VAL BSP_BBIT16(1)
0224 #define SDMA_TCR_ALW_INIT BSP_BBIT16(2)
0225 #define SDMA_TCR_IN(val) BSP_BFLD16(val, 3, 7)
0226 #define SDMA_TCR_AUTO_START BSP_BBIT16(8)
0227 #define SDMA_TCR_HIGH_EN BSP_BBIT16(9)
0228 #define SDMA_TCR_HOLD BSP_BBIT16(10)
0229 #define SDMA_TCR_AS(val) BSP_BFLD16(val, 12, 15)
0230
0231 #define SDMA_IPR_HOLD BSP_BBIT8(0)
0232 #define SDMA_IPR_PRIOR(val) BSP_BFLD8(val, 5, 7)
0233
0234 #define SDMA_REQMUX_SET_31(reg, val) BSP_BFLD32SET(reg, val, 0, 1)
0235 #define SDMA_REQMUX_SET_30(reg, val) BSP_BFLD32SET(reg, val, 2, 3)
0236 #define SDMA_REQMUX_SET_29(reg, val) BSP_BFLD32SET(reg, val, 4, 5)
0237 #define SDMA_REQMUX_SET_28(reg, val) BSP_BFLD32SET(reg, val, 6, 7)
0238 #define SDMA_REQMUX_SET_27(reg, val) BSP_BFLD32SET(reg, val, 8, 9)
0239 #define SDMA_REQMUX_SET_26(reg, val) BSP_BFLD32SET(reg, val, 10, 11)
0240 #define SDMA_REQMUX_SET_25(reg, val) BSP_BFLD32SET(reg, val, 12, 13)
0241 #define SDMA_REQMUX_SET_24(reg, val) BSP_BFLD32SET(reg, val, 14, 15)
0242 #define SDMA_REQMUX_SET_23(reg, val) BSP_BFLD32SET(reg, val, 16, 17)
0243 #define SDMA_REQMUX_SET_22(reg, val) BSP_BFLD32SET(reg, val, 18, 19)
0244 #define SDMA_REQMUX_SET_21(reg, val) BSP_BFLD32SET(reg, val, 20, 21)
0245 #define SDMA_REQMUX_SET_20(reg, val) BSP_BFLD32SET(reg, val, 22, 23)
0246 #define SDMA_REQMUX_SET_19(reg, val) BSP_BFLD32SET(reg, val, 24, 25)
0247 #define SDMA_REQMUX_SET_18(reg, val) BSP_BFLD32SET(reg, val, 26, 27)
0248 #define SDMA_REQMUX_SET_17(reg, val) BSP_BFLD32SET(reg, val, 28, 29)
0249 #define SDMA_REQMUX_SET_16(reg, val) BSP_BFLD32SET(reg, val, 30, 31)
0250
0251
0252 typedef struct {
0253 uint32_t taskBar;
0254 uint32_t currentPointer;
0255 uint32_t endPointer;
0256 uint32_t variablePointer;
0257 uint8_t IntVect1;
0258 uint8_t IntVect2;
0259 uint16_t PtdCntrl;
0260 uint32_t IntPend;
0261 uint32_t IntMask;
0262 uint16_t tcr [16];
0263 uint8_t ipr [32];
0264 uint32_t cReqSelect;
0265 uint32_t task_size0;
0266 uint32_t task_size1;
0267 uint32_t reserved_0;
0268 uint32_t reserved_1;
0269 uint32_t Value1;
0270 uint32_t Value2;
0271 uint32_t Control;
0272 uint32_t Status;
0273 } mpc5200_sdma;
0274
0275 typedef struct {
0276 #define CSC_CFG_WAITP(val) BSP_BFLD32(val, 0, 7)
0277 #define CSC_CFG_WAITX(val) BSP_BFLD32(val, 8, 15)
0278 #define CSC_CFG_MX BSP_BBIT32(16)
0279 #define CSC_CFG_AA BSP_BBIT32(18)
0280 #define CSC_CFG_CE BSP_BBIT32(19)
0281 #define CSC_CFG_AS(val) BSP_BFLD32(val, 20, 21)
0282 #define CSC_CFG_DS(val) BSP_BFLD32(val, 22, 23)
0283 #define CSC_CFG_BANK(val) BSP_BFLD32(val, 24, 25)
0284 #define CSC_CFG_WTYP(val) BSP_BFLD32(val, 26, 27)
0285 #define CSC_CFG_WS BSP_BBIT32(28)
0286 #define CSC_CFG_RS BSP_BBIT32(29)
0287 #define CSC_CFG_WO BSP_BBIT32(30)
0288 #define CSC_CFG_RO BSP_BBIT32(31)
0289 uint32_t config_0;
0290 uint32_t config_1;
0291 uint32_t config_2;
0292 uint32_t config_3;
0293 uint32_t config_4;
0294 uint32_t config_5;
0295
0296 #define CSC_CTRL_ME BSP_BBIT32(7)
0297 uint32_t control;
0298
0299 #define CSC_STAT_WOERR BSP_BBIT32(2)
0300 #define CSC_STAT_ROERR BSP_BBIT32(3)
0301 #define CSC_STAT_GET_CSXERR(reg) BSP_BFLD32GET(reg, 5, 7)
0302 uint32_t status;
0303
0304 uint32_t config_6;
0305 uint32_t config_7;
0306
0307 #define CSC_BST_CTRL_CW7 BSP_BBIT32(0)
0308 #define CSC_BST_CTRL_SLB7 BSP_BBIT32(1)
0309 #define CSC_BST_CTRL_BRE7 BSP_BBIT32(3)
0310 #define CSC_BST_CTRL_CW6 BSP_BBIT32(4)
0311 #define CSC_BST_CTRL_SLB6 BSP_BBIT32(5)
0312 #define CSC_BST_CTRL_BRE6 BSP_BBIT32(7)
0313 #define CSC_BST_CTRL_CW5 BSP_BBIT32(8)
0314 #define CSC_BST_CTRL_SLB5 BSP_BBIT32(9)
0315 #define CSC_BST_CTRL_BRE5 BSP_BBIT32(11)
0316 #define CSC_BST_CTRL_CW4 BSP_BBIT32(12)
0317 #define CSC_BST_CTRL_SLB4 BSP_BBIT32(13)
0318 #define CSC_BST_CTRL_BRE4 BSP_BBIT32(15)
0319 #define CSC_BST_CTRL_CW3 BSP_BBIT32(16)
0320 #define CSC_BST_CTRL_SLB3 BSP_BBIT32(17)
0321 #define CSC_BST_CTRL_BRE3 BSP_BBIT32(19)
0322 #define CSC_BST_CTRL_CW2 BSP_BBIT32(20)
0323 #define CSC_BST_CTRL_SLB2 BSP_BBIT32(21)
0324 #define CSC_BST_CTRL_BRE2 BSP_BBIT32(23)
0325 #define CSC_BST_CTRL_CW1 BSP_BBIT32(24)
0326 #define CSC_BST_CTRL_SLB1 BSP_BBIT32(25)
0327 #define CSC_BST_CTRL_BRE1 BSP_BBIT32(27)
0328 #define CSC_BST_CTRL_CW0 BSP_BBIT32(28)
0329 #define CSC_BST_CTRL_SLB0 BSP_BBIT32(29)
0330 #define CSC_BST_CTRL_BRE0 BSP_BBIT32(31)
0331 uint32_t burst_control;
0332
0333 #define CSC_DCYC_CTRL_DC7(val) BSP_BFLD32(val, 2, 3)
0334 #define CSC_DCYC_CTRL_SET_DC7(reg, val) BSP_BFLD32SET(reg, val, 2, 3)
0335 #define CSC_DCYC_CTRL_DC6(val) BSP_BFLD32(val, 6, 7)
0336 #define CSC_DCYC_CTRL_SET_DC6(reg, val) BSP_BFLD32SET(reg, val, 6, 7)
0337 #define CSC_DCYC_CTRL_DC5(val) BSP_BFLD32(val, 10, 11)
0338 #define CSC_DCYC_CTRL_SET_DC5(reg, val) BSP_BFLD32SET(reg, val, 10, 11)
0339 #define CSC_DCYC_CTRL_DC4(val) BSP_BFLD32(val, 14, 15)
0340 #define CSC_DCYC_CTRL_SET_DC4(reg, val) BSP_BFLD32SET(reg, val, 14, 15)
0341 #define CSC_DCYC_CTRL_DC3(val) BSP_BFLD32(val, 18, 19)
0342 #define CSC_DCYC_CTRL_SET_DC3(reg, val) BSP_BFLD32SET(reg, val, 18, 19)
0343 #define CSC_DCYC_CTRL_DC2(val) BSP_BFLD32(val, 22, 23)
0344 #define CSC_DCYC_CTRL_SET_DC2(reg, val) BSP_BFLD32SET(reg, val, 22, 23)
0345 #define CSC_DCYC_CTRL_DC1(val) BSP_BFLD32(val, 26, 27)
0346 #define CSC_DCYC_CTRL_SET_DC1(reg, val) BSP_BFLD32SET(reg, val, 26, 27)
0347 #define CSC_DCYC_CTRL_DC0(val) BSP_BFLD32(val, 30, 31)
0348 #define CSC_DCYC_CTRL_SET_DC0(reg, val) BSP_BFLD32SET(reg, val, 30, 31)
0349 uint32_t deadcycle_control;
0350
0351 uint8_t reserved [208];
0352 } mpc5200_csc;
0353
0354 typedef struct {
0355 uint32_t memory_address_base;
0356 uint32_t cs0_start_address;
0357 uint32_t cs0_stop_address;
0358 uint32_t cs1_start_address;
0359 uint32_t cs1_stop_address;
0360 uint32_t cs2_start_address;
0361 uint32_t cs2_stop_address;
0362 uint32_t cs3_start_address;
0363 uint32_t cs3_stop_address;
0364 uint32_t cs4_start_address;
0365 uint32_t cs4_stop_address;
0366 uint32_t cs5_start_address;
0367 uint32_t cs5_stop_address;
0368 uint32_t sdram_chip_select_0;
0369 uint32_t sdram_chip_select_1;
0370 uint8_t reserved_0 [16];
0371 uint32_t boot_start_address;
0372 uint32_t boot_stop_address;
0373
0374 #define MM_IPBI_CTRL_CS7ENA BSP_BBIT16(4)
0375 #define MM_IPBI_CTRL_CS6ENA BSP_BBIT16(5)
0376 #define MM_IPBI_CTRL_BOOTENA BSP_BBIT16(6)
0377 #define MM_IPBI_CTRL_CS5ENA BSP_BBIT16(10)
0378 #define MM_IPBI_CTRL_CS4ENA BSP_BBIT16(11)
0379 #define MM_IPBI_CTRL_CS3ENA BSP_BBIT16(12)
0380 #define MM_IPBI_CTRL_CS2ENA BSP_BBIT16(13)
0381 #define MM_IPBI_CTRL_CS1ENA BSP_BBIT16(14)
0382 #define MM_IPBI_CTRL_CS0ENA BSP_BBIT16(15)
0383 uint16_t ipbi_control;
0384
0385 uint16_t wait_state_enable;
0386 uint32_t cs6_start_address;
0387 uint32_t cs6_stop_address;
0388 uint32_t cs7_start_address;
0389 uint32_t cs7_stop_address;
0390 uint8_t reserved_1 [152];
0391 } mpc5200_mm;
0392
0393
0394
0395
0396
0397
0398 typedef struct mpc5200_ {
0399
0400
0401
0402 volatile mpc5200_mm mm;
0403
0404
0405
0406
0407 volatile uint8_t mc[0x100];
0408
0409
0410
0411
0412 volatile uint8_t cdm[0x100];
0413
0414
0415
0416
0417 volatile mpc5200_csc csc;
0418
0419
0420
0421
0422 volatile uint8_t sct[0x100];
0423
0424
0425
0426
0427 volatile uint32_t per_mask;
0428 volatile uint32_t per_pri_1;
0429 volatile uint32_t per_pri_2;
0430 volatile uint32_t per_pri_3;
0431
0432 #define ICTL_EET_ECLR0 BSP_BBIT32(4)
0433 #define ICTL_EET_ECLR1 BSP_BBIT32(5)
0434 #define ICTL_EET_ECLR2 BSP_BBIT32(6)
0435 #define ICTL_EET_ECLR3 BSP_BBIT32(7)
0436 #define ICTL_EET_ETYPE0(val) BSP_BFLD32(val, 8, 9)
0437 #define ICTL_EET_ETYPE1(val) BSP_BFLD32(val, 10, 11)
0438 #define ICTL_EET_ETYPE2(val) BSP_BFLD32(val, 12, 13)
0439 #define ICTL_EET_ETYPE3(val) BSP_BFLD32(val, 14, 15)
0440 #define ICTL_EET_SET_ETYPE0(reg, val) BSP_BFLD32SET(reg, val, 8, 9)
0441 #define ICTL_EET_SET_ETYPE1(reg, val) BSP_BFLD32SET(reg, val, 10, 11)
0442 #define ICTL_EET_SET_ETYPE2(reg, val) BSP_BFLD32SET(reg, val, 12, 13)
0443 #define ICTL_EET_SET_ETYPE3(reg, val) BSP_BFLD32SET(reg, val, 14, 15)
0444 #define ICTL_EET_MEE BSP_BBIT32(19)
0445 #define ICTL_EET_EENA0 BSP_BBIT32(20)
0446 #define ICTL_EET_EENA1 BSP_BBIT32(21)
0447 #define ICTL_EET_EENA2 BSP_BBIT32(22)
0448 #define ICTL_EET_EENA3 BSP_BBIT32(23)
0449 #define ICTL_EET_CEB BSP_BBIT32(31)
0450
0451 volatile uint32_t ext_en_type;
0452 volatile uint32_t crit_pri_main_mask;
0453 volatile uint32_t main_pri_1;
0454 volatile uint32_t main_pri_2;
0455 volatile uint32_t res1;
0456 volatile uint32_t pmce;
0457 volatile uint32_t csa;
0458 volatile uint32_t msa;
0459 volatile uint32_t psa;
0460 volatile uint32_t res2;
0461 volatile uint32_t psa_be;
0462 volatile uint8_t res3[0xC4];
0463
0464
0465
0466
0467 struct mpc5200_gpt {
0468 volatile uint32_t emsel;
0469 volatile uint32_t count_in;
0470 volatile uint32_t pwm_conf;
0471 volatile uint32_t status;
0472 } gpt[MPC5200_GPT_NO];
0473
0474 #define GPT_STATUS_RESET 0x0000000F
0475 #define GPT_STATUS_TEXP (1 << 3)
0476 #define GPT_STATUS_PIN (1 << 8)
0477 #define GPT_EMSEL_GPIO_DIR (2 << 4)
0478 #define GPT_EMSEL_GPIO_OUT (1 << 4)
0479 #define GPT_EMSEL_GPIO_OUT_HIGH (3 << 4)
0480 #define GPT_EMSEL_TIMER_MS_GPIO (4 << 0)
0481 #define GPT_EMSEL_GPIO_IN (0 << 0)
0482 #define GPT_EMSEL_CE (1 << 12)
0483 #define GPT_EMSEL_ST_CONT (1 << 10)
0484 #define GPT_EMSEL_INTEN (1 << 8)
0485 #define GPT_EMSEL_WDEN (1 << 15)
0486
0487 #define GPT0 0
0488 #define GPT1 1
0489 #define GPT2 2
0490 #define GPT3 3
0491 #define GPT4 4
0492 #define GPT5 5
0493 #define GPT6 6
0494 #define GPT7 7
0495
0496 volatile uint8_t gpt_res[0x80];
0497
0498
0499
0500
0501 struct mpc5200_slt {
0502 volatile uint32_t tcr;
0503 volatile uint32_t cntrl;
0504 volatile uint32_t cvr;
0505 volatile uint32_t tsr;
0506 } slt[MPC5200_SLT_NO];
0507
0508 volatile uint8_t slt_res[0xE0];
0509
0510
0511
0512
0513 volatile uint8_t rtc[0x100];
0514
0515
0516
0517
0518
0519 struct mpc5200_mscan {
0520 volatile uint8_t ctl0;
0521 volatile uint8_t ctl1;
0522 volatile uint8_t res1;
0523 volatile uint8_t res2;
0524 volatile uint8_t btr0;
0525 volatile uint8_t btr1;
0526 volatile uint8_t res3;
0527 volatile uint8_t res4;
0528 volatile uint8_t rflg;
0529 volatile uint8_t rier;
0530 volatile uint8_t res5;
0531 volatile uint8_t res6;
0532 volatile uint8_t tflg;
0533 volatile uint8_t tier;
0534 volatile uint8_t res7;
0535 volatile uint8_t res8;
0536 volatile uint8_t tarq;
0537 volatile uint8_t taak;
0538 volatile uint8_t res9;
0539 volatile uint8_t res10;
0540 volatile uint8_t bsel;
0541 volatile uint8_t idac;
0542 volatile uint8_t res11;
0543 volatile uint8_t res12;
0544 volatile uint8_t res13;
0545 volatile uint8_t res14;
0546 volatile uint8_t res15;
0547 volatile uint8_t res16;
0548 volatile uint8_t rxerr;
0549 volatile uint8_t txerr;
0550 volatile uint8_t res17;
0551 volatile uint8_t res18;
0552 volatile uint8_t idar0;
0553 volatile uint8_t idar1;
0554 volatile uint8_t res19;
0555 volatile uint8_t res20;
0556 volatile uint8_t idar2;
0557 volatile uint8_t idar3;
0558 volatile uint8_t res21;
0559 volatile uint8_t res22;
0560 volatile uint8_t idmr0;
0561 volatile uint8_t idmr1;
0562 volatile uint8_t res23;
0563 volatile uint8_t res24;
0564 volatile uint8_t idmr2;
0565 volatile uint8_t idmr3;
0566 volatile uint8_t res25;
0567 volatile uint8_t res26;
0568 volatile uint8_t idar4;
0569 volatile uint8_t idar5;
0570 volatile uint8_t res27;
0571 volatile uint8_t res28;
0572 volatile uint8_t idar6;
0573 volatile uint8_t idar7;
0574 volatile uint8_t res29;
0575 volatile uint8_t res30;
0576 volatile uint8_t idmr4;
0577 volatile uint8_t idmr5;
0578 volatile uint8_t res31;
0579 volatile uint8_t res32;
0580 volatile uint8_t idmr6;
0581 volatile uint8_t idmr7;
0582 volatile uint8_t res33;
0583 volatile uint8_t res34;
0584 volatile uint8_t rxidr0;
0585 volatile uint8_t rxidr1;
0586 volatile uint8_t res35;
0587 volatile uint8_t res36;
0588 volatile uint8_t rxidr2;
0589 volatile uint8_t rxidr3;
0590 volatile uint8_t res37;
0591 volatile uint8_t res38;
0592 volatile uint8_t rxdsr0;
0593 volatile uint8_t rxdsr1;
0594 volatile uint8_t res39;
0595 volatile uint8_t res40;
0596 volatile uint8_t rxdsr2;
0597 volatile uint8_t rxdsr3;
0598 volatile uint8_t res41;
0599 volatile uint8_t res42;
0600 volatile uint8_t rxdsr4;
0601 volatile uint8_t rxdsr5;
0602 volatile uint8_t res43;
0603 volatile uint8_t res44;
0604 volatile uint8_t rxdsr6;
0605 volatile uint8_t rxdsr7;
0606 volatile uint8_t res45;
0607 volatile uint8_t res46;
0608 volatile uint8_t rxdlr;
0609 volatile uint8_t res47;
0610 volatile uint8_t res48;
0611 volatile uint8_t res49;
0612 volatile uint8_t rxtimh;
0613 volatile uint8_t rxtiml;
0614 volatile uint8_t res50;
0615 volatile uint8_t res51;
0616 volatile uint8_t txidr0;
0617 volatile uint8_t txidr1;
0618 volatile uint8_t res52;
0619 volatile uint8_t res53;
0620 volatile uint8_t txidr2;
0621 volatile uint8_t txidr3;
0622 volatile uint8_t res54;
0623 volatile uint8_t res55;
0624 volatile uint8_t txdsr0;
0625 volatile uint8_t txdsr1;
0626 volatile uint8_t res56;
0627 volatile uint8_t res57;
0628 volatile uint8_t txdsr2;
0629 volatile uint8_t txdsr3;
0630 volatile uint8_t res58;
0631 volatile uint8_t res59;
0632 volatile uint8_t txdsr4;
0633 volatile uint8_t txdsr5;
0634 volatile uint8_t res60;
0635 volatile uint8_t res61;
0636 volatile uint8_t txdsr6;
0637 volatile uint8_t txdsr7;
0638 volatile uint8_t res62;
0639 volatile uint8_t res63;
0640 volatile uint8_t txdlr;
0641 volatile uint8_t txtbpr;
0642 volatile uint8_t res64;
0643 volatile uint8_t res65;
0644 volatile uint8_t txtimh;
0645 volatile uint8_t txtiml;
0646 volatile uint8_t res66;
0647 volatile uint8_t res67;
0648 } mscan[MPC5200_CAN_NO];
0649
0650 volatile uint8_t res[0x100];
0651
0652
0653
0654
0655 volatile uint32_t gpiopcr;
0656 #define GPIO_PCR_CHIP_SELECT_1 0x80000000
0657 #define GPIO_PCR_CHIP_ALTS 0x30000000
0658 #define GPIO_PCR_CHIP_ALTS_NONE 0x00000000
0659 #define GPIO_PCR_CHIP_ALTS_CAN 0x10000000
0660 #define GPIO_PCR_CHIP_ALTS_SPI 0x20000000
0661 #define GPIO_PCR_CHIP_ALTS_BOTH 0x30000000
0662 #define GPIO_PCR_CHIP_SELECT_7 0x08000000
0663 #define GPIO_PCR_CHIP_SELECT_6 0x04000000
0664 #define GPIO_PCR_CHIP_SELECT_ATA 0x03000000
0665 #define GPIO_PCR_CHIP_SELECT_IR_USB_CLK 0x00800000
0666 #define GPIO_PCR_IRDA 0x00700000
0667 #define GPIO_PCR_ETHERNET 0x000F0000
0668 #define GPIO_PCR_PCI_DIS 0x00008000
0669 #define GPIO_PCR_USB_SE 0x00004000
0670 #define GPIO_PCR_USB_GPIO 0x00003000
0671 #define GPIO_PCR_PSC3 0x00000F00
0672 #define GPIO_PCR_PSC2 0x00000070
0673 #define GPIO_PCR_PSC1 0x00000007
0674
0675 #define GPIO_S_PIN_IR_USB_CLK BSP_BBIT32(2)
0676 #define GPIO_S_PIN_IRDA_TX BSP_BBIT32(3)
0677 #define GPIO_S_PIN_ETH_11 BSP_BBIT32(4)
0678 #define GPIO_S_PIN_ETH_10 BSP_BBIT32(5)
0679 #define GPIO_S_PIN_ETH_9 BSP_BBIT32(6)
0680 #define GPIO_S_PIN_ETH_8 BSP_BBIT32(7)
0681 #define GPIO_S_PIN_USB1_8 BSP_BBIT32(12)
0682 #define GPIO_S_PIN_USB1_7 BSP_BBIT32(13)
0683 #define GPIO_S_PIN_USB1_6 BSP_BBIT32(14)
0684 #define GPIO_S_PIN_USB1_0 BSP_BBIT32(15)
0685 #define GPIO_S_PIN_PSC3_7 BSP_BBIT32(18)
0686 #define GPIO_S_PIN_PSC3_6 BSP_BBIT32(19)
0687 #define GPIO_S_PIN_PSC3_3 BSP_BBIT32(20)
0688 #define GPIO_S_PIN_PSC3_2 BSP_BBIT32(21)
0689 #define GPIO_S_PIN_PSC3_1 BSP_BBIT32(22)
0690 #define GPIO_S_PIN_PSC3_0 BSP_BBIT32(23)
0691 #define GPIO_S_PIN_PSC2_3 BSP_BBIT32(24)
0692 #define GPIO_S_PIN_PSC2_2 BSP_BBIT32(25)
0693 #define GPIO_S_PIN_PSC2_1 BSP_BBIT32(26)
0694 #define GPIO_S_PIN_PSC2_0 BSP_BBIT32(27)
0695 #define GPIO_S_PIN_PSC1_3 BSP_BBIT32(28)
0696 #define GPIO_S_PIN_PSC1_2 BSP_BBIT32(29)
0697 #define GPIO_S_PIN_PSC1_1 BSP_BBIT32(30)
0698 #define GPIO_S_PIN_PSC1_0 BSP_BBIT32(31)
0699
0700 volatile uint32_t gpiosen;
0701 volatile uint32_t gpiosod;
0702 volatile uint32_t gpiosdd;
0703 volatile uint32_t gpiosdo;
0704 volatile uint32_t gpiosdi;
0705
0706 #define GPIO_O_PIN_ETH_7 BSP_BBIT32(0)
0707 #define GPIO_O_PIN_ETH_6 BSP_BBIT32(1)
0708 #define GPIO_O_PIN_ETH_5 BSP_BBIT32(2)
0709 #define GPIO_O_PIN_ETH_4 BSP_BBIT32(3)
0710 #define GPIO_O_PIN_ETH_3 BSP_BBIT32(4)
0711 #define GPIO_O_PIN_ETH_2 BSP_BBIT32(5)
0712 #define GPIO_O_PIN_ETH_1 BSP_BBIT32(6)
0713 #define GPIO_O_PIN_ETH_0 BSP_BBIT32(7)
0714 #define GPIO_O_PIN_I2C_3 BSP_BBIT32(13)
0715 #define GPIO_O_PIN_I2C_0 BSP_BBIT32(14)
0716 #define GPIO_O_PIN_I2C_1 BSP_BBIT32(15)
0717
0718 volatile uint32_t gpiooe;
0719 volatile uint32_t gpioodo;
0720
0721 #define GPIO_I_PIN_ETH_16 BSP_BBIT32(0)
0722 #define GPIO_I_PIN_ETH_15 BSP_BBIT32(1)
0723 #define GPIO_I_PIN_ETH_14 BSP_BBIT32(2)
0724 #define GPIO_I_PIN_ETH_13 BSP_BBIT32(3)
0725 #define GPIO_I_PIN_USB1_9 BSP_BBIT32(4)
0726 #define GPIO_I_PIN_PSC3_8 BSP_BBIT32(5)
0727 #define GPIO_I_PIN_PSC3_5 BSP_BBIT32(6)
0728 #define GPIO_I_PIN_PSC3_4 BSP_BBIT32(7)
0729
0730 volatile uint32_t gpiosie;
0731 #define GPIO_SIE_SINT_7_ETH_16_PIN 0x80000000
0732 #define GPIO_SIE_SINT_6_ETH_15_PIN 0x40000000
0733 #define GPIO_SIE_SINT_5_ETH_14_PIN 0x20000000
0734 #define GPIO_SIE_SINT_4_ETH_13_PIN 0x10000000
0735 #define GPIO_SIE_SINT_3_USB1_9_PIN 0x08000000
0736 #define GPIO_SIE_SINT_2_PSC3_8_PIN 0x04000000
0737 #define GPIO_SIE_SINT_1_PSC3_5_PIN 0x02000000
0738 #define GPIO_SIE_SINT_0_PSC3_4_PIN 0x01000000
0739
0740 volatile uint32_t gpiosiod;
0741
0742 volatile uint32_t gpiosidd;
0743 #define GPIO_SIDD_SINT_7_ETH_16_PIN 0x80000000
0744 #define GPIO_SIDD_SINT_6_ETH_15_PIN 0x40000000
0745 #define GPIO_SIDD_SINT_5_ETH_14_PIN 0x20000000
0746 #define GPIO_SIDD_SINT_4_ETH_13_PIN 0x10000000
0747 #define GPIO_SIDD_SINT_3_USB1_9_PIN 0x08000000
0748 #define GPIO_SIDD_SINT_2_PSC3_8_PIN 0x04000000
0749 #define GPIO_SIDD_SINT_1_PSC3_5_PIN 0x02000000
0750 #define GPIO_SIDD_SINT_0_PSC3_4_PIN 0x01000000
0751
0752 volatile uint32_t gpiosido;
0753
0754 volatile uint32_t gpiosiie;
0755 #define GPIO_SIIE_SINT_7_ETH_16_PIN 0x80000000
0756 #define GPIO_SIIE_SINT_6_ETH_15_PIN 0x40000000
0757 #define GPIO_SIIE_SINT_5_ETH_14_PIN 0x20000000
0758 #define GPIO_SIIE_SINT_4_ETH_13_PIN 0x10000000
0759 #define GPIO_SIIE_SINT_3_USB1_9_PIN 0x08000000
0760 #define GPIO_SIIE_SINT_2_PSC3_8_PIN 0x04000000
0761 #define GPIO_SIIE_SINT_1_PSC3_5_PIN 0x02000000
0762 #define GPIO_SIIE_SINT_0_PSC3_4_PIN 0x01000000
0763
0764 volatile uint32_t gpiosiit;
0765 #define GPIO_SIIT_SET_ETH_16_PIN(reg, val) BSP_BFLD32SET(reg, val, 0, 1)
0766 #define GPIO_SIIT_SET_ETH_15_PIN(reg, val) BSP_BFLD32SET(reg, val, 2, 3)
0767 #define GPIO_SIIT_SET_ETH_14_PIN(reg, val) BSP_BFLD32SET(reg, val, 4, 5)
0768 #define GPIO_SIIT_SET_ETH_13_PIN(reg, val) BSP_BFLD32SET(reg, val, 6, 7)
0769 #define GPIO_SIIT_SET_USB1_9_PIN(reg, val) BSP_BFLD32SET(reg, val, 8, 9)
0770 #define GPIO_SIIT_SET_PSC3_8_PIN(reg, val) BSP_BFLD32SET(reg, val, 10, 11)
0771 #define GPIO_SIIT_SET_PSC3_5_PIN(reg, val) BSP_BFLD32SET(reg, val, 12, 13)
0772 #define GPIO_SIIT_SET_PSC3_4_PIN(reg, val) BSP_BFLD32SET(reg, val, 14, 15)
0773
0774 #define GPIO_SIIT_SINT_7_ETH_16_PIN_MASK 0xc0000000
0775 #define GPIO_SIIT_SINT_6_ETH_15_PIN_MASK 0x30000000
0776 #define GPIO_SIIT_SINT_5_ETH_14_PIN_MASK 0x0c000000
0777 #define GPIO_SIIT_SINT_4_ETH_13_PIN_MASK 0x03000000
0778 #define GPIO_SIIT_SINT_3_USB1_9_PIN_MASK 0x00c00000
0779 #define GPIO_SIIT_SINT_2_PSC3_8_PIN_MASK 0x00300000
0780 #define GPIO_SIIT_SINT_1_PSC3_5_PIN_MASK 0x000c0000
0781 #define GPIO_SIIT_SINT_0_PSC3_4_PIN_MASK 0x00030000
0782
0783 #define GPIO_SIIT_ON_ANY_TRANSITION 0x00000000
0784 #define GPIO_SIIT_ON_RISING_EDGE 0x00000001
0785 #define GPIO_SIIT_ON_FALLING_EDGE 0x00000002
0786 #define GPIO_SIIT_ON_PULSE 0x00000003
0787
0788 #define GPIO_SIIT_SINT_7_ETH_16_PIN_SHIFT 16
0789 #define GPIO_SIIT_SINT_6_ETH_15_PIN_SHIFT 18
0790 #define GPIO_SIIT_SINT_5_ETH_14_PIN_SHIFT 20
0791 #define GPIO_SIIT_SINT_4_ETH_13_PIN_SHIFT 22
0792 #define GPIO_SIIT_SINT_3_USB1_9_PIN_SHIFT 24
0793 #define GPIO_SIIT_SINT_2_PSC3_8_PIN_SHIFT 26
0794 #define GPIO_SIIT_SINT_1_PSC3_5_PIN_SHIFT 28
0795 #define GPIO_SIIT_SINT_0_PSC3_4_PIN_SHIFT 30
0796
0797 volatile uint32_t gpiosime;
0798 #define GPIO_SIME_MASTER_ENABLE 0x10000000
0799
0800 volatile uint32_t gpiosist;
0801 #define GPIO_SIST_SINT_7_ETH_16_PIN_STATUS 0x80000000
0802 #define GPIO_SIST_SINT_6_ETH_15_PIN_STATUS 0x40000000
0803 #define GPIO_SIST_SINT_5_ETH_14_PIN_STATUS 0x20000000
0804 #define GPIO_SIST_SINT_4_ETH_13_PIN_STATUS 0x10000000
0805 #define GPIO_SIST_SINT_3_USB1_9_PIN_STATUS 0x08000000
0806 #define GPIO_SIST_SINT_2_PSC3_8_PIN_STATUS 0x04000000
0807 #define GPIO_SIST_SINT_1_PSC3_5_PIN_STATUS 0x02000000
0808 #define GPIO_SIST_SINT_0_PSC3_4_PIN_STATUS 0x01000000
0809 #define GPIO_SIST_SINT_7_ETH_16_PIN_VALUE 0x00800000
0810 #define GPIO_SIST_SINT_6_ETH_15_PIN_VALUE 0x00400000
0811 #define GPIO_SIST_SINT_5_ETH_14_PIN_VALUE 0x00200000
0812 #define GPIO_SIST_SINT_4_ETH_13_PIN_VALUE 0x00100000
0813 #define GPIO_SIST_SINT_3_USB1_9_PIN_VALUE 0x00080000
0814 #define GPIO_SIST_SINT_2_PSC3_8_PIN_VALUE 0x00040000
0815 #define GPIO_SIST_SINT_1_PSC3_5_PIN_VALUE 0x00020000
0816 #define GPIO_SIST_SINT_0_PSC3_4_PIN_VALUE 0x00010000
0817
0818 #define GPIO_SIST_SINT_CLEAR_ALL 0xff000000
0819
0820 volatile uint8_t res4[0xC0];
0821
0822
0823
0824
0825
0826 #define GPIO_W_PIN_GPIO_WKUP_7 BSP_BBIT32(0)
0827 #define GPIO_W_PIN_GPIO_WKUP_6 BSP_BBIT32(1)
0828 #define GPIO_W_PIN_PSC6_1 BSP_BBIT32(2)
0829 #define GPIO_W_PIN_PSC6_0 BSP_BBIT32(3)
0830 #define GPIO_W_PIN_ETH_17 BSP_BBIT32(4)
0831 #define GPIO_W_PIN_PSC3_9 BSP_BBIT32(5)
0832 #define GPIO_W_PIN_PSC2_4 BSP_BBIT32(6)
0833 #define GPIO_W_PIN_PSC1_4 BSP_BBIT32(7)
0834
0835 volatile uint32_t gpiowe;
0836 volatile uint32_t gpiowod;
0837 volatile uint32_t gpiowdd;
0838 volatile uint32_t gpiowdo;
0839 volatile uint32_t gpiowue;
0840 volatile uint32_t gpiowsie;
0841 volatile uint32_t gpiowt;
0842 volatile uint32_t gpiowme;
0843 volatile uint32_t gpiowi;
0844 volatile uint32_t gpiows;
0845 volatile uint8_t gpiow_res[0xD8];
0846
0847
0848
0849
0850 volatile uint8_t ppci[0x100];
0851
0852
0853
0854
0855 volatile uint8_t ir[0x100];
0856
0857
0858
0859
0860 volatile uint8_t spi[0x100];
0861
0862
0863
0864
0865 volatile uint8_t usb[0x200];
0866
0867
0868
0869
0870 volatile mpc5200_sdma sdma;
0871
0872 volatile uint32_t EU00;
0873 volatile uint32_t EU01;
0874 volatile uint32_t EU02;
0875 volatile uint32_t EU03;
0876 volatile uint32_t EU04;
0877 volatile uint32_t EU05;
0878 volatile uint32_t EU06;
0879 volatile uint32_t EU07;
0880 volatile uint32_t EU10;
0881 volatile uint32_t EU11;
0882 volatile uint32_t EU12;
0883 volatile uint32_t EU13;
0884 volatile uint32_t EU14;
0885 volatile uint32_t EU15;
0886 volatile uint32_t EU16;
0887 volatile uint32_t EU17;
0888 volatile uint32_t EU20;
0889 volatile uint32_t EU21;
0890 volatile uint32_t EU22;
0891 volatile uint32_t EU23;
0892 volatile uint32_t EU24;
0893 volatile uint32_t EU25;
0894 volatile uint32_t EU26;
0895 volatile uint32_t EU27;
0896 volatile uint32_t EU30;
0897 volatile uint32_t EU31;
0898 volatile uint32_t EU32;
0899 volatile uint32_t EU33;
0900 volatile uint32_t EU34;
0901 volatile uint32_t EU35;
0902 volatile uint32_t EU36;
0903 volatile uint32_t EU37;
0904 #if 0
0905 volatile uint32_t res8[0x340];
0906 #else
0907 volatile uint8_t res_1300[0xc00];
0908
0909 volatile uint32_t reserved0;
0910 volatile uint32_t reserved1;
0911 volatile uint32_t reserved2;
0912 volatile uint32_t reserved3;
0913 volatile uint32_t reserved4;
0914 volatile uint32_t reserved5;
0915 volatile uint32_t reserved6;
0916 volatile uint32_t reserved7;
0917 volatile uint32_t reserved8;
0918 volatile uint32_t reserved9;
0919 volatile uint32_t reserved10;
0920 volatile uint32_t reserved11;
0921 volatile uint32_t reserved12;
0922 volatile uint32_t reserved13;
0923 volatile uint32_t reserved14;
0924 volatile uint32_t reserved15;
0925
0926 #define XLB_CFG_PLDIS BSP_BBIT32(0)
0927 #define XLB_CFG_BSDIS BSP_BBIT32(15)
0928 #define XLB_CFG_SE BSP_BBIT32(16)
0929 #define XLB_CFG_USE_WWF BSP_BBIT32(17)
0930 #define XLB_CFG_TBEN BSP_BBIT32(18)
0931 #define XLB_CFG_WS BSP_BBIT32(20)
0932 #define XLB_CFG_SP(val) BSP_BFLD32(val, 21, 23)
0933 #define XLB_CFG_SET_SP(reg, val) BSP_BFLD32SET(reg, val, 21, 23)
0934 #define XLB_CFG_PM(val) BSP_BFLD32(val, 25, 26)
0935 #define XLB_CFG_SET_PM(reg, val) BSP_BFLD32SET(reg, val, 25, 26)
0936 #define XLB_CFG_BA BSP_BBIT32(28)
0937 #define XLB_CFG_DT BSP_BBIT32(29)
0938 #define XLB_CFG_AT BSP_BBIT32(30)
0939
0940 volatile uint32_t config;
0941 volatile uint32_t version;
0942
0943 #define XLB_ST_SEA BSP_BBIT32(23)
0944 #define XLB_ST_MM BSP_BBIT32(24)
0945 #define XLB_ST_TTA BSP_BBIT32(25)
0946 #define XLB_ST_TTR BSP_BBIT32(26)
0947 #define XLB_ST_ECW BSP_BBIT32(27)
0948 #define XLB_ST_TTM BSP_BBIT32(28)
0949 #define XLB_ST_BA BSP_BBIT32(29)
0950 #define XLB_ST_DT BSP_BBIT32(30)
0951 #define XLB_ST_AT BSP_BBIT32(31)
0952
0953 volatile uint32_t xlb_status;
0954 volatile uint32_t int_enable;
0955 volatile uint32_t add_capture;
0956 volatile uint32_t bus_sig_capture;
0957 volatile uint32_t add_time_out;
0958 volatile uint32_t data_time_out;
0959 volatile uint32_t bus_time_out;
0960 volatile uint32_t priority_enable;
0961 volatile uint32_t priority;
0962 volatile uint32_t arb_base_addr2;
0963 volatile uint32_t snoop_window;
0964
0965 volatile uint32_t reserved16;
0966 volatile uint32_t reserved17;
0967 volatile uint32_t reserved18;
0968
0969 volatile uint32_t control;
0970 volatile uint32_t init_total_count;
0971 volatile uint32_t int_total_count;
0972
0973 volatile uint32_t reserved19;
0974
0975 volatile uint32_t lower_address;
0976 volatile uint32_t higher_address;
0977 volatile uint32_t int_window_count;
0978 volatile uint32_t window_ter_count;
0979 volatile uint8_t res_0x1fa0[0x60];
0980
0981
0982 #endif
0983
0984
0985
0986
0987 struct mpc5200_psc {
0988 volatile uint8_t mr;
0989 volatile uint8_t res1[3];
0990 volatile uint16_t sr_csr;
0991 volatile uint16_t res2[1];
0992 volatile uint16_t cr;
0993 volatile uint16_t res3[1];
0994 volatile uint32_t rb_tb;
0995 volatile uint16_t ipcr_acr;
0996 volatile uint16_t res4[1];
0997 volatile uint16_t isr_imr;
0998 #define ISR_TX_RDY (1 << 8)
0999 #define ISR_RX_RDY_FULL (1 << 9)
1000 #define ISR_RB (1 << 15)
1001 #define ISR_FE (1 << 14)
1002 #define ISR_PE (1 << 13)
1003 #define ISR_OE (1 << 12)
1004 #define ISR_ERROR (ISR_FE | ISR_PE | ISR_OE)
1005
1006 #define IMR_TX_RDY (1 << 8)
1007 #define IMR_RX_RDY_FULL (1 << 9)
1008 volatile uint16_t res5[1];
1009 volatile uint8_t ctur;
1010 volatile uint8_t res6[3];
1011 volatile uint8_t ctlr;
1012 volatile uint8_t res7[0x13];
1013 volatile uint8_t ivr;
1014 volatile uint8_t res8[3];
1015 volatile uint8_t ip;
1016 volatile uint8_t res9[3];
1017 volatile uint8_t op1;
1018 volatile uint8_t res10[3];
1019 volatile uint8_t op0;
1020 volatile uint8_t res11[3];
1021 volatile uint8_t sicr;
1022 volatile uint8_t res12[0x17];
1023 volatile uint16_t rfnum;
1024 volatile uint16_t res13[1];
1025 volatile uint16_t tfnum;
1026 volatile uint16_t res14[1];
1027 volatile uint16_t rfdata;
1028 volatile uint16_t res15[1];
1029 volatile uint16_t rfstat;
1030 volatile uint16_t res16[1];
1031 volatile uint8_t rfcntl;
1032 volatile uint8_t res17[5];
1033 volatile uint16_t rfalarm;
1034 volatile uint8_t res18[2];
1035 volatile uint16_t rfrptr;
1036 volatile uint16_t res19[1];
1037 volatile uint16_t rfwptr;
1038 volatile uint16_t res20[1];
1039 volatile uint16_t rflrfptr;
1040 volatile uint16_t rflwfptr;
1041 volatile uint16_t res21[1];
1042 volatile uint16_t tfdata;
1043 volatile uint16_t res22[1];
1044 volatile uint16_t tfstat;
1045 volatile uint16_t res23[1];
1046 volatile uint8_t tfcntl;
1047 volatile uint8_t res24[5];
1048 volatile uint16_t tfalarm;
1049 volatile uint8_t res25[2];
1050 volatile uint16_t tfrptr;
1051 volatile uint16_t res26[1];
1052 volatile uint16_t tfwptr;
1053 volatile uint16_t res27[1];
1054 volatile uint16_t tflrfptr;
1055 volatile uint16_t tflwfptr;
1056 volatile uint16_t res28[1];
1057 volatile uint8_t res29[0x160];
1058 } psc[MPC5200_PSC_REG_SETS];
1059
1060
1061
1062
1063 #define TX_FIFO_SIZE 256
1064 #define RX_FIFO_SIZE 512
1065
1066
1067 volatile uint8_t irda[0x200];
1068
1069
1070
1071
1072
1073
1074
1075 volatile uint32_t fec_id;
1076 volatile uint32_t ievent;
1077 volatile uint32_t imask;
1078
1079 volatile uint32_t res9[1];
1080 volatile uint32_t r_des_active;
1081 volatile uint32_t x_des_active;
1082 volatile uint32_t r_des_active_cl;
1083 volatile uint32_t x_des_active_cl;
1084 volatile uint32_t ivent_set;
1085 volatile uint32_t ecntrl;
1086
1087 volatile uint32_t res10[6];
1088 volatile uint32_t mii_data;
1089 volatile uint32_t mii_speed;
1090 volatile uint32_t mii_status;
1091
1092 volatile uint32_t res11[5];
1093 volatile uint32_t mib_data;
1094 volatile uint32_t mib_control;
1095
1096 volatile uint32_t res12[6];
1097 volatile uint32_t r_activate;
1098 volatile uint32_t r_cntrl;
1099 volatile uint32_t r_hash;
1100 volatile uint32_t r_data;
1101 volatile uint32_t ar_done;
1102 volatile uint32_t r_test;
1103 volatile uint32_t r_mib;
1104 volatile uint32_t r_da_low;
1105 volatile uint32_t r_da_high;
1106
1107 volatile uint32_t res13[7];
1108 volatile uint32_t x_activate;
1109 volatile uint32_t x_cntrl;
1110 volatile uint32_t backoff;
1111 volatile uint32_t x_data;
1112 volatile uint32_t x_status;
1113 volatile uint32_t x_mib;
1114 volatile uint32_t x_test;
1115 volatile uint32_t fdxfc_da1;
1116 volatile uint32_t fdxfc_da2;
1117 volatile uint32_t paddr1;
1118 volatile uint32_t paddr2;
1119 volatile uint32_t op_pause;
1120
1121 volatile uint32_t res14[4];
1122 volatile uint32_t instr_reg;
1123 volatile uint32_t context_reg;
1124 volatile uint32_t test_cntrl;
1125 volatile uint32_t acc_reg;
1126 volatile uint32_t ones;
1127 volatile uint32_t zeros;
1128 volatile uint32_t iaddr1;
1129 volatile uint32_t iaddr2;
1130 volatile uint32_t gaddr1;
1131 volatile uint32_t gaddr2;
1132 volatile uint32_t random;
1133 volatile uint32_t rand1;
1134 volatile uint32_t tmp;
1135
1136 volatile uint32_t res15[3];
1137 volatile uint32_t fifo_id;
1138 volatile uint32_t x_wmrk;
1139 volatile uint32_t fcntrl;
1140 volatile uint32_t r_bound;
1141 volatile uint32_t r_fstart;
1142 volatile uint32_t r_count;
1143 volatile uint32_t r_lag;
1144 volatile uint32_t r_read;
1145 volatile uint32_t r_write;
1146 volatile uint32_t x_count;
1147 volatile uint32_t x_lag;
1148 volatile uint32_t x_retry;
1149 volatile uint32_t x_write;
1150 volatile uint32_t x_read;
1151
1152 volatile uint32_t res16[2];
1153 volatile uint32_t fm_cntrl;
1154 volatile uint32_t rfifo_data;
1155 volatile uint32_t rfifo_status;
1156 volatile uint32_t rfifo_cntrl;
1157 volatile uint32_t rfifo_lrf_ptr;
1158 volatile uint32_t rfifo_lwf_ptr;
1159 volatile uint32_t rfifo_alarm;
1160 volatile uint32_t rfifo_rdptr;
1161 volatile uint32_t rfifo_wrptr;
1162 volatile uint32_t tfifo_data;
1163 volatile uint32_t tfifo_status;
1164 volatile uint32_t tfifo_cntrl;
1165 volatile uint32_t tfifo_lrf_ptr;
1166 volatile uint32_t tfifo_lwf_ptr;
1167 volatile uint32_t tfifo_alarm;
1168 volatile uint32_t tfifo_rdptr;
1169 volatile uint32_t tfifo_wrptr;
1170
1171 volatile uint32_t reset_cntrl;
1172 volatile uint32_t xmit_fsm;
1173
1174 volatile uint32_t res17[3];
1175 volatile uint32_t rdes_data0;
1176 volatile uint32_t rdes_data1;
1177 volatile uint32_t r_length;
1178 volatile uint32_t x_length;
1179 volatile uint32_t x_addr;
1180 volatile uint32_t cdes_data;
1181 volatile uint32_t status;
1182 volatile uint32_t dma_control;
1183 volatile uint32_t des_cmnd;
1184 volatile uint32_t data;
1185
1186 volatile uint8_t RES[0x600];
1187
1188
1189 #if 0
1190
1191
1192 volatile uint32_t rmon_t_drop;
1193 volatile uint32_t rmon_t_packets;
1194 volatile uint32_t rmon_t_bc_pkt;
1195 volatile uint32_t rmon_t_mc_pkt;
1196 volatile uint32_t rmon_t_crc_align;
1197 volatile uint32_t rmon_t_undersize;
1198 volatile uint32_t rmon_t_oversize;
1199 volatile uint32_t rmon_t_frag;
1200 volatile uint32_t rmon_t_jab;
1201 volatile uint32_t rmon_t_col;
1202 volatile uint32_t rmon_t_p64;
1203 volatile uint32_t rmon_t_p65to127;
1204 volatile uint32_t rmon_t_p128to255;
1205 volatile uint32_t rmon_t_p256to511;
1206 volatile uint32_t rmon_t_p512to1023;
1207 volatile uint32_t rmon_t_p1024to2047;
1208 volatile uint32_t rmon_t_p_gte2048;
1209 volatile uint32_t rmon_t_octets;
1210 volatile uint32_t ieee_t_drop;
1211 volatile uint32_t ieee_t_frame_ok;
1212 volatile uint32_t ieee_t_1col;
1213 volatile uint32_t ieee_t_mcol;
1214 volatile uint32_t ieee_t_def;
1215 volatile uint32_t ieee_t_lcol;
1216 volatile uint32_t ieee_t_excol;
1217 volatile uint32_t ieee_t_macerr;
1218 volatile uint32_t ieee_t_cserr;
1219 volatile uint32_t ieee_t_sqe;
1220 volatile uint32_t t_fdxfc;
1221 volatile uint32_t ieee_t_octets_ok;
1222
1223 volatile uint32_t res18[2];
1224 volatile uint32_t rmon_r_drop;
1225 volatile uint32_t rmon_r_packets;
1226 volatile uint32_t rmon_r_bc_pkt;
1227 volatile uint32_t rmon_r_mc_pkt;
1228 volatile uint32_t rmon_r_crc_align;
1229 volatile uint32_t rmon_r_undersize;
1230 volatile uint32_t rmon_r_oversize;
1231 volatile uint32_t rmon_r_frag;
1232 volatile uint32_t rmon_r_jab;
1233
1234 volatile uint32_t rmon_r_resvd_0;
1235
1236 volatile uint32_t rmon_r_p64;
1237 volatile uint32_t rmon_r_p65to127;
1238 volatile uint32_t rmon_r_p128to255;
1239 volatile uint32_t rmon_r_p256to511;
1240 volatile uint32_t rmon_r_p512to1023;
1241 volatile uint32_t rmon_r_p1024to2047;
1242 volatile uint32_t rmon_r_p_gte2048;
1243 volatile uint32_t rmon_r_octets;
1244 volatile uint32_t ieee_r_drop;
1245 volatile uint32_t ieee_r_frame_ok;
1246 volatile uint32_t ieee_r_crc;
1247 volatile uint32_t ieee_r_align;
1248 volatile uint32_t r_macerr;
1249 volatile uint32_t r_fdxfc;
1250 volatile uint32_t ieee_r_octets_ok;
1251
1252 volatile uint32_t res19[6];
1253
1254 volatile uint32_t res20[64];
1255
1256 volatile uint32_t res21[256];
1257 #endif
1258
1259
1260
1261
1262 volatile uint8_t pci[0x200];
1263
1264
1265
1266
1267
1268
1269 volatile uint32_t ata_hcfg;
1270 volatile uint32_t ata_hsr;
1271 volatile uint32_t ata_pio1;
1272 volatile uint32_t ata_pio2;
1273 volatile uint32_t ata_dma1;
1274 volatile uint32_t ata_dma2;
1275 volatile uint32_t ata_udma1;
1276 volatile uint32_t ata_udma2;
1277 volatile uint32_t ata_udma3;
1278 volatile uint32_t ata_udma4;
1279 volatile uint32_t ata_udma5;
1280 volatile uint32_t ata_res1[4];
1281
1282
1283 volatile uint32_t ata_rtfdwr;
1284
1285 #define ATA_RTFSR_ERR BSP_BBIT32(9)
1286 #define ATA_RTFSR_UF BSP_BBIT32(10)
1287 #define ATA_RTFSR_OF BSP_BBIT32(11)
1288 #define ATA_RTFSR_FULL BSP_BBIT32(12)
1289 #define ATA_RTFSR_HI BSP_BBIT32(13)
1290 #define ATA_RTFSR_LO BSP_BBIT32(14)
1291 #define ATA_RTFSR_EMPTY BSP_BBIT32(15)
1292
1293 volatile uint32_t ata_rtfsr;
1294
1295 #define ATA_RTFCR_WFR BSP_BBIT32(2)
1296 #define ATA_RTFCR_GR(val) BSP_BFLD32(val, 5, 7)
1297
1298 volatile uint32_t ata_rtfcr;
1299 volatile uint32_t ata_rtfar;
1300 volatile uint32_t ata_rtfrpr;
1301 volatile uint32_t ata_rtfwpr;
1302 volatile uint32_t ata_res2[2];
1303
1304
1305 volatile uint32_t ata_dctr_dasr;
1306 volatile uint32_t ata_ddr;
1307 volatile uint32_t ata_dfr_der;
1308 volatile uint32_t ata_dscr;
1309 volatile uint32_t ata_dsnr;
1310 volatile uint32_t ata_dclr;
1311 volatile uint32_t ata_dchr;
1312 volatile uint32_t ata_ddhr;
1313 volatile uint32_t ata_dcr_dsr;
1314 volatile uint32_t ata_res3[0xA0];
1315
1316
1317
1318
1319 struct mpc5200_i2c_regs_s {
1320 volatile uint8_t madr;
1321 volatile uint8_t res_1[3];
1322 volatile uint8_t mfdr;
1323 volatile uint8_t res_5[3];
1324 volatile uint8_t mcr;
1325 volatile uint8_t res_9[3];
1326
1327 #define MPC5200_I2C_MCR_MEN (1 << (7-0))
1328 #define MPC5200_I2C_MCR_MIEN (1 << (7-1))
1329 #define MPC5200_I2C_MCR_MSTA (1 << (7-2))
1330 #define MPC5200_I2C_MCR_MTX (1 << (7-3))
1331 #define MPC5200_I2C_MCR_TXAK (1 << (7-4))
1332 #define MPC5200_I2C_MCR_RSTA (1 << (7-5))
1333
1334 volatile uint8_t msr;
1335 volatile uint8_t res_d[3];
1336 #define MPC5200_I2C_MSR_CF (1 << (7-0))
1337 #define MPC5200_I2C_MSR_MAAS (1 << (7-1))
1338 #define MPC5200_I2C_MSR_BB (1 << (7-2))
1339 #define MPC5200_I2C_MSR_MAL (1 << (7-3))
1340 #define MPC5200_I2C_MSR_SRW (1 << (7-5))
1341 #define MPC5200_I2C_MSR_MIF (1 << (7-6))
1342 #define MPC5200_I2C_MSR_RXAK (1 << (7-7))
1343 volatile uint8_t mdr;
1344 volatile uint8_t res_11[3];
1345 volatile uint8_t res_14[12];
1346 volatile uint8_t icr;
1347 #define MPC5200_I2C_ICR_BNBE2 (1 << (7-0))
1348 #define MPC5200_I2C_ICR_TE2 (1 << (7-1))
1349 #define MPC5200_I2C_ICR_RE2 (1 << (7-2))
1350 #define MPC5200_I2C_ICR_IE2 (1 << (7-3))
1351 #define MPC5200_I2C_ICR_MASK2 (MPC5200_I2C_ICR_BNBE2|MPC5200_I2C_ICR_TE2\
1352 |MPC5200_I2C_ICR_RE2|MPC5200_I2C_ICR_IE2)
1353 #define MPC5200_I2C_ICR_BNBE1 (1 << (7-4))
1354 #define MPC5200_I2C_ICR_TE1 (1 << (7-5))
1355 #define MPC5200_I2C_ICR_RE1 (1 << (7-6))
1356 #define MPC5200_I2C_ICR_IE1 (1 << (7-7))
1357 #define MPC5200_I2C_ICR_MASK1 (MPC5200_I2C_ICR_BNBE1|MPC5200_I2C_ICR_TE1\
1358 |MPC5200_I2C_ICR_RE1|MPC5200_I2C_ICR_IE1)
1359 volatile uint8_t res_21[3];
1360 volatile uint32_t res_24[7];
1361 } i2c_regs[2];
1362 volatile uint8_t res_3d80[0x280];
1363
1364
1365
1366
1367 volatile uint8_t sram_res0x4000[0x4000];
1368 volatile uint8_t sram[0x4000];
1369
1370 } mpc5200_t;
1371
1372 extern volatile mpc5200_t mpc5200;
1373
1374 #ifdef __cplusplus
1375 }
1376 #endif
1377
1378 #endif
1379
1380 #endif