2 * Memory Setup stuff - taken from blob memsetup.S
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)
7 * See file CREDITS for list of people who contributed to this
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.
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.
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,
31 /* some parameters for the board */
33 MEM_BASE: .long 0xa0000000
34 MEM_START: .long 0xc0000000
37 #define MDCAS00 0x04 /* CAS waveform rotate reg 0 */
38 #define MDCAS01 0x08 /* CAS waveform rotate reg 1 bank */
39 #define MDCAS02 0x0C /* CAS waveform rotate reg 2 bank */
40 #define MDREFR 0x1C /* DRAM refresh control reg */
41 #define MDCAS20 0x20 /* CAS waveform rotate reg 0 bank */
42 #define MDCAS21 0x24 /* CAS waveform rotate reg 1 bank */
43 #define MDCAS22 0x28 /* CAS waveform rotate reg 2 bank */
44 #define MECR 0x18 /* Expansion memory (PCMCIA) bus configuration register */
45 #define MSC0 0x10 /* static memory control reg 0 */
46 #define MSC1 0x14 /* static memory control reg 1 */
47 #define MSC2 0x2C /* static memory control reg 2 */
48 #define SMCNFG 0x30 /* SMROM configuration reg */
50 mdcas00: .long 0x5555557F
51 mdcas01: .long 0x55555555
52 mdcas02: .long 0x55555555
53 mdcas20: .long 0x5555557F
54 mdcas21: .long 0x55555555
55 mdcas22: .long 0x55555555
56 mdcnfg: .long 0x0000B25C
57 mdrefr: .long 0x007000C1
58 mecr: .long 0x10841084
59 msc0: .long 0x00004774
60 msc1: .long 0x00000000
61 msc2: .long 0x00000000
62 smcnfg: .long 0x00000000
64 /* setting up the memory */
75 str r1, [r0, #MDCAS00]
79 str r1, [r0, #MDCAS01]
83 str r1, [r0, #MDCAS02]
87 str r1, [r0, #MDCAS20]
91 str r1, [r0, #MDCAS21]
95 str r1, [r0, #MDCAS22]
101 /* Set up PCMCIA space */
105 /* Setup the flash memory and other */
116 str r1, [r0, #SMCNFG]
120 bic r1, r1, #0x00000001
121 str r1, [r0, #MDCNFG]
123 /* Load something to activate bank */
131 orr r1, r1, #0x00000001
132 str r1, [r0, #MDCNFG]
134 /* everything is fine now */