Vyacheslav Bocharov | 15eda54 | 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=" \ |
| 14 | "if gpio input 10; then " \ |
| 15 | "run bootcmd_usb0;" \ |
| 16 | "fi;\0" |
| 17 | #else |
| 18 | #define BOOTENV_DEV_RESCUE(devtypeu, devtypel, instance) \ |
| 19 | "bootcmd_rescue=" \ |
| 20 | "if test \"${userbutton}\" = \"true\"; then " \ |
| 21 | "run bootcmd_mmc0; " \ |
| 22 | "fi;\0" |
| 23 | #endif |
| 24 | |
| 25 | #define BOOTENV_DEV_NAME_RESCUE(devtypeu, devtypel, instance) \ |
| 26 | "rescue " |
| 27 | |
| 28 | #ifndef BOOT_TARGET_DEVICES |
| 29 | #define BOOT_TARGET_DEVICES(func) \ |
| 30 | func(RESCUE, rescue, na) \ |
| 31 | func(MMC, mmc, 1) \ |
| 32 | func(MMC, mmc, 0) \ |
| 33 | BOOT_TARGET_DEVICES_USB(func) \ |
| 34 | func(PXE, pxe, na) \ |
| 35 | func(DHCP, dhcp, na) |
| 36 | #endif |
| 37 | |
| 38 | #include <configs/meson64.h> |
| 39 | |
| 40 | #endif /* __JETHUB_CONFIG_H */ |