Blame view
board/socrates/tlb.c
3.32 KB
83d290c56 SPDX: Convert all... |
1 |
// SPDX-License-Identifier: GPL-2.0+ |
5d108ac8f Initial support f... |
2 3 4 5 6 7 8 9 |
/* * (C) Copyright 2008 * Sergei Poselenov, Emcraft Systems, sposelenov@emcraft.com. * * Copyright 2008 Freescale Semiconductor, Inc. * * (C) Copyright 2000 * Wolfgang Denk, DENX Software Engineering, wd@denx.de. |
5d108ac8f Initial support f... |
10 11 12 13 14 15 16 |
*/ #include <common.h> #include <asm/mmu.h> struct fsl_e_tlb_entry tlb_table[] = { /* TLB 0 - for temp stack in cache */ |
6d0f6bcf3 rename CFG_ macro... |
17 |
SET_TLB_ENTRY(0, CONFIG_SYS_INIT_RAM_ADDR, CONFIG_SYS_INIT_RAM_ADDR, |
5d108ac8f Initial support f... |
18 19 |
MAS3_SX|MAS3_SW|MAS3_SR, 0, 0, 0, BOOKE_PAGESZ_4K, 0), |
6d0f6bcf3 rename CFG_ macro... |
20 |
SET_TLB_ENTRY(0, CONFIG_SYS_INIT_RAM_ADDR + 4 * 1024 , CONFIG_SYS_INIT_RAM_ADDR + 4 * 1024, |
5d108ac8f Initial support f... |
21 22 |
MAS3_SX|MAS3_SW|MAS3_SR, 0, 0, 0, BOOKE_PAGESZ_4K, 0), |
6d0f6bcf3 rename CFG_ macro... |
23 |
SET_TLB_ENTRY(0, CONFIG_SYS_INIT_RAM_ADDR + 8 * 1024 , CONFIG_SYS_INIT_RAM_ADDR + 8 * 1024, |
5d108ac8f Initial support f... |
24 25 |
MAS3_SX|MAS3_SW|MAS3_SR, 0, 0, 0, BOOKE_PAGESZ_4K, 0), |
6d0f6bcf3 rename CFG_ macro... |
26 |
SET_TLB_ENTRY(0, CONFIG_SYS_INIT_RAM_ADDR + 12 * 1024 , CONFIG_SYS_INIT_RAM_ADDR + 12 * 1024, |
5d108ac8f Initial support f... |
27 28 29 30 31 |
MAS3_SX|MAS3_SW|MAS3_SR, 0, 0, 0, BOOKE_PAGESZ_4K, 0), /* |
e64987a89 85xx: socrates: E... |
32 |
* TLB 1: 64M Non-cacheable, guarded |
59abd15b4 Socrates: Added F... |
33 |
* 0xfc000000 64M FLASH |
5d108ac8f Initial support f... |
34 35 |
* Out of reset this entry is only 4K. */ |
6d0f6bcf3 rename CFG_ macro... |
36 |
SET_TLB_ENTRY(1, CONFIG_SYS_FLASH_BASE, CONFIG_SYS_FLASH_BASE, |
5d108ac8f Initial support f... |
37 38 |
MAS3_SX|MAS3_SW|MAS3_SR, MAS2_I|MAS2_G, 0, 1, BOOKE_PAGESZ_64M, 1), |
5d108ac8f Initial support f... |
39 40 41 42 43 |
/* * TLB 2: 256M Non-cacheable, guarded * 0x80000000 256M PCI1 MEM First half */ |
6d0f6bcf3 rename CFG_ macro... |
44 |
SET_TLB_ENTRY(1, CONFIG_SYS_PCI1_MEM_PHYS, CONFIG_SYS_PCI1_MEM_PHYS, |
5d108ac8f Initial support f... |
45 46 47 48 49 50 51 |
MAS3_SX|MAS3_SW|MAS3_SR, MAS2_I|MAS2_G, 0, 2, BOOKE_PAGESZ_256M, 1), /* * TLB 3: 256M Non-cacheable, guarded * 0x90000000 256M PCI1 MEM Second half */ |
6d0f6bcf3 rename CFG_ macro... |
52 |
SET_TLB_ENTRY(1, CONFIG_SYS_PCI1_MEM_PHYS + 0x10000000, CONFIG_SYS_PCI1_MEM_PHYS + 0x10000000, |
5d108ac8f Initial support f... |
53 54 |
MAS3_SX|MAS3_SW|MAS3_SR, MAS2_I|MAS2_G, 0, 3, BOOKE_PAGESZ_256M, 1), |
6d0f6bcf3 rename CFG_ macro... |
55 |
#if defined(CONFIG_SYS_FPGA_BASE) |
5d108ac8f Initial support f... |
56 |
/* |
59abd15b4 Socrates: Added F... |
57 58 |
* TLB 4: 1M Non-cacheable, guarded * 0xc0000000 1M FPGA and NAND |
5d108ac8f Initial support f... |
59 |
*/ |
6d0f6bcf3 rename CFG_ macro... |
60 |
SET_TLB_ENTRY(1, CONFIG_SYS_FPGA_BASE, CONFIG_SYS_FPGA_BASE, |
5d108ac8f Initial support f... |
61 |
MAS3_SX|MAS3_SW|MAS3_SR, MAS2_I|MAS2_G, |
59abd15b4 Socrates: Added F... |
62 63 |
0, 4, BOOKE_PAGESZ_1M, 1), #endif |
5d108ac8f Initial support f... |
64 65 |
/* |
e64987a89 85xx: socrates: E... |
66 67 68 69 70 71 |
* TLB 5: 64M Non-cacheable, guarded * 0xc8000000 16M LIME GDC framebuffer * 0xc9fc0000 256K LIME GDC MMIO * (0xcbfc0000 256K LIME GDC MMIO) * MMIO is relocatable and could be at 0xcbfc0000 */ |
6d0f6bcf3 rename CFG_ macro... |
72 |
SET_TLB_ENTRY(1, CONFIG_SYS_LIME_BASE, CONFIG_SYS_LIME_BASE, |
e64987a89 85xx: socrates: E... |
73 74 75 76 |
MAS3_SX|MAS3_SW|MAS3_SR, MAS2_I|MAS2_G, 0, 5, BOOKE_PAGESZ_64M, 1), /* |
5d108ac8f Initial support f... |
77 78 79 80 |
* TLB 6: 64M Non-cacheable, guarded * 0xe000_0000 1M CCSRBAR * 0xe200_0000 16M PCI1 IO */ |
6d0f6bcf3 rename CFG_ macro... |
81 |
SET_TLB_ENTRY(1, CONFIG_SYS_CCSRBAR, CONFIG_SYS_CCSRBAR_PHYS, |
5d108ac8f Initial support f... |
82 83 |
MAS3_SX|MAS3_SW|MAS3_SR, MAS2_I|MAS2_G, 0, 6, BOOKE_PAGESZ_64M, 1), |
dd332e18d 85xx: socrates: f... |
84 |
#if !defined(CONFIG_SPD_EEPROM) |
5d108ac8f Initial support f... |
85 86 87 88 89 90 91 |
/* * TLB 7+8: 512M DDR, cache disabled (needed for memory test) * 0x00000000 512M DDR System memory * Without SPD EEPROM configured DDR, this must be setup manually. * Make sure the TLB count at the top of this table is correct. * Likely it needs to be increased by two for these entries. */ |
6d0f6bcf3 rename CFG_ macro... |
92 |
SET_TLB_ENTRY(1, CONFIG_SYS_DDR_SDRAM_BASE, CONFIG_SYS_DDR_SDRAM_BASE, |
5d108ac8f Initial support f... |
93 94 |
MAS3_SX|MAS3_SW|MAS3_SR, MAS2_I|MAS2_G, 0, 7, BOOKE_PAGESZ_256M, 1), |
6d0f6bcf3 rename CFG_ macro... |
95 |
SET_TLB_ENTRY(1, CONFIG_SYS_DDR_SDRAM_BASE + 0x10000000, CONFIG_SYS_DDR_SDRAM_BASE + 0x10000000, |
5d108ac8f Initial support f... |
96 97 |
MAS3_SX|MAS3_SW|MAS3_SR, MAS2_I|MAS2_G, 0, 8, BOOKE_PAGESZ_256M, 1), |
dd332e18d 85xx: socrates: f... |
98 |
#endif |
5d108ac8f Initial support f... |
99 100 101 |
}; int num_tlb_entries = ARRAY_SIZE(tlb_table); |