Blame view
board/mpr2/lowlevel_init.S
2.2 KB
3313e0e26 sh: Added support... |
1 2 3 4 5 6 7 8 9 |
/* * (C) Copyright 2008 * Mark Jonas <mark.jonas@de.bosch.com> * * (C) Copyright 2007 * Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com> * * board/mpr2/lowlevel_init.S * |
1a4596601 Add GPL-2.0+ SPDX... |
10 |
* SPDX-License-Identifier: GPL-2.0+ |
3313e0e26 sh: Added support... |
11 |
*/ |
f7e78f3b7 sh: use write{8,1... |
12 |
#include <asm/macro.h> |
3313e0e26 sh: Added support... |
13 14 15 16 17 18 19 20 21 22 23 |
.global lowlevel_init .text .align 2 lowlevel_init: /* * Set frequency multipliers and dividers in FRQCR. */ |
f7e78f3b7 sh: use write{8,1... |
24 |
write16 WTCSR_A, WTCSR_D |
3313e0e26 sh: Added support... |
25 |
|
f7e78f3b7 sh: use write{8,1... |
26 |
write16 WTCNT_A, WTCNT_D |
3313e0e26 sh: Added support... |
27 |
|
f7e78f3b7 sh: use write{8,1... |
28 |
write16 FRQCR_A, FRQCR_D |
3313e0e26 sh: Added support... |
29 30 31 32 |
/* * Setup CS0 (Flash). */ |
f7e78f3b7 sh: use write{8,1... |
33 |
write32 CS0BCR_A, CS0BCR_D |
3313e0e26 sh: Added support... |
34 |
|
f7e78f3b7 sh: use write{8,1... |
35 |
write32 CS0WCR_A, CS0WCR_D |
3313e0e26 sh: Added support... |
36 37 38 39 |
/* * Setup CS3 (SDRAM). */ |
f7e78f3b7 sh: use write{8,1... |
40 |
write32 CS3BCR_A, CS3BCR_D |
3313e0e26 sh: Added support... |
41 |
|
f7e78f3b7 sh: use write{8,1... |
42 |
write32 CS3WCR_A, CS3WCR_D |
3313e0e26 sh: Added support... |
43 |
|
f7e78f3b7 sh: use write{8,1... |
44 |
write32 SDCR_A, SDCR_D1 |
3313e0e26 sh: Added support... |
45 |
|
f7e78f3b7 sh: use write{8,1... |
46 |
write32 RTCSR_A, RTCSR_D |
3313e0e26 sh: Added support... |
47 |
|
f7e78f3b7 sh: use write{8,1... |
48 |
write32 RTCNT_A, RTCNT_D |
3313e0e26 sh: Added support... |
49 |
|
f7e78f3b7 sh: use write{8,1... |
50 |
write32 RTCOR_A, RTCOR_D |
3313e0e26 sh: Added support... |
51 |
|
f7e78f3b7 sh: use write{8,1... |
52 |
write32 SDCR_A, SDCR_D2 |
3313e0e26 sh: Added support... |
53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 |
mov.l SDMR3_A, r1 mov.l SDMR3_D, r0 add r0, r1 mov #0, r0 mov.w r0, @r1 rts nop .align 4 /* * Configuration for MPR2 A.3 through A.7 */ /* * PLL Settings */ |
3594f1987 sh: Update lowlev... |
72 73 74 75 |
FRQCR_D: .word 0x1103 /* I:B:P=8:4:2 */ WTCNT_D: .word 0x5A00 /* start counting at zero */ WTCSR_D: .word 0xA507 /* divide by 4096 */ .align 2 |
3313e0e26 sh: Added support... |
76 77 78 |
/* * Spansion S29GL256N11 @ 48 MHz */ |
e44307796 sh: lowlevel_init... |
79 80 81 82 |
/* 1 idle cycle inserted, normal space, 16 bit */ CS0BCR_D: .long 0x12490400 /* tSW=0.5ck, 6 wait cycles, NO external wait, tHW=0.5ck */ CS0WCR_D: .long 0x00000340 |
3313e0e26 sh: Added support... |
83 84 85 86 87 |
/* * Samsung K4S511632B-UL75 @ 48 MHz * Micron MT48LC32M16A2-75 @ 48 MHz */ |
e44307796 sh: lowlevel_init... |
88 89 90 91 92 93 94 95 96 97 98 99 |
/* CS3BCR = 0x10004400, minimum idle cycles, SDRAM, 16 bit */ CS3BCR_D: .long 0x10004400 /* tRP=1ck, tRCD=1ck, CL=2, tRWL=2ck, tRC=4ck */ CS3WCR_D: .long 0x00000091 /* no refresh, 13 rows, 10 cols, NO bank active mode */ SDCR_D1: .long 0x00000012 SDCR_D2: .long 0x00000812 /* refresh */ RTCSR_D: .long 0xA55A0008 /* 1/4, once */ RTCNT_D: .long 0xA55A005D /* count 93 */ RTCOR_D: .long 0xa55a005d /* count 93 */ /* mode register CL2, burst read and SINGLE WRITE */ SDMR3_D: .long 0x440 |
3313e0e26 sh: Added support... |
100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 |
/* * Registers */ FRQCR_A: .long 0xA415FF80 WTCNT_A: .long 0xA415FF84 WTCSR_A: .long 0xA415FF86 #define BSC_BASE 0xA4FD0000 CS0BCR_A: .long BSC_BASE + 0x04 CS3BCR_A: .long BSC_BASE + 0x0C CS0WCR_A: .long BSC_BASE + 0x24 CS3WCR_A: .long BSC_BASE + 0x2C SDCR_A: .long BSC_BASE + 0x44 RTCSR_A: .long BSC_BASE + 0x48 RTCNT_A: .long BSC_BASE + 0x4C RTCOR_A: .long BSC_BASE + 0x50 SDMR3_A: .long BSC_BASE + 0x5000 |