Debian Codegraph @

src/plugins/scriptedwizard/resources/ppc/files/MPC5200/h/mpc5200.h

raw
1 /*====================================================================
2 * Project: Board Support Package (BSP)
3 * Developed using:
4 * Function: register description for Freescale MPC5200
5 *
6 * Copyright HighTec EDV-Systeme GmbH 1982-2006
7 *====================================================================*/
8
9 #ifndef __MPC5200_H__
10 #define __MPC5200_H__
11
12
13 /* general register definition macro */
14 #define __REG32(x) ((volatile unsigned int *)(x))
15 #define __REG16(x) ((volatile unsigned short *)(x))
16 #define __REG8(x) ((volatile unsigned char *)(x))
17
18 /* Reset value is 0x80000000; pcm030.cfg maps MBAR to this new address */
19 #define MBAR_BASE 0xF0000000
20
21 /* Internal Register Memory Map */
22 #define MM_BASE (MBAR_BASE + 0x0000) /* Memory Map Registers */
23 #define SDRAM_BASE (MBAR_BASE + 0x0100) /* SDRAM Memory Controller Registers */
24 #define CDM_BASE (MBAR_BASE + 0x0200) /* Clock Distribution Module Registers */
25 #define CSC_BASE (MBAR_BASE + 0x0300) /* Chip Select Controller Registers */
26 #define ICTL_BASE (MBAR_BASE + 0x0500) /* Interrupt Controller Registers */
27 #define GPT_BASE (MBAR_BASE + 0x0600) /* General Purpose Timer Registers */
28 #define SLT_BASE (MBAR_BASE + 0x0700) /* Slice Time Registers */
29 #define RTC_BASE (MBAR_BASE + 0x0800) /* Real-Time Clock Registers */
30 #define CAN_BASE (MBAR_BASE + 0x0900) /* MSCAN Registers */
31 #define GPS_BASE (MBAR_BASE + 0x0B00) /* GPIO Standard Registers */
32 #define GPW_BASE (MBAR_BASE + 0x0C00) /* GPIO Wakeup Registers */
33 #define PCI_BASE (MBAR_BASE + 0x0D00) /* PCI XLB Registers */
34 #define SPI_BASE (MBAR_BASE + 0x0F00) /* Serial Peripheral Interface Registers */
35 #define USB_BASE (MBAR_BASE + 0x1000) /* Universal Serial Bus Registers */
36 #define BDMA_BASE (MBAR_BASE + 0x1200) /* BestComm DMA Registers */
37 #define BDLC_BASE (MBAR_BASE + 0x1300) /* J1850 (BDLC) Registers */
38 #define XLARB_BASE (MBAR_BASE + 0x1F00) /* XL BUS ARBITRATION Registers */
39 #define PSC1_BASE (MBAR_BASE + 0x2000) /* Programmable Serial Controller 1 Registers */
40 #define PSC2_BASE (MBAR_BASE + 0x2200) /* Programmable Serial Controller 2 Registers */
41 #define PSC3_BASE (MBAR_BASE + 0x2400) /* Programmable Serial Controller 3 Registers */
42 #define PSC4_BASE (MBAR_BASE + 0x2600) /* Programmable Serial Controller 4 Registers */
43 #define PSC5_BASE (MBAR_BASE + 0x2800) /* Programmable Serial Controller 5 Registers */
44 #define PSC6_BASE (MBAR_BASE + 0x2C00) /* Programmable Serial Controller 6 Registers */
45 #define ETH_BASE (MBAR_BASE + 0x3000) /* Ethernet Registers */
46 #define BPCI_BASE (MBAR_BASE + 0x3800) /* BestComm DMA PCI Registers */
47 #define ATA_BASE (MBAR_BASE + 0x3A00) /* Advanced Technology Attachment Registers */
48 #define BLPC_BASE (MBAR_BASE + 0x3C00) /* BestComm DMA LocalPlus Registers */
49 #define IIC_BASE (MBAR_BASE + 0x3D00) /* Inter-Integrated Circuit Registers */
50
51 #define SRAM_BASE (MBAR_BASE + 0x8000) /* On-chip Static RAM Memory Locations */
52 #define SRAM_SIZE 0x4000 /* On-chip Static RAM Memory size */
53
54
55 /* Clock Distribution Module Register */
56 #define CDM_JTAGID __REG32(CDM_BASE + 0x0000) /* JTAG ID Number Register (RO) */
57 #define CDM_PORCFG __REG32(CDM_BASE + 0x0004) /* Power On Reset Configuration Register */
58 #define CDM_CFG __REG32(CDM_BASE + 0x000C) /* Configuration Register */
59 #define CDM_48_FDC __REG32(CDM_BASE + 0x0010) /* 48MHz Fractional Divider Configuration Register */
60 #define CDM_CER __REG32(CDM_BASE + 0x0014) /* Clock Enable Register */
61 #define CDM_SRESET __REG32(CDM_BASE + 0x0020) /* Soft Reset Register */
62
63
64 /* Interrupt Controller Register (see mpc52xx_irq.h) */
65
66
67
68 /* Slice Timers */
69 #define SLT0_TCR __REG32(SLT_BASE + 0x0000) /* Timer 0 Terminal Count Register */
70 #define SLT0_CR __REG32(SLT_BASE + 0x0004) /* Timer 0 Control Register */
71 #define SLT0_CVR __REG32(SLT_BASE + 0x0008) /* Timer 0 Count Value Register (RO) */
72 #define SLT0_TSR __REG32(SLT_BASE + 0x000C) /* Timer 0 Timer Status Register */
73 #define SLT1_TCR __REG32(SLT_BASE + 0x0010) /* Timer 1 Terminal Count Register */
74 #define SLT1_CR __REG32(SLT_BASE + 0x0014) /* Timer 1 Control Register */
75 #define SLT1_CVR __REG32(SLT_BASE + 0x0018) /* Timer 1 Count Value Register (RO) */
76 #define SLT1_TSR __REG32(SLT_BASE + 0x001C) /* Timer 1 Timer Status Register */
77
78 /* bits in Control Register */
79 #define SLT_CR_TE (1u << (31-7)) /* Timer Enable */
80 #define SLT_CR_IE (1u << (31-6)) /* Interrupt Enable */
81 #define SLT_CR_RW (1u << (31-5)) /* Run_Wait (1=Run,0=Wait) */
82
83 /* bits in Timer Status Register (only SLT1) */
84 #define SLT1_TSR_ST (1u << (31-7)) /* Status Timer: 1 = Terminal Count reached; write to clear interrupt */
85
86
87 /* GPIO Standard Registers */
88 #define GPIO_GPS_PCR __REG32(GPS_BASE + 0x00) /* Port Configuration Register */
89
90 /* GPIO Wakeup Registers */
91 #define GPIO_WKUP_ER __REG8(GPW_BASE + 0x00) /* GPIO WakeUp Enable Register */
92 #define GPIO_WKUP_ODE __REG8(GPW_BASE + 0x04) /* GPIO WakeUp Open Drain Emulation Register */
93 #define GPIO_WKUP_DDR __REG8(GPW_BASE + 0x08) /* GPIO WakeUp Data Direction Register */
94 #define GPIO_WKUP_DVOR __REG8(GPW_BASE + 0x0C) /* GPIO WakeUp Data Value Out Register */
95
96
97
98 #endif /* __MPC5200_H__ */