blob: 32e1297d017b47c562f83d28ce2b2ee25ba77ea2 [file] [log] [blame]
Dave Mitchell3c3734172008-11-20 14:00:49 -06001
2/*
3 * See file CREDITS for list of people who contributed to this
4 * project.
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License as
8 * published by the Free Software Foundation; either version 2 of
9 * the License, or (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
19 * MA 02111-1307 USA
20 */
21
22#ifndef _PPC4xx_ISRAM_H_
23#define _PPC4xx_ISRAM_H_
24
25/*
26 * Internal SRAM
27 */
Tirumala Marri95ac4282010-09-28 14:15:14 -070028#if defined(CONFIG_440EPX) || defined(CONFIG_440GRX) || \
29 defined(CONFIG_APM821XX)
Dave Mitchell3c3734172008-11-20 14:00:49 -060030#define ISRAM0_DCR_BASE 0x380
31#else
32#define ISRAM0_DCR_BASE 0x020
33#endif
34#define ISRAM0_SB0CR (ISRAM0_DCR_BASE+0x00) /* SRAM bank config 0*/
35#define ISRAM0_SB1CR (ISRAM0_DCR_BASE+0x01) /* SRAM bank config 1*/
36#define ISRAM0_SB2CR (ISRAM0_DCR_BASE+0x02) /* SRAM bank config 2*/
37#define ISRAM0_SB3CR (ISRAM0_DCR_BASE+0x03) /* SRAM bank config 3*/
38#define ISRAM0_BEAR (ISRAM0_DCR_BASE+0x04) /* SRAM bus error addr reg */
39#define ISRAM0_BESR0 (ISRAM0_DCR_BASE+0x05) /* SRAM bus error status reg 0 */
40#define ISRAM0_BESR1 (ISRAM0_DCR_BASE+0x06) /* SRAM bus error status reg 1 */
41#define ISRAM0_PMEG (ISRAM0_DCR_BASE+0x07) /* SRAM power management */
42#define ISRAM0_CID (ISRAM0_DCR_BASE+0x08) /* SRAM bus core id reg */
43#define ISRAM0_REVID (ISRAM0_DCR_BASE+0x09) /* SRAM bus revision id reg */
44#define ISRAM0_DPC (ISRAM0_DCR_BASE+0x0a) /* SRAM data parity check reg */
45
Tirumala Marri95ac4282010-09-28 14:15:14 -070046#if defined(CONFIG_460EX) || defined(CONFIG_460GT) || \
47 defined(CONFIG_APM821XX)
Dave Mitchell3c3734172008-11-20 14:00:49 -060048#define ISRAM1_DCR_BASE 0x0B0
49#define ISRAM1_SB0CR (ISRAM1_DCR_BASE+0x00) /* SRAM1 bank config 0*/
50#define ISRAM1_BEAR (ISRAM1_DCR_BASE+0x04) /* SRAM1 bus error addr reg */
51#define ISRAM1_BESR0 (ISRAM1_DCR_BASE+0x05) /* SRAM1 bus error status reg 0 */
52#define ISRAM1_BESR1 (ISRAM1_DCR_BASE+0x06) /* SRAM1 bus error status reg 1 */
53#define ISRAM1_PMEG (ISRAM1_DCR_BASE+0x07) /* SRAM1 power management */
54#define ISRAM1_CID (ISRAM1_DCR_BASE+0x08) /* SRAM1 bus core id reg */
55#define ISRAM1_REVID (ISRAM1_DCR_BASE+0x09) /* SRAM1 bus revision id reg */
56#define ISRAM1_DPC (ISRAM1_DCR_BASE+0x0a) /* SRAM1 data parity check reg */
57#endif /* CONFIG_460EX || CONFIG_460GT */
58
Tirumala Marri95ac4282010-09-28 14:15:14 -070059#if defined(CONFIG_460EX) || defined(CONFIG_460GT)
60#define ISRAM1_SIZE 0x0984 /* OCM size 64k */
61#elif defined(CONFIG_APM821XX)
62#define ISRAM1_SIZE 0x0784 /* OCM size 32k */
63#endif
64
Dave Mitchell3c3734172008-11-20 14:00:49 -060065/*
66 * L2 Cache
67 */
68#if defined (CONFIG_440GX) || \
69 defined(CONFIG_440SP) || defined(CONFIG_440SPE) || \
70 defined(CONFIG_460EX) || defined(CONFIG_460GT) || \
Tirumala Marri95ac4282010-09-28 14:15:14 -070071 defined(CONFIG_460SX) || defined(CONFIG_APM821XX)
Dave Mitchell3c3734172008-11-20 14:00:49 -060072#define L2_CACHE_BASE 0x030
73#define L2_CACHE_CFG (L2_CACHE_BASE+0x00) /* L2 Cache Config */
74#define L2_CACHE_CMD (L2_CACHE_BASE+0x01) /* L2 Cache Command */
75#define L2_CACHE_ADDR (L2_CACHE_BASE+0x02) /* L2 Cache Address */
76#define L2_CACHE_DATA (L2_CACHE_BASE+0x03) /* L2 Cache Data */
77#define L2_CACHE_STAT (L2_CACHE_BASE+0x04) /* L2 Cache Status */
78#define L2_CACHE_CVER (L2_CACHE_BASE+0x05) /* L2 Cache Revision ID */
79#define L2_CACHE_SNP0 (L2_CACHE_BASE+0x06) /* L2 Cache Snoop reg 0 */
80#define L2_CACHE_SNP1 (L2_CACHE_BASE+0x07) /* L2 Cache Snoop reg 1 */
81#endif /* CONFIG_440GX */
82
83#endif /* _PPC4xx_ISRAM_H_ */