]> git.ipfire.org Git - people/ms/u-boot.git/blob - board/imgtec/boston/lowlevel_init.S
Merge git://git.denx.de/u-boot-sunxi
[people/ms/u-boot.git] / board / imgtec / boston / lowlevel_init.S
1 /*
2 * Copyright (C) 2016 Imagination Technologies
3 *
4 * SPDX-License-Identifier: GPL-2.0
5 */
6
7 #include <config.h>
8
9 #include <asm/addrspace.h>
10 #include <asm/asm.h>
11 #include <asm/mipsregs.h>
12 #include <asm/regdef.h>
13
14 #include "boston-regs.h"
15
16 .data
17
18 msg_ddr_cal: .ascii "DDR Cal "
19 msg_ddr_ok: .ascii "DDR OK "
20
21 .text
22
23 LEAF(lowlevel_init)
24 move s0, ra
25
26 PTR_LA a0, msg_ddr_cal
27 bal lowlevel_display
28
29 PTR_LI t0, BOSTON_PLAT_DDR3STAT
30 1: lw t1, 0(t0)
31 andi t1, t1, BOSTON_PLAT_DDR3STAT_CALIB
32 beqz t1, 1b
33
34 PTR_LA a0, msg_ddr_ok
35 bal lowlevel_display
36
37 jr s0
38 END(lowlevel_init)
39
40 LEAF(lowlevel_display)
41 .set push
42 .set noat
43 PTR_LI AT, BOSTON_LCD_BASE
44 #ifdef CONFIG_64BIT
45 ld k1, 0(a0)
46 sd k1, 0(AT)
47 #else
48 lw k1, 0(a0)
49 sw k1, 0(AT)
50 lw k1, 4(a0)
51 sw k1, 4(AT)
52 #endif
53 .set pop
54 jr ra
55 END(lowlevel_display)