Commit d99d59c0 authored by Bernhard Nortmann's avatar Bernhard Nortmann
Browse files

sunxi-tools: some trivial fixes



- get rid of double includes
- fix U-Boot source reference
- get rid of "uboot_autostart" variable
Signed-off-by: default avatarBernhard Nortmann <bernhard.nortmann@web.de>
Acked-by: default avatarPeter Korsgaard <peter@korsgaard.com>
parent 9bf1de0a
...@@ -28,8 +28,6 @@ ...@@ -28,8 +28,6 @@
#include <string.h> #include <string.h>
#include <stdio.h> #include <stdio.h>
#include <ctype.h> #include <ctype.h>
#include <stdlib.h>
#include <stdio.h>
#include <stdarg.h> #include <stdarg.h>
#include <errno.h> #include <errno.h>
#include <unistd.h> #include <unistd.h>
...@@ -988,8 +986,8 @@ int have_sunxi_spl(libusb_device_handle *usb, uint32_t spl_addr) ...@@ -988,8 +986,8 @@ int have_sunxi_spl(libusb_device_handle *usb, uint32_t spl_addr)
/* /*
* Pass information to U-Boot via specialized fields in the SPL header * Pass information to U-Boot via specialized fields in the SPL header
* (see "boot_file_head" in ${U-BOOT}/tools/mksunxiboot.c), providing * (see "boot_file_head" in ${U-BOOT}/arch/arm/include/asm/arch-sunxi/spl.h),
* information about the boot script address (DRAM location of boot.scr). * providing the boot script address (DRAM location of boot.scr).
*/ */
void pass_fel_information(libusb_device_handle *usb, uint32_t script_address) void pass_fel_information(libusb_device_handle *usb, uint32_t script_address)
{ {
...@@ -1054,7 +1052,6 @@ static double gettime(void) ...@@ -1054,7 +1052,6 @@ static double gettime(void)
int main(int argc, char **argv) int main(int argc, char **argv)
{ {
int uboot_autostart = 0; /* flag for "uboot" command = U-Boot autostart */
int rc; int rc;
libusb_device_handle *handle = NULL; libusb_device_handle *handle = NULL;
int iface_detached = -1; int iface_detached = -1;
...@@ -1175,8 +1172,7 @@ int main(int argc, char **argv) ...@@ -1175,8 +1172,7 @@ int main(int argc, char **argv)
skip=2; skip=2;
} else if (strcmp(argv[1], "uboot") == 0 && argc > 2) { } else if (strcmp(argv[1], "uboot") == 0 && argc > 2) {
aw_fel_process_spl_and_uboot(handle, argv[2]); aw_fel_process_spl_and_uboot(handle, argv[2]);
uboot_autostart = (uboot_entry > 0 && uboot_size > 0); if (!uboot_entry)
if (!uboot_autostart)
printf("Warning: \"uboot\" command failed to detect image! Can't execute U-Boot.\n"); printf("Warning: \"uboot\" command failed to detect image! Can't execute U-Boot.\n");
skip=2; skip=2;
} else { } else {
...@@ -1188,7 +1184,7 @@ int main(int argc, char **argv) ...@@ -1188,7 +1184,7 @@ int main(int argc, char **argv)
} }
// auto-start U-Boot if requested (by the "uboot" command) // auto-start U-Boot if requested (by the "uboot" command)
if (uboot_autostart) { if (uboot_entry > 0 && uboot_size > 0) {
pr_info("Starting U-Boot (0x%08X).\n", uboot_entry); pr_info("Starting U-Boot (0x%08X).\n", uboot_entry);
aw_fel_execute(handle, uboot_entry); aw_fel_execute(handle, uboot_entry);
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment