summaryrefslogtreecommitdiffstats
path: root/arch/mips/boards/loongson-ls1b/lowlevel.S
blob: e823bb37dde9e053e52e6d14a06d2091d9e528c6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
/* SPDX-License-Identifier: GPL-2.0-only */
/*
 * Copyright (C) 2014 Antony Pavlov <antonynpavlov@gmail.com>
 * Copyright (C) 2020 Du Huanpeng <u74147@gmail.com>
 */

#define BOARD_PBL_START start_loongson_ls1b

#include <asm/pbl_macros.h>
#include <mach/loongson1.h>
#include <mach/debug_ll.h>
#include <asm/pbl_nmon.h>
#include <linux/sizes.h>

#include <mach/pbl_macros.h>
#include <mach/pbl_ll_init_loongson1.h>

ENTRY_FUNCTION(BOARD_PBL_START)

	mips_cpu_setup

	pbl_blt 0xbf000000 skip_pll_ram_config t0

	pbl_loongson1_pll

	pbl_loongson1_uart_enable
	debug_ll_ns16550_init

	debug_ll_outc '.'
	debug_ll_ns16550_outnl
	debug_ll_outc '1'

	pbl_loongson1_remap
	debug_ll_outc '2'

	pbl_loongson1_ddr2_init
	pbl_probe_mem t0, t1, KSEG1
	bne     t0, t1, .
	nop

	debug_ll_outc '3'

	mips_cache_reset
	dcache_enable
	debug_ll_outc '4'

skip_pll_ram_config:
	debug_ll_outc '5'
	debug_ll_ns16550_outnl

ENTRY_FUNCTION_END(BOARD_PBL_START, loongson_ls1b, SZ_64M)