Adam Ford | 5902879 | 2020-06-30 09:30:11 -0500 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
| 2 | /* |
| 3 | * Copyright (C) 2020 Compass Electronics Group, LLC |
| 4 | */ |
| 5 | |
| 6 | #ifndef __BEACON_RZG2M_H |
| 7 | #define __BEACON_RZG2M_H |
| 8 | |
| 9 | #include "rcar-gen3-common.h" |
| 10 | |
Adam Ford | 5902879 | 2020-06-30 09:30:11 -0500 | [diff] [blame] | 11 | #undef CONFIG_EXTRA_ENV_SETTINGS |
| 12 | |
| 13 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
| 14 | "usb_pgood_delay=2000\0" \ |
| 15 | "script=boot.scr\0" \ |
| 16 | "image=Image\0" \ |
| 17 | "console=ttySC0,115200\0" \ |
| 18 | "fdt_addr=0x48000000\0" \ |
| 19 | "loadaddr=0x48080000\0" \ |
| 20 | "boot_fdt=try\0" \ |
| 21 | "fdt_file=" CONFIG_DEFAULT_FDT_FILE "\0" \ |
| 22 | "initrd_addr=0x43800000\0" \ |
Adam Ford | d5f1beb | 2021-12-06 10:29:30 -0600 | [diff] [blame] | 23 | "mmcdev=1\0" \ |
Adam Ford | 5902879 | 2020-06-30 09:30:11 -0500 | [diff] [blame] | 24 | "mmcpart=1\0" \ |
| 25 | "mmcrootpart=2\0" \ |
| 26 | "finduuid=part uuid mmc ${mmcdev}:${mmcrootpart} uuid\0" \ |
| 27 | "mmcautodetect=yes\0" \ |
| 28 | "mmcargs=setenv bootargs console=${console} " \ |
| 29 | " root=PARTUUID=${uuid} rootwait rw ${optargs}\0" \ |
| 30 | "loadbootscript=load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \ |
| 31 | "bootscript=echo Running bootscript from mmc ...; " \ |
| 32 | "source\0" \ |
| 33 | "loadimage=load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \ |
| 34 | "loadfdt=load mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \ |
| 35 | "mmcboot=echo Booting from mmc ...; " \ |
| 36 | "run finduuid; run mmcargs; " \ |
| 37 | "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \ |
| 38 | "if run loadfdt; then " \ |
| 39 | "booti ${loadaddr} - ${fdt_addr}; " \ |
| 40 | "else " \ |
| 41 | "echo WARN: Cannot load the DT; " \ |
| 42 | "fi; " \ |
| 43 | "else " \ |
| 44 | "echo wait for boot; " \ |
| 45 | "fi;\0" \ |
| 46 | "netargs=setenv bootargs ${jh_clk} console=${console} " \ |
| 47 | "root=/dev/nfs " \ |
| 48 | "ip=dhcp nfsroot=${serverip}:${nfsroot},v3,tcp\0" \ |
| 49 | "netboot=echo Booting from net ...; " \ |
| 50 | "run netargs; " \ |
| 51 | "if test ${ip_dyn} = yes; then " \ |
| 52 | "setenv get_cmd dhcp; " \ |
| 53 | "else " \ |
| 54 | "setenv get_cmd tftp; " \ |
| 55 | "fi; " \ |
| 56 | "${get_cmd} ${loadaddr} ${image}; " \ |
| 57 | "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \ |
| 58 | "if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \ |
| 59 | "booti ${loadaddr} - ${fdt_addr}; " \ |
| 60 | "else " \ |
| 61 | "echo WARN: Cannot load the DT; " \ |
| 62 | "fi; " \ |
| 63 | "else " \ |
| 64 | "booti; " \ |
| 65 | "fi;\0" |
| 66 | |
Adam Ford | 5902879 | 2020-06-30 09:30:11 -0500 | [diff] [blame] | 67 | #endif /* __BEACON_RZG2M_H */ |