From: Neil Armstrong <neil.armstrong@linaro.org>
To: Stephan Gerhold <stephan.gerhold@linaro.org>,
Caleb Connolly <caleb.connolly@linaro.org>
Cc: Tom Rini <trini@konsulko.com>, Ramon Fried <rfried.dev@gmail.com>,
Sumit Garg <sumit.garg@kernel.org>,
u-boot@lists.denx.de, u-boot-qcom@groups.io,
Sam Day <me@samcday.com>
Subject: Re: [PATCH 12/13] board: dragonboard410c: Use button_cmd instead of custom code
Date: Mon, 7 Apr 2025 20:10:45 +0200 [thread overview]
Message-ID: <a4dd32cd-32dc-4f21-8ff1-87584d32b96d@linaro.org> (raw)
In-Reply-To: <20250407-db410c-fixes-v1-12-524aefbc8bb4@linaro.org>
On 07/04/2025 18:59, Stephan Gerhold wrote:
> Simplify the board code by using the new BUTTON_CMD functionality, instead
> of implementing this separately using C code. This allows disabling or
> customizing this functionality if wanted.
>
> Signed-off-by: Stephan Gerhold <stephan.gerhold@linaro.org>
> ---
> board/qualcomm/dragonboard410c/dragonboard410c.c | 22 ----------------------
> board/qualcomm/dragonboard410c/dragonboard410c.env | 2 ++
> configs/dragonboard410c_defconfig | 2 +-
> 3 files changed, 3 insertions(+), 23 deletions(-)
>
> diff --git a/board/qualcomm/dragonboard410c/dragonboard410c.c b/board/qualcomm/dragonboard410c/dragonboard410c.c
> index 697e3c9b08b5c874912eb66ff4f0b3d32deaae01..4698b9d5e3e47a9b0389d9f6bafab9dd6db56a41 100644
> --- a/board/qualcomm/dragonboard410c/dragonboard410c.c
> +++ b/board/qualcomm/dragonboard410c/dragonboard410c.c
> @@ -51,28 +51,6 @@ static void msm_generate_mac_addr(u8 *mac)
> put_unaligned_be32(msm_board_serial(), &mac[2]);
> }
>
> -/* Check for vol- button - if pressed - stop autoboot */
> -int misc_init_r(void)
> -{
> - struct udevice *btn;
> - int ret;
> - enum button_state_t state;
> -
> - ret = button_get_by_label("vol_down", &btn);
> - if (ret < 0) {
> - printf("Couldn't find power button!\n");
> - return ret;
> - }
> -
> - state = button_get_state(btn);
> - if (state == BUTTON_ON) {
> - env_set("preboot", "setenv preboot; run fastboot");
> - printf("vol_down pressed - Starting fastboot.\n");
> - }
> -
> - return 0;
> -}
> -
> int qcom_late_init(void)
> {
> char serial[16];
> diff --git a/board/qualcomm/dragonboard410c/dragonboard410c.env b/board/qualcomm/dragonboard410c/dragonboard410c.env
> index 71f929b646cc305cf5223cd3462fe2350bc8093e..38399d65c640ee18261529ee3101b268700fa004 100644
> --- a/board/qualcomm/dragonboard410c/dragonboard410c.env
> +++ b/board/qualcomm/dragonboard410c/dragonboard410c.env
> @@ -2,3 +2,5 @@
> initrd_high=0xffffffffffffffff
> fastboot=fastboot -l $fastboot_addr_r usb 0
> boot_targets=usb mmc1 mmc0 pxe
> +button_cmd_0_name=vol_down
> +button_cmd_0=run fastboot
> diff --git a/configs/dragonboard410c_defconfig b/configs/dragonboard410c_defconfig
> index 414dda6778c95eb3fdcd6ef522d8c7d0ef9219fa..449d48a3c004117b832ad620d49beb681a9bda68 100644
> --- a/configs/dragonboard410c_defconfig
> +++ b/configs/dragonboard410c_defconfig
> @@ -14,6 +14,7 @@ CONFIG_OF_LIBFDT_OVERLAY=y
> CONFIG_SYS_LOAD_ADDR=0x80080000
> CONFIG_IDENT_STRING="\nQualcomm-DragonBoard 410C"
> CONFIG_REMAKE_ELF=y
> +CONFIG_BUTTON_CMD=y
> CONFIG_FIT=y
> CONFIG_BOOTSTD_FULL=y
> CONFIG_OF_BOARD_SETUP=y
> @@ -22,7 +23,6 @@ CONFIG_SYS_CBSIZE=512
> CONFIG_SYS_PBSIZE=548
> # CONFIG_DISPLAY_CPUINFO is not set
> # CONFIG_DISPLAY_BOARDINFO is not set
> -CONFIG_MISC_INIT_R=y
> CONFIG_SYS_PROMPT="dragonboard410c => "
> CONFIG_CMD_MD5SUM=y
> CONFIG_CMD_MEMINFO=y
>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
next prev parent reply other threads:[~2025-04-07 18:10 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-07 16:59 [PATCH 00/13] board: dragonboard410c: Various fixes and cleanup Stephan Gerhold
2025-04-07 16:59 ` [PATCH 01/13] mach-snapdragon: Fix EL2 boot on DragonBoard 410c Stephan Gerhold
2025-04-07 18:12 ` Neil Armstrong
2025-04-07 16:59 ` [PATCH 02/13] board: dragonboard410c: Fix RAM size Stephan Gerhold
2025-04-07 18:06 ` Neil Armstrong
2025-04-07 16:59 ` [PATCH 03/13] board: dragonboard410c: Fix BD address Stephan Gerhold
2025-04-07 18:11 ` Neil Armstrong
2025-04-07 16:59 ` [PATCH 04/13] board: dragonboard410c: Drop UNSTUFF_BITS() macro Stephan Gerhold
2025-04-07 18:07 ` Neil Armstrong
2025-04-07 16:59 ` [PATCH 05/13] board: dragonboard410c: Drop reflash functionality Stephan Gerhold
2025-04-07 18:12 ` Neil Armstrong
2025-04-07 16:59 ` [PATCH 06/13] board: dragonboard410c: Drop unused linux_image Stephan Gerhold
2025-04-07 18:08 ` Neil Armstrong
2025-04-07 16:59 ` [PATCH 07/13] board: dragonboard410c: Use dynamically allocated load addresses Stephan Gerhold
2025-04-07 18:08 ` Neil Armstrong
2025-04-07 16:59 ` [PATCH 08/13] board: dragonboard410c: Fix counter frequency Stephan Gerhold
2025-04-07 18:08 ` Neil Armstrong
2025-04-07 16:59 ` [PATCH 09/13] board: dragonboard410c: Enable RTL8152 ethernet Stephan Gerhold
2025-04-07 18:09 ` Neil Armstrong
2025-04-07 16:59 ` [PATCH 10/13] board: dragonboard410c: Use BOOTSTD instead of DISTRO_DEFAULTS Stephan Gerhold
2025-04-07 18:09 ` Neil Armstrong
2025-04-07 16:59 ` [PATCH 11/13] board: dragonboard410c: Enable support for Android boot images Stephan Gerhold
2025-04-07 18:10 ` Neil Armstrong
2025-04-08 7:01 ` Stephan Gerhold
2025-04-08 7:18 ` Neil Armstrong
2025-04-07 16:59 ` [PATCH 12/13] board: dragonboard410c: Use button_cmd instead of custom code Stephan Gerhold
2025-04-07 18:10 ` Neil Armstrong [this message]
2025-04-07 16:59 ` [PATCH 13/13] board: dragonboard410c: Update maintainers Stephan Gerhold
2025-04-07 18:11 ` Neil Armstrong
2025-04-09 15:23 ` [PATCH 00/13] board: dragonboard410c: Various fixes and cleanup Caleb Connolly
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=a4dd32cd-32dc-4f21-8ff1-87584d32b96d@linaro.org \
--to=neil.armstrong@linaro.org \
--cc=caleb.connolly@linaro.org \
--cc=me@samcday.com \
--cc=rfried.dev@gmail.com \
--cc=stephan.gerhold@linaro.org \
--cc=sumit.garg@kernel.org \
--cc=trini@konsulko.com \
--cc=u-boot-qcom@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