2 * Copyright (C) 2003 Embedded Edge, LLC
3 * Dan Malek <dan@embeddededge.com>
5 * Updates for Silicon Tx GP3 8560. We only support 32-bit flash
6 * and DDR with SPD EEPROM configuration.
8 * Copyright (C) 2002,2003, Motorola Inc.
9 * Xianghua Xiao <X.Xiao@motorola.com>
11 * See file CREDITS for list of people who contributed to this
14 * This program is free software; you can redistribute it and/or
15 * modify it under the terms of the GNU General Public License as
16 * published by the Free Software Foundation; either version 2 of
17 * the License, or (at your option) any later version.
19 * This program is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU General Public License for more details.
24 * You should have received a copy of the GNU General Public License
25 * along with this program; if not, write to the Free Software
26 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
30 #include <ppc_asm.tmpl>
32 #include <asm/cache.h>
46 /* TLB1 entries configuration: */
48 .section .bootpg, "ax"
53 /* If RAMBOOT, we are testing and the BDI has set up
54 * much of the MMU already.
56 * TLB 15 is default CCSRBAR.
58 .long 0x09 /* the following data table uses a few of 16 TLB entries */
60 .long TLB1_MAS0(1,1,0)
61 .long TLB1_MAS1(1,1,0,0,BOOKE_PAGESZ_1M)
62 .long TLB1_MAS2(((CFG_CCSRBAR>>12) & 0xfffff),0,0,0,0,1,0,1,0)
63 .long TLB1_MAS3(((CFG_CCSRBAR>>12) & 0xfffff),0,0,0,0,0,1,0,1,0,1)
65 .long TLB1_MAS0(1,2,0)
66 .long TLB1_MAS1(1,1,0,0,BOOKE_PAGESZ_16M)
67 .long TLB1_MAS2(((CFG_FLASH_BASE>>12) & 0xfffff),0,0,0,0,1,0,1,0)
68 .long TLB1_MAS3(((CFG_FLASH_BASE>>12) & 0xfffff),0,0,0,0,0,1,0,1,0,1)
70 .long TLB1_MAS0(1,3,0)
71 .long TLB1_MAS1(1,1,0,0,BOOKE_PAGESZ_1M)
72 .long TLB1_MAS2(((CFG_LBC_LCLDEVS_BASE>>12) & 0xfffff),0,0,0,0,1,0,1,0)
73 .long TLB1_MAS3(((CFG_LBC_LCLDEVS_BASE>>12) & 0xfffff),0,0,0,0,0,1,0,1,0,1)
74 .long TLB1_MAS0(1,4,0)
75 .long TLB1_MAS1(0,0,0,0,BOOKE_PAGESZ_1M)
76 .long TLB1_MAS2(0,0,0,0,0,0,0,0,0)
77 .long TLB1_MAS3(0,0,0,0,0,0,1,0,1,0,1)
79 .long TLB1_MAS0(1,5,0)
80 .long TLB1_MAS1(0,0,0,0,BOOKE_PAGESZ_1M)
81 .long TLB1_MAS2(0,0,0,0,0,0,0,0,0)
82 .long TLB1_MAS3(0,0,0,0,0,0,1,0,1,0,1)
84 .long TLB1_MAS0(1,6,0)
85 .long TLB1_MAS1(1,1,0,0,BOOKE_PAGESZ_64M)
86 #if defined(CONFIG_RAM_AS_FLASH)
87 .long TLB1_MAS2(((CFG_LBC_SDRAM_BASE>>12) & 0xfffff),0,0,0,0,1,0,1,0)
89 .long TLB1_MAS2(((CFG_LBC_SDRAM_BASE>>12) & 0xfffff),0,0,0,0,0,0,0,0)
91 .long TLB1_MAS3(((CFG_LBC_SDRAM_BASE>>12) & 0xfffff),0,0,0,0,0,1,0,1,0,1)
93 .long TLB1_MAS0(1,7,0)
94 .long TLB1_MAS1(1,1,0,0,BOOKE_PAGESZ_16K)
95 #ifdef CONFIG_L2_INIT_RAM
96 .long TLB1_MAS2(((CFG_INIT_RAM_ADDR>>12) & 0xfffff),0,0,0,1,0,0,0,0)
98 .long TLB1_MAS2(((CFG_INIT_RAM_ADDR>>12) & 0xfffff),0,0,0,0,0,0,0,0)
100 .long TLB1_MAS3(((CFG_INIT_RAM_ADDR>>12) & 0xfffff),0,0,0,0,0,1,0,1,0,1)
102 .long TLB1_MAS0(1,8,0)
103 .long TLB1_MAS1(1,1,0,0,BOOKE_PAGESZ_256M)
104 .long TLB1_MAS2(((CFG_PCI_MEM_BASE>>12) & 0xfffff),0,0,0,0,1,0,1,0)
105 .long TLB1_MAS3(((CFG_PCI_MEM_BASE>>12) & 0xfffff),0,0,0,0,0,1,0,1,0,1)
107 #if (CFG_CCSRBAR_DEFAULT != CFG_CCSRBAR)
108 .long TLB1_MAS0(1,15,0)
109 .long TLB1_MAS1(1,1,0,0,BOOKE_PAGESZ_1M)
110 .long TLB1_MAS2(((CFG_CCSRBAR_DEFAULT>>12) & 0xfffff),0,0,0,0,1,0,1,0)
111 .long TLB1_MAS3(((CFG_CCSRBAR_DEFAULT>>12) & 0xfffff),0,0,0,0,0,1,0,1,0,1)
113 .long TLB1_MAS0(1,15,0)
114 .long TLB1_MAS1(0,0,0,0,BOOKE_PAGESZ_1M)
115 .long TLB1_MAS2(0,0,0,0,0,0,0,0,0)
116 .long TLB1_MAS3(0,0,0,0,0,0,1,0,1,0,1)
120 /* LAW(Local Access Window) configuration:
121 * 0000_0000-8000_0000: Up to 2G DDR
122 * f000_0000-f3ff_ffff: PCI(256M)
123 * f400_0000-f7ff_ffff: RapidIO(128M)
124 * f800_0000-ffff_ffff: localbus(128M)
125 * f800_0000-fbff_ffff: LBC SDRAM(64M)
126 * fc00_0000-fcff_ffff: LBC BCSR (1M, Chip select 1)
127 * fdf0_0000-fdff_ffff: CCSRBAR(1M)
128 * ff00_0000-ffff_ffff: Flash(16M)
129 * We don't need a local window for CCSRBAR and flash because they
130 * reside in their default mapped spaces.
134 #define LAWAR0 ((LAWAR_TRGT_IF_DDR | (LAWAR_SIZE & LAWAR_SIZE_2G)) & ~LAWAR_EN)
136 #define LAWBAR1 ((CFG_PCI_MEM_BASE>>12) & 0xfffff)
137 #define LAWAR1 (LAWAR_EN | LAWAR_TRGT_IF_PCIX | (LAWAR_SIZE & LAWAR_SIZE_256M))
139 #if !defined(CONFIG_RAM_AS_FLASH)
140 #define LAWBAR2 ((CFG_LBC_SDRAM_BASE>>12) & 0xfffff)
141 #define LAWAR2 (LAWAR_EN | LAWAR_TRGT_IF_LBC | (LAWAR_SIZE & LAWAR_SIZE_128M))
144 #define LAWAR2 ((LAWAR_TRGT_IF_LBC | (LAWAR_SIZE & LAWAR_SIZE_128M)) & ~LAWAR_EN)
147 .section .bootpg, "ax"
152 .long LAWBAR0,LAWAR0,LAWBAR1,LAWAR1,LAWBAR2,LAWAR2