Vyacheslav Bocharov | a5c9f35 | 2021-09-20 11:40:14 +0300 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
| 2 | /* |
| 3 | * Configuration for JetHome devices |
| 4 | * Copyright (C) 2021 Vyacheslav Bocharov |
| 5 | * Author: Vyacheslav Bocharov <adeep@lexina.in> |
| 6 | */ |
| 7 | |
| 8 | #ifndef __JETHUB_CONFIG_H |
| 9 | #define __JETHUB_CONFIG_H |
| 10 | |
| 11 | #if defined(CONFIG_MESON_AXG) |
| 12 | #define BOOTENV_DEV_RESCUE(devtypeu, devtypel, instance) \ |
| 13 | "bootcmd_rescue=" \ |
Viacheslav Bocharov | f2761dc | 2024-02-27 09:54:04 +0300 | [diff] [blame^] | 14 | "if gpio input periphs-banks10; then " \ |
Viacheslav Bocharov | de5fc94 | 2022-12-22 12:33:58 +0300 | [diff] [blame] | 15 | "run bootcmd_mmc0; " \ |
Vyacheslav Bocharov | a5c9f35 | 2021-09-20 11:40:14 +0300 | [diff] [blame] | 16 | "run bootcmd_usb0;" \ |
| 17 | "fi;\0" |
| 18 | #else |
| 19 | #define BOOTENV_DEV_RESCUE(devtypeu, devtypel, instance) \ |
| 20 | "bootcmd_rescue=" \ |
| 21 | "if test \"${userbutton}\" = \"true\"; then " \ |
| 22 | "run bootcmd_mmc0; " \ |
| 23 | "fi;\0" |
| 24 | #endif |
| 25 | |
| 26 | #define BOOTENV_DEV_NAME_RESCUE(devtypeu, devtypel, instance) \ |
| 27 | "rescue " |
| 28 | |
| 29 | #ifndef BOOT_TARGET_DEVICES |
| 30 | #define BOOT_TARGET_DEVICES(func) \ |
| 31 | func(RESCUE, rescue, na) \ |
| 32 | func(MMC, mmc, 1) \ |
| 33 | func(MMC, mmc, 0) \ |
| 34 | BOOT_TARGET_DEVICES_USB(func) \ |
| 35 | func(PXE, pxe, na) \ |
| 36 | func(DHCP, dhcp, na) |
| 37 | #endif |
| 38 | |
| 39 | #include <configs/meson64.h> |
| 40 | |
| 41 | #endif /* __JETHUB_CONFIG_H */ |