blob: 6c01ffc41b1f1cf11eeb320db8f02dea8b488423 [file] [log] [blame]
Kumar Galab9c880d2010-07-03 12:56:51 -05001/*
2 * MPC85xx Internal Memory Map
3 *
4 * Copyright 2010 Freescale Semiconductor, Inc.
5 *
6 * See file CREDITS for list of people who contributed to this
7 * project.
8 *
9 * This program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License as
11 * published by the Free Software Foundation; either version 2 of
12 * the License, or (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
22 * MA 02111-1307 USA
23 */
24
25#ifndef __FSL_FMAN_H__
26#define __FSL_FMAN_H__
27
28#include <asm/types.h>
29
30typedef struct fm_bmi_common {
31 u32 fmbm_init; /* BMI initialization */
32 u32 fmbm_cfg1; /* BMI configuration1 */
33 u32 fmbm_cfg2; /* BMI configuration2 */
34 u32 res0[0x5];
35 u32 fmbm_ievr; /* interrupt event register */
36 u32 fmbm_ier; /* interrupt enable register */
37 u32 fmbm_ifr; /* interrupt force register */
38 u32 res1[0x5];
39 u32 fmbm_arb[0x8]; /* BMI arbitration */
40 u32 res2[0x28];
41 u32 fmbm_gde; /* global debug enable */
42 u32 fmbm_pp[0x3f]; /* BMI port parameters */
43 u32 res3;
44 u32 fmbm_pfs[0x3f]; /* BMI port FIFO size */
45 u32 res4;
46 u32 fmbm_ppid[0x3f];/* port partition ID */
47} fm_bmi_common_t;
48
49typedef struct fm_qmi_common {
50 u32 fmqm_gc; /* general configuration register */
51 u32 res0;
52 u32 fmqm_eie; /* error interrupt event register */
53 u32 fmqm_eien; /* error interrupt enable register */
54 u32 fmqm_eif; /* error interrupt force register */
55 u32 fmqm_ie; /* interrupt event register */
56 u32 fmqm_ien; /* interrupt enable register */
57 u32 fmqm_if; /* interrupt force register */
58 u32 fmqm_gs; /* global status register */
59 u32 fmqm_ts; /* task status register */
60 u32 fmqm_etfc; /* enqueue total frame counter */
61 u32 fmqm_dtfc; /* dequeue total frame counter */
62 u32 fmqm_dc0; /* dequeue counter 0 */
63 u32 fmqm_dc1; /* dequeue counter 1 */
64 u32 fmqm_dc2; /* dequeue counter 2 */
65 u32 fmqm_dc3; /* dequeue counter 3 */
66 u32 fmqm_dfnoc; /* dequeue FQID not override counter */
67 u32 fmqm_dfcc; /* dequeue FQID from context counter */
68 u32 fmqm_dffc; /* dequeue FQID from FD counter */
69 u32 fmqm_dcc; /* dequeue confirm counter */
70 u32 res1[0xc];
71 u32 fmqm_dtrc; /* debug trap configuration register */
72 u32 fmqm_efddd; /* enqueue frame descriptor dynamic debug */
73 u32 res3[0x2];
74 u32 res4[0xdc]; /* missing debug regs */
75} fm_qmi_common_t;
76
77typedef struct fm_bmi {
78 u8 res[1024];
79} fm_bmi_t;
80
81typedef struct fm_qmi {
82 u8 res[1024];
83} fm_qmi_t;
84
85typedef struct fm_parser {
86 u8 res[1024];
87} fm_parser_t;
88
89typedef struct fm_policer {
90 u8 res[4*1024];
91} fm_policer_t;
92
93typedef struct fm_keygen {
94 u8 res[4*1024];
95} fm_keygen_t;
96
97typedef struct fm_dma {
98 u32 fmdmsr; /* status register */
99 u32 fmdmmr; /* mode register */
100 u32 fmdmtr; /* bus threshold register */
101 u32 fmdmhy; /* bus hysteresis register */
102 u32 fmdmsetr; /* SOS emergency threshold register */
103 u32 fmdmtah; /* transfer bus address high register */
104 u32 fmdmtal; /* transfer bus address low register */
105 u32 fmdmtcid; /* transfer bus communication ID register */
106 u32 fmdmra; /* DMA bus internal ram address register */
107 u32 fmdmrd; /* DMA bus internal ram data register */
108 u32 res0[0xb];
109 u32 fmdmdcr; /* debug counter */
110 u32 fmdmemsr; /* emrgency smoother register */
111 u32 res1;
112 u32 fmdmplr[32]; /* FM DMA PID-LIODN # register */
113 u32 res[0x3c8];
114} fm_dma_t;
115
116typedef struct fm_fpm {
117 u32 fpmtnc; /* TNUM control */
118 u32 fpmprc; /* Port_ID control */
119 u32 res0;
120 u32 fpmflc; /* flush control */
121 u32 fpmdis1; /* dispatch thresholds1 */
122 u32 fpmdis2; /* dispatch thresholds2 */
123 u32 fmepi; /* error pending interrupts */
124 u32 fmrie; /* rams interrupt enable */
125 u32 fpmfcevent[0x4];/* FMan controller event 0-3 */
126 u32 res1[0x4];
127 u32 fpmfcmask[0x4]; /* FMan controller mask 0-3 */
128 u32 res2[0x4];
129 u32 fpmtsc1; /* timestamp control1 */
130 u32 fpmtsc2; /* timestamp control2 */
131 u32 fpmtsp; /* time stamp */
132 u32 fpmtsf; /* time stamp fraction */
133 u32 fpmrcr; /* rams control and event */
134 u32 res3[0x3];
135 u32 fpmdrd[0x4]; /* data_ram data 0-3 */
136 u32 res4[0xc];
137 u32 fpmdra; /* data ram access */
138 u32 fm_ip_rev_1; /* IP block revision 1 */
139 u32 fm_ip_rev_2; /* IP block revision 2 */
140 u32 fmrstc; /* reset command */
141 u32 fmcld; /* classifier debug control */
142 u32 fmnpi; /* normal pending interrupts */
143 u32 res5;
144 u32 fmnee; /* event and enable */
145 u32 fpmcev[0x4]; /* CPU event 0-3 */
146 u32 res6[0x4];
147 u32 fmfp_ps[0x40]; /* port status */
148 u32 res7[0x260];
149 u32 fpmts[0x80]; /* task status */
150 u32 res8[0xa0];
151} fm_fpm_t;
152
153typedef struct fm_imem {
154 u8 res[4*1024];
155} fm_imem_t;
156
157typedef struct fm_soft_parser {
158 u8 res[4*1024];
159} fm_soft_parser_t;
160
161typedef struct fm_dtesc {
162 u8 res[4*1024];
163} fm_dtsec_t;
164
165typedef struct fm_mdio {
166 u8 res[4*1024];
167} fm_mdio_t;
168
169typedef struct fm_10gec {
170 u8 res[4*1024];
171} fm_10gec_t;
172
173typedef struct fm_10gec_mdio {
174 u8 res[4*1024];
175} fm_10gec_mdio_t;
176
177typedef struct fm_1588 {
178 u8 res[4*1024];
179} fm_1588_t;
180
181typedef struct ccsr_fman {
182 u8 muram[0x80000];
183 fm_bmi_common_t fm_bmi_common;
184 fm_qmi_common_t fm_qmi_common;
185 u8 res0[2048];
186 struct {
187 fm_bmi_t fm_bmi;
188 fm_qmi_t fm_qmi;
189 fm_parser_t fm_parser;
190 u8 res[1024];
191 } port[63];
192 fm_policer_t fm_policer;
193 fm_keygen_t fm_keygen;
194 fm_dma_t fm_dma;
195 fm_fpm_t fm_fpm;
196 fm_imem_t fm_imem;
197 u8 res1[8*1024];
198 fm_soft_parser_t fm_soft_parser;
199 u8 res2[96*1024];
200 struct {
201 fm_dtsec_t fm_dtesc;
202 fm_mdio_t fm_mdio;
203 } mac[4];
204 u8 res3[32*1024];
205 fm_10gec_t fm_10gec;
206 fm_10gec_mdio_t fm_10gec_mdio;
207 u8 res4[48*1024];
208 fm_1588_t fm_1588;
209 u8 res5[4*1024];
210} ccsr_fman_t;
211
212#endif /*__FSL_FMAN_H__*/