diff mbox series

[v3,1/3] ARM: amlogic: add JetHub common config header

Message ID 20210920084016.2536084-2-adeep@lexina.in
State Accepted
Commit 15eda54676058226fac7c642db03f3f533026522
Delegated to: Neil Armstrong
Headers show
Series ARM: meson: add support for JetHub D1/H1 | expand

Commit Message

Viacheslav Sept. 20, 2021, 8:40 a.m. UTC
JetHub devices uses its own boot sequence with "rescue" button

Signed-off-by: Vyacheslav Bocharov <adeep@lexina.in>
---
 include/configs/jethub.h | 40 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 40 insertions(+)
 create mode 100644 include/configs/jethub.h

Comments

Neil Armstrong Sept. 20, 2021, 12:30 p.m. UTC | #1
On 20/09/2021 10:40, Vyacheslav Bocharov wrote:
> JetHub devices uses its own boot sequence with "rescue" button
> 
> Signed-off-by: Vyacheslav Bocharov <adeep@lexina.in>
> ---
>  include/configs/jethub.h | 40 ++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 40 insertions(+)
>  create mode 100644 include/configs/jethub.h
> 
> diff --git a/include/configs/jethub.h b/include/configs/jethub.h
> new file mode 100644
> index 0000000000..35f85095ac
> --- /dev/null
> +++ b/include/configs/jethub.h
> @@ -0,0 +1,40 @@
> +/* SPDX-License-Identifier: GPL-2.0+ */
> +/*
> + * Configuration for JetHome devices
> + * Copyright (C) 2021 Vyacheslav Bocharov
> + * Author: Vyacheslav Bocharov <adeep@lexina.in>
> + */
> +
> +#ifndef __JETHUB_CONFIG_H
> +#define __JETHUB_CONFIG_H
> +
> +#if defined(CONFIG_MESON_AXG)
> +#define BOOTENV_DEV_RESCUE(devtypeu, devtypel, instance) \
> +	"bootcmd_rescue=" \
> +		"if gpio input 10; then " \
> +		"run bootcmd_usb0;" \
> +		"fi;\0"
> +#else
> +#define BOOTENV_DEV_RESCUE(devtypeu, devtypel, instance) \
> +	"bootcmd_rescue=" \
> +		"if test \"${userbutton}\" = \"true\"; then " \
> +		"run bootcmd_mmc0; " \
> +		"fi;\0"
> +#endif
> +
> +#define BOOTENV_DEV_NAME_RESCUE(devtypeu, devtypel, instance) \
> +	"rescue "
> +
> +#ifndef BOOT_TARGET_DEVICES
> +#define BOOT_TARGET_DEVICES(func) \
> +	func(RESCUE, rescue, na) \
> +	func(MMC, mmc, 1) \
> +	func(MMC, mmc, 0) \
> +	BOOT_TARGET_DEVICES_USB(func) \
> +	func(PXE, pxe, na) \
> +	func(DHCP, dhcp, na)
> +#endif
> +
> +#include <configs/meson64.h>
> +
> +#endif /* __JETHUB_CONFIG_H */
> 

Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
diff mbox series

Patch

diff --git a/include/configs/jethub.h b/include/configs/jethub.h
new file mode 100644
index 0000000000..35f85095ac
--- /dev/null
+++ b/include/configs/jethub.h
@@ -0,0 +1,40 @@ 
+/* SPDX-License-Identifier: GPL-2.0+ */
+/*
+ * Configuration for JetHome devices
+ * Copyright (C) 2021 Vyacheslav Bocharov
+ * Author: Vyacheslav Bocharov <adeep@lexina.in>
+ */
+
+#ifndef __JETHUB_CONFIG_H
+#define __JETHUB_CONFIG_H
+
+#if defined(CONFIG_MESON_AXG)
+#define BOOTENV_DEV_RESCUE(devtypeu, devtypel, instance) \
+	"bootcmd_rescue=" \
+		"if gpio input 10; then " \
+		"run bootcmd_usb0;" \
+		"fi;\0"
+#else
+#define BOOTENV_DEV_RESCUE(devtypeu, devtypel, instance) \
+	"bootcmd_rescue=" \
+		"if test \"${userbutton}\" = \"true\"; then " \
+		"run bootcmd_mmc0; " \
+		"fi;\0"
+#endif
+
+#define BOOTENV_DEV_NAME_RESCUE(devtypeu, devtypel, instance) \
+	"rescue "
+
+#ifndef BOOT_TARGET_DEVICES
+#define BOOT_TARGET_DEVICES(func) \
+	func(RESCUE, rescue, na) \
+	func(MMC, mmc, 1) \
+	func(MMC, mmc, 0) \
+	BOOT_TARGET_DEVICES_USB(func) \
+	func(PXE, pxe, na) \
+	func(DHCP, dhcp, na)
+#endif
+
+#include <configs/meson64.h>
+
+#endif /* __JETHUB_CONFIG_H */