lowlevel_init.S 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. /*
  2. *
  3. * (c) 2007 Pengutronix, Sascha Hauer <s.hauer@pengutronix.de>
  4. *
  5. * See file CREDITS for list of people who contributed to this
  6. * project.
  7. *
  8. * This program is free software; you can redistribute it and/or
  9. * modify it under the terms of the GNU General Public License as
  10. * published by the Free Software Foundation; either version 2 of
  11. * the License, or (at your option) any later version.
  12. *
  13. * This program is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU General Public License
  19. * along with this program; if not, write to the Free Software
  20. * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  21. * MA 02111-1307 USA
  22. */
  23. #include <asm/arch/mx31-regs.h>
  24. .macro REG reg, val
  25. ldr r2, =\reg
  26. ldr r3, =\val
  27. str r3, [r2]
  28. .endm
  29. .macro REG8 reg, val
  30. ldr r2, =\reg
  31. ldr r3, =\val
  32. strb r3, [r2]
  33. .endm
  34. .macro DELAY loops
  35. ldr r2, =\loops
  36. 1:
  37. subs r2, r2, #1
  38. nop
  39. bcs 1b
  40. .endm
  41. .globl lowlevel_init
  42. lowlevel_init:
  43. REG IPU_CONF, IPU_CONF_DI_EN
  44. REG CCM_CCMR, 0x074B0BF5
  45. DELAY 0x40000
  46. REG CCM_CCMR, 0x074B0BF5 | CCMR_MPE
  47. REG CCM_CCMR, (0x074B0BF5 | CCMR_MPE) & ~CCMR_MDS
  48. REG CCM_PDR0, PDR0_CSI_PODF(0x1ff) | PDR0_PER_PODF(7) | PDR0_HSP_PODF(2) | PDR0_NFC_PODF(6) | PDR0_IPG_PODF(1) | PDR0_MAX_PODF(2) | PDR0_MCU_PODF(0)
  49. REG CCM_MPCTL, PLL_PD(0) | PLL_MFD(0x33) | PLL_MFI(7) | PLL_MFN(0x23)
  50. REG CCM_SPCTL, PLL_PD(1) | PLL_MFD(4) | PLL_MFI(12) | PLL_MFN(1)
  51. REG 0x43FAC26C, 0 /* SDCLK */
  52. REG 0x43FAC270, 0 /* CAS */
  53. REG 0x43FAC274, 0 /* RAS */
  54. REG 0x43FAC27C, 0x1000 /* CS2 (CSD0) */
  55. REG 0x43FAC284, 0 /* DQM3 */
  56. REG 0x43FAC288, 0 /* DQM2, DQM1, DQM0, SD31-SD0, A25-A0, MA10 (0x288..0x2DC) */
  57. REG 0x43FAC28C, 0
  58. REG 0x43FAC290, 0
  59. REG 0x43FAC294, 0
  60. REG 0x43FAC298, 0
  61. REG 0x43FAC29C, 0
  62. REG 0x43FAC2A0, 0
  63. REG 0x43FAC2A4, 0
  64. REG 0x43FAC2A8, 0
  65. REG 0x43FAC2AC, 0
  66. REG 0x43FAC2B0, 0
  67. REG 0x43FAC2B4, 0
  68. REG 0x43FAC2B8, 0
  69. REG 0x43FAC2BC, 0
  70. REG 0x43FAC2C0, 0
  71. REG 0x43FAC2C4, 0
  72. REG 0x43FAC2C8, 0
  73. REG 0x43FAC2CC, 0
  74. REG 0x43FAC2D0, 0
  75. REG 0x43FAC2D4, 0
  76. REG 0x43FAC2D8, 0
  77. REG 0x43FAC2DC, 0
  78. REG 0xB8001010, 0x00000004
  79. REG 0xB8001004, 0x006ac73a
  80. REG 0xB8001000, 0x92100000
  81. REG 0x80000f00, 0x12344321
  82. REG 0xB8001000, 0xa2100000
  83. REG 0x80000000, 0x12344321
  84. REG 0x80000000, 0x12344321
  85. REG 0xB8001000, 0xb2100000
  86. REG8 0x80000033, 0xda
  87. REG8 0x81000000, 0xff
  88. REG 0xB8001000, 0x82226080
  89. REG 0x80000000, 0xDEADBEEF
  90. REG 0xB8001010, 0x0000000c
  91. mov pc, lr