init.S 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. /*
  2. * Copyright (C) 2002,2003, Motorola Inc.
  3. * Xianghua Xiao <X.Xiao@motorola.com>
  4. *
  5. * (C) Copyright 2004 Wind River Systems Inc <www.windriver.com>.
  6. * Added support for Wind River SBC8560 board
  7. *
  8. * See file CREDITS for list of people who contributed to this
  9. * project.
  10. *
  11. * This program is free software; you can redistribute it and/or
  12. * modify it under the terms of the GNU General Public License as
  13. * published by the Free Software Foundation; either version 2 of
  14. * the License, or (at your option) any later version.
  15. *
  16. * This program is distributed in the hope that it will be useful,
  17. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  18. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  19. * GNU General Public License for more details.
  20. *
  21. * You should have received a copy of the GNU General Public License
  22. * along with this program; if not, write to the Free Software
  23. * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  24. * MA 02111-1307 USA
  25. */
  26. #include <ppc_asm.tmpl>
  27. #include <ppc_defs.h>
  28. #include <asm/cache.h>
  29. #include <asm/mmu.h>
  30. #include <config.h>
  31. #include <mpc85xx.h>
  32. #define entry_start \
  33. mflr r1 ; \
  34. bl 0f ;
  35. #define entry_end \
  36. 0: mflr r0 ; \
  37. mtlr r1 ; \
  38. blr ;
  39. /* TLB1 entries configuration: */
  40. .section .bootpg, "ax"
  41. .globl tlb1_entry
  42. tlb1_entry:
  43. entry_start
  44. .long 0x08 /* the following data table uses a few of 16 TLB entries */
  45. /* TLB for CCSRBAR (IMMR) */
  46. .long FSL_BOOKE_MAS0(1,1,0)
  47. .long FSL_BOOKE_MAS1(1,1,0,0,BOOKE_PAGESZ_1M)
  48. .long FSL_BOOKE_MAS2(CFG_CCSRBAR,(MAS2_I|MAS2_G))
  49. .long FSL_BOOKE_MAS3(CFG_CCSRBAR,0,(MAS3_SX|MAS3_SW|MAS3_SR))
  50. /* TLB for Local Bus stuff, just map the whole 512M */
  51. /* note that the LBC SDRAM is cache-inhibit and guarded, like everything else */
  52. .long FSL_BOOKE_MAS0(1,2,0)
  53. .long FSL_BOOKE_MAS1(1,1,0,0,BOOKE_PAGESZ_256M)
  54. .long FSL_BOOKE_MAS2(0xe0000000,(MAS2_I|MAS2_G))
  55. .long FSL_BOOKE_MAS3(0xe0000000,0,(MAS3_SX|MAS3_SW|MAS3_SR))
  56. .long FSL_BOOKE_MAS0(1,3,0)
  57. .long FSL_BOOKE_MAS1(1,1,0,0,BOOKE_PAGESZ_256M)
  58. .long FSL_BOOKE_MAS2(0xf0000000,(MAS2_I|MAS2_G))
  59. .long FSL_BOOKE_MAS3(0xf0000000,0,(MAS3_SX|MAS3_SW|MAS3_SR))
  60. #if !defined(CONFIG_SPD_EEPROM)
  61. .long FSL_BOOKE_MAS0(1,4,0)
  62. .long FSL_BOOKE_MAS1(1,1,0,0,BOOKE_PAGESZ_256M)
  63. .long FSL_BOOKE_MAS2(CFG_DDR_SDRAM_BASE,0)
  64. .long FSL_BOOKE_MAS3(CFG_DDR_SDRAM_BASE,0,(MAS3_SX|MAS3_SW|MAS3_SR))
  65. .long FSL_BOOKE_MAS0(1,5,0)
  66. .long FSL_BOOKE_MAS1(1,1,0,0,BOOKE_PAGESZ_256M)
  67. .long FSL_BOOKE_MAS2(CFG_DDR_SDRAM_BASE+0x10000000,0)
  68. .long FSL_BOOKE_MAS3(CFG_DDR_SDRAM_BASE+0x10000000,0,(MAS3_SX|MAS3_SW|MAS3_SR))
  69. #else
  70. .long FSL_BOOKE_MAS0(1,4,0)
  71. .long FSL_BOOKE_MAS1(0,0,0,0,BOOKE_PAGESZ_1M)
  72. .long FSL_BOOKE_MAS2(0,0)
  73. .long FSL_BOOKE_MAS3(0,0,(MAS3_SX|MAS3_SW|MAS3_SR))
  74. .long FSL_BOOKE_MAS0(1,5,0)
  75. .long FSL_BOOKE_MAS1(0,0,0,0,BOOKE_PAGESZ_1M)
  76. .long FSL_BOOKE_MAS2(0,0)
  77. .long FSL_BOOKE_MAS3(0,0,(MAS3_SX|MAS3_SW|MAS3_SR))
  78. #endif
  79. .long FSL_BOOKE_MAS0(1,6,0)
  80. .long FSL_BOOKE_MAS1(1,1,0,0,BOOKE_PAGESZ_16K)
  81. #ifdef CONFIG_L2_INIT_RAM
  82. .long FSL_BOOKE_MAS2(CFG_INIT_RAM_ADDR,0,0,0,1,0,0,0,0)
  83. #else
  84. .long FSL_BOOKE_MAS2(CFG_INIT_RAM_ADDR,0)
  85. #endif
  86. .long FSL_BOOKE_MAS3(CFG_INIT_RAM_ADDR,0,(MAS3_SX|MAS3_SW|MAS3_SR))
  87. .long FSL_BOOKE_MAS0(1,7,0)
  88. .long FSL_BOOKE_MAS1(1,1,0,0,BOOKE_PAGESZ_256M)
  89. .long FSL_BOOKE_MAS2(CFG_PCI_MEM_PHYS,(MAS2_I|MAS2_G))
  90. .long FSL_BOOKE_MAS3(CFG_PCI_MEM_PHYS,0,(MAS3_SX|MAS3_SW|MAS3_SR))
  91. #if (CFG_CCSRBAR_DEFAULT != CFG_CCSRBAR)
  92. .long FSL_BOOKE_MAS0(1,15,0)
  93. .long FSL_BOOKE_MAS1(1,1,0,0,BOOKE_PAGESZ_1M)
  94. .long FSL_BOOKE_MAS2(CFG_CCSRBAR_DEFAULT,(MAS2_I|MAS2_G))
  95. .long FSL_BOOKE_MAS3(CFG_CCSRBAR_DEFAULT,0,(MAS3_SX|MAS3_SW|MAS3_SR))
  96. #else
  97. .long FSL_BOOKE_MAS0(1,15,0)
  98. .long FSL_BOOKE_MAS1(0,0,0,0,BOOKE_PAGESZ_1M)
  99. .long FSL_BOOKE_MAS2(0,0)
  100. .long FSL_BOOKE_MAS3(0,0,(MAS3_SX|MAS3_SW|MAS3_SR))
  101. #endif
  102. entry_end