source: svn/newcon3bcm2_21bu/rockford/bsp/bcm97552/common/bcmmips.h @ 22

Last change on this file since 22 was 22, checked in by phkim, 11 years ago
  1. phkim
  2. newcon3sk 를 kctv 로 브랜치 함
  • Property svn:executable set to *
File size: 7.1 KB
Line 
1/*
2#************************************************************************
3#* Coprocessor 0 Index Register Bits
4#************************************************************************
5# No known functionality (32-bit register)
6*/
7
8/*
9#************************************************************************
10#* Coprocessor 0 Entry Register Bits
11#************************************************************************
12# No known functionality (32-bit register)
13*/
14
15/*
16#************************************************************************
17#* Coprocessor 0 BvAddr Register Bits
18#************************************************************************
19# Contains offending address (32-bit register)
20*/
21
22/*
23#************************************************************************
24#* Coprocessor 0 Status Register Bits
25#************************************************************************
26
27# Notes: COP2 is forced, then allowed to be overwritten
28#               writing a '1' to bit 20 force bit 20 to '0' but no effect
29*/
30#ifndef _BCMMIPS_H
31#define _BCMMIPS_H
32
33#define BCM_CP0_SR_COP3              (1<<31)
34#define BCM_CP0_SR_COP2              (1<<30)
35#define BCM_CP0_SR_COP1              (1<<29)
36#define BCM_CP0_SR_COP0              (1<<28)
37#define BCM_CP0_SR_IST               (1<<23)
38#define BCM_CP0_SR_BEV               (1<<22)
39#define BCM_CP0_SR_SWC               (1<<17)
40#define BCM_CP0_SR_ISC               (1<<16)
41#define BCM_CP0_SR_KRNL              (1<<1)
42#define BCM_CP0_SR_IE                (1<<0)
43#define BCM_CP0_SR_IM5               (1<<15)
44#define BCM_CP0_SR_IM4               (1<<14)
45#define BCM_CP0_SR_IM3               (1<<13)
46#define BCM_CP0_SR_IM2               (1<<12)
47#define BCM_CP0_SR_IM1               (1<<11)
48#define BCM_CP0_SR_IM0               (1<<10)
49#define BCM_CP0_SR_SWM1              (1<<9)
50#define BCM_CP0_SR_SWM0              (1<<8)
51
52/*
53#************************************************************************
54#* Coprocessor 0 Cause Register Bits
55#************************************************************************
56# Notes: 5:2 hold exception cause
57# Notes: 29:28 hold Co-processor Number reference by Coproc unusable excptn
58# Notes: 7:6, 1:0, 27:15, 30 ***UNUSED***
59*/
60#define BCM_CP0_CR_BD                        (1<<31)
61#define BCM_CP0_CR_EXTIRQ4                   (1<<14)
62#define BCM_CP0_CR_EXTIRQ3                   (1<<13)
63#define BCM_CP0_CR_EXTIRQ2                   (1<<12)
64#define BCM_CP0_CR_EXTIRQ1                   (1<<11)
65#define BCM_CP0_CR_EXTIRQ0                   (1<<10)
66#define BCM_CP0_CR_SW1                       (1<<9)
67#define BCM_CP0_CR_SW0                       (1<<8)
68#define BCM_CP0_CR_EXC_CAUSE_MASK            (0xf << 2)
69#define BCM_CP0_CR_EXC_COP_MASK              (0x3 << 28)
70
71/*
72#************************************************************************
73#* Coprocessor 0 EPC Register Bits
74#************************************************************************
75# Contains PC or PC-4 for resuming program after exception (32-bit register)
76*/
77
78/*
79#************************************************************************
80#* Coprocessor 0 PrID Register Bits
81#************************************************************************
82# Notes: Company Options=0
83#        Company ID=0
84#        Processor ID = 0xa
85#        Revision = 0xa
86*/
87
88/*
89#************************************************************************
90#* Coprocessor 0 Debug Register Bits
91#************************************************************************
92# Notes: Bits [29:13],[11], [9], [6] read as zero
93*/
94#define BCM_CP0_DBG_BRDLY           (0x1 << 31)
95#define BCM_CP0_DBG_DBGMD           (0x1 << 30)
96#define BCM_CP0_DBG_EXSTAT          (0x1 << 12)
97#define BCM_CP0_DBG_BUS_ERR         (0x1 << 10)
98#define BCM_CP0_DBG_1STEP           (0x1 << 8)
99#define BCM_CP0_DBG_JTGRST          (0x1 << 7)
100#define BCM_CP0_DBG_PBUSBRK         (0x1 << 5)
101#define BCM_CP0_DBG_IADBRK          (0x1 << 4)
102#define BCM_CP0_DBG_DABRKST         (0x1 << 3)
103#define BCM_CP0_DBG_DABRKLD         (0x1 << 2)
104#define BCM_CP0_DBG_SDBBPEX         (0x1 << 1)
105#define BCM_CP0_DBG_SSEX            (0x1 << 0)
106
107/*
108#************************************************************************
109#* Coprocessor 0 DBEXCPC Register Bits
110#************************************************************************
111# Debug Exception Program Counter (32-bits)
112*/
113
114/*
115#************************************************************************
116#* Coprocessor 0 PROCCFG Register Bits
117#************************************************************************
118# Select 0
119*/
120#define BCM_CP0_CFG1EN              (0x1 << 31)
121#define BCM_CP0_BE                  (0x1 << 15)
122#define BCM_CP0_MIPS32MSK           (0x3 << 13) /* 0 = MIPS32 Arch */
123#define BCM_CP0_ARMSK               (0x7 << 10) /* Architecture Rev 0 */
124#define BCM_CP0_MMUMSK              (0x7 << 7)  /* 0 no MMU */
125#define BCM_CP0_K0Coherency         (0x7 << 0)  /* 0 no Coherency */
126#define BCM_CP0_K0Uncached          (0x2 << 0)  /* 2 = Uncached */
127#define BCM_CP0_K0WriteThrough      (0x1 << 0)  /* 0 = Cached, Dcache write thru */
128#define BCM_CP0_K0Writeback         (0x3)       /* 0 = Cached, Dcache write back */
129
130/*
131# Select 1
132#  Bit  31:   unused
133#  Bits 30:25 MMU Size (Num TLB entries-1)
134#  Bits 24:22 ICache sets/way (2^n * 64)
135#  Bits 21:19 ICache Line size (2^(n+1) bytes) 0=No Icache
136#  Bits 18:16 ICache Associativity (n+1) way                   
137#  Bits 15:13 DCache sets/way (2^n * 64)
138#  Bits 12:10 DCache Line size (2^(n+1) bytes) 0=No Dcache
139#  Bits 9:7   DCache Associativity (n+1) way                   
140#  Bits 6:4   unused
141#  Bit  3:    1=At least 1 watch register
142#  Bit  2:    1=MIPS16 code compression implemented
143#  Bit  1:    1=EJTAG implemented                   
144#  Bit  0:    1=FPU implemented                   
145*/
146#define BCM_CP0_CFG_ISMSK      (0x7 << 22)
147#define BCM_CP0_CFG_ISSHF      22
148#define BCM_CP0_CFG_ILMSK      (0x7 << 19)
149#define BCM_CP0_CFG_ILSHF      19
150#define BCM_CP0_CFG_IAMSK      (0x7 << 16)
151#define BCM_CP0_CFG_IASHF      16
152#define BCM_CP0_CFG_DSMSK      (0x7 << 13)
153#define BCM_CP0_CFG_DSSHF      13
154#define BCM_CP0_CFG_DLMSK      (0x7 << 10)
155#define BCM_CP0_CFG_DLSHF      10
156#define BCM_CP0_CFG_DAMSK      (0x7 << 7)
157#define BCM_CP0_CFG_DASHF      7
158
159/*
160#************************************************************************
161#* Coprocessor 0 Config Register Bits
162#************************************************************************
163*/
164#define BCM_CP0_CFG_ICSHEN         (0x1 << 31)
165#define BCM_CP0_CFG_DCSHEN         (0x1 << 30)
166
167
168/*
169#************************************************************************
170#* KSEG Mapping Definitions and Macro's
171#************************************************************************
172*/
173#define BCM_K0BASE          0x80000000
174#define BCM_K0SIZE          0x20000000
175#define BCM_K1BASE          0xa0000000
176#define BCM_K1SIZE          0x20000000
177#define BCM_K2BASE          0xc0000000
178
179#define BCM_PHYS_TO_K0(x)   ((x) | 0x80000000)
180#define BCM_PHYS_TO_K1(x)   ((x) | 0xa0000000)
181#define BCM_K0_TO_PHYS(x)   ((x) & 0x1fffffff)
182#define BCM_K1_TO_PHYS(x)   (BCM_K0_TO_PHYS(x))
183#define BCM_K0_TO_K1(x)     ((x) | 0x20000000)
184#define BCM_K1_TO_K0(x)     ((x) & 0xdfffffff)
185
186#endif
Note: See TracBrowser for help on using the repository browser.