2 * MPC8xx Internal Memory Map
3 * Copyright (c) 1997 Dan Malek (dmalek@jlc.net)
5 * The I/O on the MPC860 is comprised of blocks of special registers
6 * and the dual port ram for the Communication Processor Module.
7 * Within this space are functional units such as the SIU, memory
8 * controller, system timers, and other control functions. It is
9 * a combination that I found difficult to separate into logical
10 * functional files.....but anyone else is welcome to try. -- Dan
15 /* System configuration registers.
17 typedef struct sys_conf {
33 /* PCMCIA configuration registers.
35 typedef struct pcmcia_conf {
63 /* Memory controller registers.
65 typedef struct mem_ctlr {
94 /* System Integration Timers.
96 typedef struct sys_int_timers {
115 #define TBSCR_TBIRQ_MASK ((ushort)0xff00)
116 #define TBSCR_REFA ((ushort)0x0080)
117 #define TBSCR_REFB ((ushort)0x0040)
118 #define TBSCR_REFAE ((ushort)0x0008)
119 #define TBSCR_REFBE ((ushort)0x0004)
120 #define TBSCR_TBF ((ushort)0x0002)
121 #define TBSCR_TBE ((ushort)0x0001)
123 #define RTCSC_RTCIRQ_MASK ((ushort)0xff00)
124 #define RTCSC_SEC ((ushort)0x0080)
125 #define RTCSC_ALR ((ushort)0x0040)
126 #define RTCSC_38K ((ushort)0x0010)
127 #define RTCSC_SIE ((ushort)0x0008)
128 #define RTCSC_ALE ((ushort)0x0004)
129 #define RTCSC_RTF ((ushort)0x0002)
130 #define RTCSC_RTE ((ushort)0x0001)
132 #define PISCR_PIRQ_MASK ((ushort)0xff00)
133 #define PISCR_PS ((ushort)0x0080)
134 #define PISCR_PIE ((ushort)0x0004)
135 #define PISCR_PTF ((ushort)0x0002)
136 #define PISCR_PTE ((ushort)0x0001)
140 typedef struct clk_and_reset {
144 char res[0x74]; /* Reserved area */
147 /* System Integration Timers keys.
149 typedef struct sitk {
165 /* Clocks and reset keys.
167 typedef struct cark {
174 /* The key to unlock registers maintained by keep-alive power.
176 #define KAPWR_KEY ((unsigned int)0x55ccaa33)
195 /* DMA control/status registers.
197 typedef struct sdma_csr {
214 /* Communication Processor Module Interrupt Controller.
216 typedef struct cpm_ic {
225 /* Input/Output Port control/status registers.
227 typedef struct io_port {
247 /* Communication Processor Module Timers
249 typedef struct cpm_timers {
275 /* Finally, the Communication Processor stuff.....
277 typedef struct scc { /* Serial communication channels */
292 typedef struct smc { /* Serial management channels */
302 /* MPC860T Fast Ethernet Controller. It isn't part of the CPM, but
303 * it fits within the address space.
307 uint fec_addr_low; /* lower 32 bits of station address */
308 ushort fec_addr_high; /* upper 16 bits of station address */
309 ushort res1; /* reserved */
310 uint fec_hash_table_high; /* upper 32-bits of hash table */
311 uint fec_hash_table_low; /* lower 32-bits of hash table */
312 uint fec_r_des_start; /* beginning of Rx descriptor ring */
313 uint fec_x_des_start; /* beginning of Tx descriptor ring */
314 uint fec_r_buff_size; /* Rx buffer size */
315 uint res2[9]; /* reserved */
316 uint fec_ecntrl; /* ethernet control register */
317 uint fec_ievent; /* interrupt event register */
318 uint fec_imask; /* interrupt mask register */
319 uint fec_ivec; /* interrupt level and vector status */
320 uint fec_r_des_active; /* Rx ring updated flag */
321 uint fec_x_des_active; /* Tx ring updated flag */
322 uint res3[10]; /* reserved */
323 uint fec_mii_data; /* MII data register */
324 uint fec_mii_speed; /* MII speed control register */
325 uint res4[17]; /* reserved */
326 uint fec_r_bound; /* end of RAM (read-only) */
327 uint fec_r_fstart; /* Rx FIFO start address */
328 uint res5[6]; /* reserved */
329 uint fec_x_fstart; /* Tx FIFO start address */
330 uint res6[17]; /* reserved */
331 uint fec_fun_code; /* fec SDMA function code */
332 uint res7[3]; /* reserved */
333 uint fec_r_cntrl; /* Rx control register */
334 uint fec_r_hash; /* Rx hash register */
335 uint res8[14]; /* reserved */
336 uint fec_x_cntrl; /* Tx control register */
337 uint res9[0x1e]; /* reserved */
340 typedef struct comm_proc {
341 /* General control and status registers.
359 /* Baud rate generators.
366 /* Serial Communication Channels.
370 /* Serial Management Channels.
374 /* Serial Peripheral Interface.
385 /* Parallel Interface Port.
397 /* Port E - MPC87x/88x only.
405 /* Communications Processor Timing Register -
406 Contains RMII Timing for the FECs on MPC87x/88x only.
410 /* Serial Interface and Time Slot Assignment.
423 u_char cp_siram[0x200];
425 /* The fast ethernet controller is not really part of the CPM,
426 * but it resides in the address space.
431 /* The MPC885 family has a second FEC here */
433 #define cp_fec1 cp_fec /* consistency macro */
435 /* Dual Ported RAM follows.
436 * There are many different formats for this memory area
437 * depending upon the devices used and options chosen.
438 * Some processors don't have all of it populated.
440 u_char cp_dpmem[0x1C00]; /* BD / Data / ucode */
444 u_char cp_dparam[0x400];
445 u16 cp_dparam16[0x200];
449 /* Internal memory map.
451 typedef struct immap {
452 sysconf8xx_t im_siu_conf; /* SIU Configuration */
453 pcmconf8xx_t im_pcmcia; /* PCMCIA Configuration */
454 memctl8xx_t im_memctl; /* Memory Controller */
455 sit8xx_t im_sit; /* System integration timers */
456 car8xx_t im_clkrst; /* Clocks and reset */
457 sitk8xx_t im_sitk; /* Sys int timer keys */
458 cark8xx_t im_clkrstk; /* Clocks and reset keys */
460 i2c8xx_t im_i2c; /* I2C control/status */
461 sdma8xx_t im_sdma; /* SDMA control/status */
462 cpic8xx_t im_cpic; /* CPM Interrupt Controller */
463 iop8xx_t im_ioport; /* IO Port control/status */
464 cpmtimer8xx_t im_cpmtimer; /* CPM timers */
465 cpm8xx_t im_cpm; /* Communication processor */
468 #endif /* __IMMAP_8XX__ */