From 731785df0b68158c282d880de0a86d1db8aec118 Mon Sep 17 00:00:00 2001 From: Sean Nyekjaer Date: Thu, 24 Jan 2019 15:17:21 +0100 Subject: cmd: fastboot: handle watchdog while waiting for fastboot commands. Watchdog is not handled while waiting for fastboot commands. Tested on a i.MX6 ULL EVK board. Signed-off-by: Sean Nyekjaer --- cmd/fastboot.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'cmd') diff --git a/cmd/fastboot.c b/cmd/fastboot.c index 0be83b78ac1..1b4215114d7 100644 --- a/cmd/fastboot.c +++ b/cmd/fastboot.c @@ -13,6 +13,7 @@ #include #include #include +#include static int do_fastboot_udp(int argc, char *const argv[], uintptr_t buf_addr, size_t buf_size) @@ -74,6 +75,7 @@ static int do_fastboot_usb(int argc, char *const argv[], break; if (ctrlc()) break; + WATCHDOG_RESET(); usb_gadget_handle_interrupts(controller_index); } -- cgit v1.2.3 From 1fd7a4764103781e424ef687034da06de3cb60b7 Mon Sep 17 00:00:00 2001 From: Heinrich Schuchardt Date: Tue, 19 Mar 2019 18:44:05 +0100 Subject: efi_loader: memory leak in efi_dump_single_var() A misplaced return statement lead to a memory leak in efi_dump_single_var(). Reported-by: Coverity (CID 185829) Signed-off-by: Heinrich Schuchardt --- cmd/nvedit_efi.c | 1 - 1 file changed, 1 deletion(-) (limited to 'cmd') diff --git a/cmd/nvedit_efi.c b/cmd/nvedit_efi.c index ca32566a615..e65b38dbf39 100644 --- a/cmd/nvedit_efi.c +++ b/cmd/nvedit_efi.c @@ -80,7 +80,6 @@ static void efi_dump_single_var(u16 *name, efi_guid_t *guid) printf(", DataSize = 0x%zx\n", size); print_hex_dump(" ", DUMP_PREFIX_OFFSET, 16, 1, data, size, true); - return; out: free(data); } -- cgit v1.2.3 From c95e632de4a474d89fa733a83a39c66236960edf Mon Sep 17 00:00:00 2001 From: Patrick Delaunay Date: Wed, 27 Feb 2019 15:20:37 +0100 Subject: Convert CONFIG_DEFAULT_SPI_* to Kconfig This converts the following to Kconfig: CONFIG_DEFAULT_SPI_BUS CONFIG_DEFAULT_SPI_MODE Signed-off-by: Patrick Delaunay --- cmd/Kconfig | 12 +++++++++++- cmd/spi.c | 7 ------- 2 files changed, 11 insertions(+), 8 deletions(-) (limited to 'cmd') diff --git a/cmd/Kconfig b/cmd/Kconfig index 4bcc5c45579..0b07b3b9d77 100644 --- a/cmd/Kconfig +++ b/cmd/Kconfig @@ -1040,10 +1040,20 @@ config CMD_SF_TEST everything is working properly. config CMD_SPI - bool "sspi" + bool "sspi - Command to access spi device" help SPI utility command. +config DEFAULT_SPI_BUS + int "default spi bus used by sspi command" + depends on CMD_SPI + default 0 + +config DEFAULT_SPI_MODE + hex "default spi mode used by sspi command (see include/spi.h)" + depends on CMD_SPI + default 0 + config CMD_TSI148 bool "tsi148 - Command to access tsi148 device" help diff --git a/cmd/spi.c b/cmd/spi.c index 9a2edcff65c..75226fd3688 100644 --- a/cmd/spi.c +++ b/cmd/spi.c @@ -22,13 +22,6 @@ # define MAX_SPI_BYTES 32 /* Maximum number of bytes we can handle */ #endif -#ifndef CONFIG_DEFAULT_SPI_BUS -# define CONFIG_DEFAULT_SPI_BUS 0 -#endif -#ifndef CONFIG_DEFAULT_SPI_MODE -# define CONFIG_DEFAULT_SPI_MODE SPI_MODE_0 -#endif - /* * Values from last command. */ -- cgit v1.2.3