lowlevel_init.S 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. /*
  2. * Memory Setup stuff - taken from blob memsetup.S
  3. *
  4. * Copyright (C) 1999 2000 2001 Erik Mouw (J.A.K.Mouw@its.tudelft.nl) and
  5. * Jan-Derk Bakker (J.D.Bakker@its.tudelft.nl)
  6. *
  7. * See file CREDITS for list of people who contributed to this
  8. * project.
  9. *
  10. * This program is free software; you can redistribute it and/or
  11. * modify it under the terms of the GNU General Public License as
  12. * published by the Free Software Foundation; either version 2 of
  13. * the License, or (at your option) any later version.
  14. *
  15. * This program is distributed in the hope that it will be useful,
  16. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  17. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  18. * GNU General Public License for more details.
  19. *
  20. * You should have received a copy of the GNU General Public License
  21. * along with this program; if not, write to the Free Software
  22. * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  23. * MA 02111-1307 USA
  24. */
  25. #include <config.h>
  26. #include <version.h>
  27. /* some parameters for the board */
  28. MEM_BASE: .long 0xa0000000
  29. MEM_START: .long 0xc0000000
  30. #define MDCNFG 0x00
  31. #define MDCAS0 0x04
  32. #define MDCAS1 0x08
  33. #define MDCAS2 0x0c
  34. #define MSC0 0x10
  35. #define MSC1 0x14
  36. #define MECR 0x18
  37. mdcas0: .long 0xc71c703f @ cccccccf
  38. mdcas1: .long 0xffc71c71 @ fffffffc
  39. mdcas2: .long 0xffffffff @ ffffffff
  40. mdcnfg: .long 0x0334b21f @ 9326991f
  41. msc0: .long 0xfff84458 @ 42304230
  42. msc1: .long 0xffffffff @ 20182018
  43. mecr: .long 0x7fff7fff @ 01000000
  44. /* setting up the memory */
  45. .globl lowlevel_init
  46. lowlevel_init:
  47. ldr r0, MEM_BASE
  48. /* Setup the flash memory */
  49. ldr r1, msc0
  50. str r1, [r0, #MSC0]
  51. /* Set up the DRAM */
  52. /* MDCAS0 */
  53. ldr r1, mdcas0
  54. str r1, [r0, #MDCAS0]
  55. /* MDCAS1 */
  56. ldr r1, mdcas1
  57. str r1, [r0, #MDCAS1]
  58. /* MDCAS2 */
  59. ldr r1, mdcas2
  60. str r1, [r0, #MDCAS2]
  61. /* MDCNFG */
  62. ldr r1, mdcnfg
  63. str r1, [r0, #MDCNFG]
  64. /* Set up PCMCIA space */
  65. ldr r1, mecr
  66. str r1, [r0, #MECR]
  67. /* Load something to activate bank */
  68. ldr r1, MEM_START
  69. .rept 8
  70. ldr r0, [r1]
  71. .endr
  72. /* everything is fine now */
  73. mov pc, lr