2
* Board specific setup info
4
* (C) Copyright 2005-2007
6
* Kyungmin Park <kyungmin.park@samsung.com>
8
* See file CREDITS for list of people who contributed to this
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.
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.
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,
29
#include <asm/arch/omap2420.h>
30
#include <asm/arch/mem.h>
31
#include <asm/arch/clocks.h>
34
#define APOLLON_CS0_BASE 0x00000000
37
#define SDRC_ACTIM_CTRLA_0_VAL 0x7BA35907
38
#define SDRC_ACTIM_CTRLB_0_VAL 0x00000013
39
#define SDRC_RFR_CTRL_0_VAL 0x00044C01
40
#elif defined(PRCM_CONFIG_II)
41
#define SDRC_ACTIM_CTRLA_0_VAL 0x4A59B485
42
#define SDRC_ACTIM_CTRLB_0_VAL 0x0000000C
43
#define SDRC_RFR_CTRL_0_VAL 0x00030001
46
#define SDRAM_BASE_ADDRESS 0x80008000
49
.word TEXT_BASE /* sdram load addr from config.mk */
54
#ifdef CONFIG_SYS_NOR_BOOT
55
/* Check running in SDRAM */
69
/* Pin muxing for SDRC */
71
ldr r0, =0x480000A1 /* ball C12, mode 0 */
74
ldr r0, =0x48000032 /* ball D11, mode 0 */
77
ldr r0, =0x480000A3 /* ball B13, mode 0 */
81
ldr r0, =OMAP2420_SDRC_BASE
88
/* SDRC CS0 configuration */
92
ldr r1, =SDRC_ACTIM_CTRLA_0_VAL
95
ldr r1, =SDRC_ACTIM_CTRLB_0_VAL
98
ldr r1, =SDRC_RFR_CTRL_0_VAL
104
/* Manual command sequence */
119
* CS0 SDRC Mode register
120
* Burst length = 4 - DDR memory
127
/* Note: You MUST set EMR values */
133
#ifdef OLD_SDRC_DLLA_CTRL
149
#ifdef __BROKEN_FEATURE__
158
/* little delay after init */
164
/* Setup base address */
165
ldr r0, =0x00000000 /* NOR address */
166
ldr r1, =SDRAM_BASE_ADDRESS /* SDRAM address */
167
ldr r2, =0x20000 /* Size: 128KB */
175
ldr r1, =SDRAM_BASE_ADDRESS
181
ldr r0, =OMAP2420_CM_BASE
182
ldr r1, [r0, #0x544] /* CLKSEL2_PLL */
207
ldr r1, =CM_CLKSEL1_CORE
215
ldr r0, =OMAP2420_CM_BASE
233
ldr r0, =CM_CLKSEL1_PLL
241
ldr r0, =PRCM_CLKCFG_CTRL
250
ldr r0, =CM_CLKEN_PLL
318
str ip, [sp] /* stash old link register */
319
mov ip, lr /* save link reg across call */
320
bl s_init /* go setup pll,mux,memory */
321
ldr ip, [sp] /* restore save ip */
322
mov lr, ip /* restore link reg */
324
/* map interrupt controller */
325
ldr r0, VAL_INTH_SETUP
326
mcr p15, 0, r0, c15, c2, 4
328
/* back to arch calling code */
331
/* the literal pools origin */
335
.word PERIFERAL_PORT_BASE
337
.word LOW_LEVEL_SRAM_STACK