blob: fa029a176bd74ced7d1024177c07bae02b0dbca6 [file] [log] [blame]
Tom Rini4ee73b02021-07-07 22:55:41 -04001/* SPDX-License-Identifier: GPL-2.0+ */
2/*
Tony Dinhdbd2a382022-04-17 13:42:42 -07003 * Copyright (C) 2015, 2021-2022 Tony Dinh <mibodhi@gmail.com>
Tom Rini4ee73b02021-07-07 22:55:41 -04004 * Copyright (C) 2015
5 * Gerald Kerma <dreagle@doukki.net>
Tom Rini4ee73b02021-07-07 22:55:41 -04006 * Luka Perkov <luka.perkov@sartura.hr>
7 */
8
9#ifndef _CONFIG_NSA310S_H
10#define _CONFIG_NSA310S_H
11
Tony Dinh7875f802022-08-11 16:40:25 -070012/*
13 * mv-common.h should be defined after CMD configs since it used them
14 * to enable certain macros
15 */
Tom Rini4ee73b02021-07-07 22:55:41 -040016#include "mv-common.h"
17
Tony Dinh7875f802022-08-11 16:40:25 -070018/* Include the common distro boot environment */
19#ifndef CONFIG_SPL_BUILD
20
21#define BOOT_TARGET_DEVICES(func) \
22 func(USB, usb, 0) \
23 func(SATA, sata, 0) \
24 func(DHCP, dhcp, na)
25
26#define KERNEL_ADDR_R __stringify(0x800000)
27#define FDT_ADDR_R __stringify(0x2c00000)
28#define RAMDISK_ADDR_R __stringify(0x01100000)
29#define SCRIPT_ADDR_R __stringify(0x200000)
30
31#define LOAD_ADDRESS_ENV_SETTINGS \
32 "kernel_addr_r=" KERNEL_ADDR_R "\0" \
33 "fdt_addr_r=" FDT_ADDR_R "\0" \
34 "ramdisk_addr_r=" RAMDISK_ADDR_R "\0" \
35 "scriptaddr=" SCRIPT_ADDR_R "\0"
36
37#include <config_distro_bootcmd.h>
Tom Rini4ee73b02021-07-07 22:55:41 -040038
Tom Rini0613c362022-12-04 10:03:50 -050039#define CFG_EXTRA_ENV_SETTINGS \
Tom Rini4ee73b02021-07-07 22:55:41 -040040 "console=console=ttyS0,115200\0" \
Tom Rini4ee73b02021-07-07 22:55:41 -040041 "kernel=/boot/zImage\0" \
42 "fdt=/boot/nsa310s.dtb\0" \
Tony Dinh7875f802022-08-11 16:40:25 -070043 "bootargs_root=ubi.mtd=3 root=ubi0:rootfs rootfstype=ubifs rw\0" \
44 LOAD_ADDRESS_ENV_SETTINGS \
45 BOOTENV
46
47#endif /* CONFIG_SPL_BUILD */
Tom Rini4ee73b02021-07-07 22:55:41 -040048
Tom Rini4ee73b02021-07-07 22:55:41 -040049#endif /* _CONFIG_NSA310S_H */