lowlevel_init.S 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. /*
  2. * Memory sub-system initialization code for TANBAC Evaluation board TB0229.
  3. *
  4. * Copyright (c) 2003 Masami Komiya <mkomiya@sonare.it>
  5. *
  6. * This program is free software; you can redistribute it and/or
  7. * modify it under the terms of the GNU General Public License as
  8. * published by the Free Software Foundation; either version 2, or (at
  9. * your option) any later version.
  10. */
  11. #include <config.h>
  12. #include <asm/regdef.h>
  13. .globl lowlevel_init
  14. lowlevel_init:
  15. /* BCUCNTREG1 = 0x0040 */
  16. la t0, 0xaf000000
  17. li t1, 0x0040
  18. sh t1, 0(t0)
  19. /* ROMSIZEREG = 0x3333 */
  20. la t0, 0xaf000004
  21. li t1, 0x3333
  22. sh t1, 0(t0)
  23. /* ROMSPEEDREG = 0x3003 */
  24. la t0, 0xaf000006
  25. li t1, 0x3003
  26. sh t1, 0(t0)
  27. /* BCUCNTREG3 = 0 */
  28. la t0, 0xaf000016
  29. li t1, 0x0000
  30. sh t1, 0(t0)
  31. /* CMUCLKMSK */
  32. la t0, 0xaf000060
  33. li t1, 0x39a2
  34. sh t1, 0(t0)
  35. /* PMUCNTREG */
  36. la t0, 0xaf0000c2
  37. li t1, 0x0006
  38. sh t1, 0(t0)
  39. /* SDRAMMODEREG = 0x8029 */
  40. la t0, 0xaf000400
  41. li t1, 0x8029
  42. sh t1, 0(t0)
  43. /* SDRAMCNTREG = 0x2322 */
  44. la t0, 0xaf000402
  45. li t1, 0x2322
  46. sh t1, 0(t0)
  47. /* BCURFCNTREG = 0x0106 */
  48. la t0, 0xaf000404
  49. li t1, 0x0106
  50. sh t1, 0(t0)
  51. /* RAMSZEREG = 0x5555 (64MB Bank) */
  52. la t0, 0xaf000408
  53. li t1, 0x5555
  54. sh t1, 0(t0)
  55. j ra
  56. nop