1129ba616SKumar Gala /* 2129ba616SKumar Gala * Copyright 2008 Freescale Semiconductor, Inc. 3129ba616SKumar Gala * 4129ba616SKumar Gala * (C) Copyright 2000 5129ba616SKumar Gala * Wolfgang Denk, DENX Software Engineering, wd@denx.de. 6129ba616SKumar Gala * 7129ba616SKumar Gala * See file CREDITS for list of people who contributed to this 8129ba616SKumar Gala * project. 9129ba616SKumar Gala * 10129ba616SKumar Gala * This program is free software; you can redistribute it and/or 11129ba616SKumar Gala * modify it under the terms of the GNU General Public License as 12129ba616SKumar Gala * published by the Free Software Foundation; either version 2 of 13129ba616SKumar Gala * the License, or (at your option) any later version. 14129ba616SKumar Gala * 15129ba616SKumar Gala * This program is distributed in the hope that it will be useful, 16129ba616SKumar Gala * but WITHOUT ANY WARRANTY; without even the implied warranty of 17129ba616SKumar Gala * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18129ba616SKumar Gala * GNU General Public License for more details. 19129ba616SKumar Gala * 20129ba616SKumar Gala * You should have received a copy of the GNU General Public License 21129ba616SKumar Gala * along with this program; if not, write to the Free Software 22129ba616SKumar Gala * Foundation, Inc., 59 Temple Place, Suite 330, Boston, 23129ba616SKumar Gala * MA 02111-1307 USA 24129ba616SKumar Gala */ 25129ba616SKumar Gala 26129ba616SKumar Gala #include <common.h> 27129ba616SKumar Gala #include <asm/mmu.h> 28129ba616SKumar Gala 29129ba616SKumar Gala struct fsl_e_tlb_entry tlb_table[] = { 30129ba616SKumar Gala /* TLB 0 - for temp stack in cache */ 316d0f6bcfSJean-Christophe PLAGNIOL-VILLARD SET_TLB_ENTRY(0, CONFIG_SYS_INIT_RAM_ADDR, CONFIG_SYS_INIT_RAM_ADDR, 32129ba616SKumar Gala MAS3_SX|MAS3_SW|MAS3_SR, 0, 33129ba616SKumar Gala 0, 0, BOOKE_PAGESZ_4K, 0), 346d0f6bcfSJean-Christophe PLAGNIOL-VILLARD SET_TLB_ENTRY(0, CONFIG_SYS_INIT_RAM_ADDR + 4 * 1024 , CONFIG_SYS_INIT_RAM_ADDR + 4 * 1024, 35129ba616SKumar Gala MAS3_SX|MAS3_SW|MAS3_SR, 0, 36129ba616SKumar Gala 0, 0, BOOKE_PAGESZ_4K, 0), 376d0f6bcfSJean-Christophe PLAGNIOL-VILLARD SET_TLB_ENTRY(0, CONFIG_SYS_INIT_RAM_ADDR + 8 * 1024 , CONFIG_SYS_INIT_RAM_ADDR + 8 * 1024, 38129ba616SKumar Gala MAS3_SX|MAS3_SW|MAS3_SR, 0, 39129ba616SKumar Gala 0, 0, BOOKE_PAGESZ_4K, 0), 406d0f6bcfSJean-Christophe PLAGNIOL-VILLARD SET_TLB_ENTRY(0, CONFIG_SYS_INIT_RAM_ADDR + 12 * 1024 , CONFIG_SYS_INIT_RAM_ADDR + 12 * 1024, 41129ba616SKumar Gala MAS3_SX|MAS3_SW|MAS3_SR, 0, 42129ba616SKumar Gala 0, 0, BOOKE_PAGESZ_4K, 0), 43129ba616SKumar Gala 44129ba616SKumar Gala /* TLB 1 */ 45129ba616SKumar Gala /* *I*** - Covers boot page */ 46129ba616SKumar Gala SET_TLB_ENTRY(1, 0xfffff000, 0xfffff000, 47129ba616SKumar Gala MAS3_SX|MAS3_SW|MAS3_SR, MAS2_I, 48129ba616SKumar Gala 0, 0, BOOKE_PAGESZ_4K, 1), 49129ba616SKumar Gala 50129ba616SKumar Gala /* *I*G* - CCSRBAR */ 516d0f6bcfSJean-Christophe PLAGNIOL-VILLARD SET_TLB_ENTRY(1, CONFIG_SYS_CCSRBAR, CONFIG_SYS_CCSRBAR_PHYS, 52129ba616SKumar Gala MAS3_SX|MAS3_SW|MAS3_SR, MAS2_I|MAS2_G, 53129ba616SKumar Gala 0, 1, BOOKE_PAGESZ_1M, 1), 54129ba616SKumar Gala 55129ba616SKumar Gala /* W**G* - Flash/promjet, localbus */ 56129ba616SKumar Gala /* This will be changed to *I*G* after relocation to RAM. */ 576d0f6bcfSJean-Christophe PLAGNIOL-VILLARD SET_TLB_ENTRY(1, CONFIG_SYS_FLASH_BASE, CONFIG_SYS_FLASH_BASE, 587c0d4a75SKumar Gala MAS3_SX|MAS3_SR, MAS2_W|MAS2_G, 59129ba616SKumar Gala 0, 2, BOOKE_PAGESZ_256M, 1), 60129ba616SKumar Gala 61129ba616SKumar Gala /* *I*G* - PCI */ 626d0f6bcfSJean-Christophe PLAGNIOL-VILLARD SET_TLB_ENTRY(1, CONFIG_SYS_PCIE3_MEM_PHYS, CONFIG_SYS_PCIE3_MEM_PHYS, 63129ba616SKumar Gala MAS3_SX|MAS3_SW|MAS3_SR, MAS2_I|MAS2_G, 64129ba616SKumar Gala 0, 3, BOOKE_PAGESZ_1G, 1), 65129ba616SKumar Gala 66129ba616SKumar Gala /* *I*G* - PCI */ 676d0f6bcfSJean-Christophe PLAGNIOL-VILLARD SET_TLB_ENTRY(1, CONFIG_SYS_PCIE3_MEM_PHYS + 0x40000000, CONFIG_SYS_PCIE3_MEM_PHYS + 0x40000000, 68129ba616SKumar Gala MAS3_SX|MAS3_SW|MAS3_SR, MAS2_I|MAS2_G, 69129ba616SKumar Gala 0, 4, BOOKE_PAGESZ_256M, 1), 70129ba616SKumar Gala 716d0f6bcfSJean-Christophe PLAGNIOL-VILLARD SET_TLB_ENTRY(1, CONFIG_SYS_PCIE3_MEM_PHYS + 0x50000000, CONFIG_SYS_PCIE3_MEM_PHYS + 0x50000000, 72129ba616SKumar Gala MAS3_SX|MAS3_SW|MAS3_SR, MAS2_I|MAS2_G, 73129ba616SKumar Gala 0, 5, BOOKE_PAGESZ_256M, 1), 74129ba616SKumar Gala 75129ba616SKumar Gala /* *I*G* - PCI I/O */ 766d0f6bcfSJean-Christophe PLAGNIOL-VILLARD SET_TLB_ENTRY(1, CONFIG_SYS_PCIE3_IO_PHYS, CONFIG_SYS_PCIE3_IO_PHYS, 77129ba616SKumar Gala MAS3_SX|MAS3_SW|MAS3_SR, MAS2_I|MAS2_G, 78129ba616SKumar Gala 0, 6, BOOKE_PAGESZ_256K, 1), 79c013b749SHaiying Wang 80c013b749SHaiying Wang /* *I*G - NAND */ 81c013b749SHaiying Wang SET_TLB_ENTRY(1, CONFIG_SYS_NAND_BASE, CONFIG_SYS_NAND_BASE_PHYS, 82c013b749SHaiying Wang MAS3_SX|MAS3_SW|MAS3_SR, MAS2_I|MAS2_G, 83c013b749SHaiying Wang 0, 7, BOOKE_PAGESZ_1M, 1), 84c013b749SHaiying Wang 85*b5f65dfaSHaiying Wang SET_TLB_ENTRY(1, PIXIS_BASE, PIXIS_BASE, 86*b5f65dfaSHaiying Wang MAS3_SX|MAS3_SW|MAS3_SR, MAS2_I|MAS2_G, 87*b5f65dfaSHaiying Wang 0, 8, BOOKE_PAGESZ_4K, 1), 88129ba616SKumar Gala }; 89129ba616SKumar Gala 90129ba616SKumar Gala int num_tlb_entries = ARRAY_SIZE(tlb_table); 91