u-boot.lists.denx.de archive mirror
 help / color / mirror / Atom feed
From: Vyacheslav Bocharov <adeep@lexina.in>
To: Neil Armstrong <narmstrong@baylibre.com>
Cc: u-boot@lists.denx.de, u-boot-amlogic@groups.io
Subject: [PATCH v2 1/3] ARM: amlogic: add JetHub common config header
Date: Sun, 19 Sep 2021 18:52:14 +0300	[thread overview]
Message-ID: <20210919155216.4000369-2-adeep@lexina.in> (raw)
In-Reply-To: <20210919155216.4000369-1-adeep@lexina.in>

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 */
-- 
2.30.2


  reply	other threads:[~2021-09-19 15:52 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-19 15:52 [PATCH v2 0/3] ARM: meson: add support for JetHub D1/H1 Vyacheslav Bocharov
2021-09-19 15:52 ` Vyacheslav Bocharov [this message]
2021-09-19 15:52 ` [PATCH v2 2/3] ARM: amlogic: add JetHub D1/H1 device support Vyacheslav Bocharov
2021-09-20  6:43   ` Neil Armstrong
2021-09-20  7:06     ` Vyacheslav
2021-09-19 15:52 ` [PATCH v2 3/3] ARM: amlogic: add JetHub D1/H1 docs Vyacheslav Bocharov
2021-09-20  6:46   ` Neil Armstrong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210919155216.4000369-2-adeep@lexina.in \
    --to=adeep@lexina.in \
    --cc=narmstrong@baylibre.com \
    --cc=u-boot-amlogic@groups.io \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).