3 Copyright 2006 Broadcom Corp. All Rights Reserved.
5 This program is free software; you can distribute it and/or modify it
6 under the terms of the GNU General Public License (Version 2) as
7 published by the Free Software Foundation.
9 This program is distributed in the hope it will be useful, but WITHOUT
10 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 You should have received a copy of the GNU General Public License along
15 with this program; if not, write to the Free Software Foundation, Inc.,
16 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
20 #ifndef __BCM6338_CPU_H
21 #define __BCM6338_CPU_H
28 #************************************************************************
29 #* Coprocessor 0 Register Names
30 #************************************************************************
32 #define C0_BCM_CONFIG $22
37 # Bits 30:25 MMU Size (Num TLB entries-1)
38 # Bits 24:22 ICache sets/way (2^n * 64)
39 # Bits 21:19 ICache Line size (2^(n+1) bytes) 0=No Icache
40 # Bits 18:16 ICache Associativity (n+1) way
41 # Bits 15:13 DCache sets/way (2^n * 64)
42 # Bits 12:10 DCache Line size (2^(n+1) bytes) 0=No Dcache
43 # Bits 9:7 DCache Associativity (n+1) way
45 # Bit 3: 1=At least 1 watch register
46 # Bit 2: 1=MIPS16 code compression implemented
47 # Bit 1: 1=EJTAG implemented
48 # Bit 0: 1=FPU implemented
50 #define CP0_CFG_ISMSK (0x7 << 22)
51 #define CP0_CFG_ISSHF 22
52 #define CP0_CFG_ILMSK (0x7 << 19)
53 #define CP0_CFG_ILSHF 19
54 #define CP0_CFG_IAMSK (0x7 << 16)
55 #define CP0_CFG_IASHF 16
56 #define CP0_CFG_DSMSK (0x7 << 13)
57 #define CP0_CFG_DSSHF 13
58 #define CP0_CFG_DLMSK (0x7 << 10)
59 #define CP0_CFG_DLSHF 10
60 #define CP0_CFG_DAMSK (0x7 << 7)
61 #define CP0_CFG_DASHF 7
64 #************************************************************************
65 #* Coprocessor 0 Broadcom Config Register Bits
66 #************************************************************************
68 #define CP0_CFG_ICSHEN (0x1 << 31)
69 #define CP0_CFG_DCSHEN (0x1 << 30)
70 #define CP0_CFG_OWBE (0x1 << 19)
73 #************************************************************************
75 #************************************************************************
78 #define MIPS_BASE 0xff400000
80 #define RAC_PWR (1 << 31)
81 #define RAC_BRR_PF (1 << 30)
82 #define RAC_FLH (1 << 8)
83 #define RAC_DPF (1 << 6)
84 #define RAC_NCH (1 << 5)
85 #define RAC_C_INV (1 << 4)
86 #define RAC_PF_D (1 << 3)
87 #define RAC_PF_I (1 << 2)
88 #define RAC_D (1 << 1)
89 #define RAC_I (1 << 0)
92 #define RAC_UPB_SHFT 16
93 #define RAC_LWB_SHFT 0