mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2025-08-16 12:16:59 +02:00
board: dragonboard410c: Use button_cmd instead of custom code
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> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Reviewed-by: Link: https://lore.kernel.org/r/20250407-db410c-fixes-v1-12-524aefbc8bb4@linaro.org Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
This commit is contained in:
parent
268bfcd216
commit
359e1d4a57
@ -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("Volume 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];
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user