Migrate CUSTOM_SYS_INIT_SP_ADDR to Kconfig using system-constants.h
[platform/kernel/u-boot.git] / include / configs / qemu-riscv.h
1 /* SPDX-License-Identifier: GPL-2.0+ */
2 /*
3  * Copyright (C) 2018, Bin Meng <bmeng.cn@gmail.com>
4  */
5
6 #ifndef __CONFIG_H
7 #define __CONFIG_H
8
9 #include <linux/sizes.h>
10
11 #ifdef CONFIG_SPL
12
13 #define CONFIG_SPL_BSS_START_ADDR       0x84000000
14 #define CONFIG_SYS_SPL_MALLOC_START     0x84100000
15 #define CONFIG_SYS_SPL_MALLOC_SIZE      0x00100000
16
17 #endif
18
19 #define CONFIG_SYS_SDRAM_BASE           0x80000000
20
21 #define CONFIG_SYS_BOOTM_LEN            SZ_64M
22
23 #define CONFIG_STANDALONE_LOAD_ADDR     0x80200000
24
25 #define RISCV_MMODE_TIMERBASE           0x2000000
26 #define RISCV_MMODE_TIMER_FREQ          1000000
27
28 #define RISCV_SMODE_TIMER_FREQ          1000000
29
30 /* Environment options */
31
32 #ifndef CONFIG_SPL_BUILD
33 #define BOOT_TARGET_DEVICES(func) \
34         func(QEMU, qemu, na) \
35         func(VIRTIO, virtio, 0) \
36         func(SCSI, scsi, 0) \
37         func(DHCP, dhcp, na)
38
39 #include <config_distro_bootcmd.h>
40
41 #define BOOTENV_DEV_QEMU(devtypeu, devtypel, instance) \
42         "bootcmd_qemu=" \
43                 "if env exists kernel_start; then " \
44                         "bootm ${kernel_start} - ${fdtcontroladdr};" \
45                 "fi;\0"
46
47 #define BOOTENV_DEV_NAME_QEMU(devtypeu, devtypel, instance) \
48         "qemu "
49
50 #define CONFIG_EXTRA_ENV_SETTINGS \
51         "fdt_high=0xffffffffffffffff\0" \
52         "initrd_high=0xffffffffffffffff\0" \
53         "kernel_addr_r=0x84000000\0" \
54         "kernel_comp_addr_r=0x88000000\0" \
55         "kernel_comp_size=0x4000000\0" \
56         "fdt_addr_r=0x8c000000\0" \
57         "scriptaddr=0x8c100000\0" \
58         "pxefile_addr_r=0x8c200000\0" \
59         "ramdisk_addr_r=0x8c300000\0" \
60         BOOTENV
61 #endif
62
63 #endif /* __CONFIG_H */