[PATCH 10/10] am335x, guardian: code cleanup and boot optimization

Gireesh.Hiremath at in.bosch.com Gireesh.Hiremath at in.bosch.com
Wed Jan 6 16:31:56 CET 2021


From: Gireesh Hiremath <Gireesh.Hiremath at in.bosch.com>

- remove unneeded headers in board.c
- remove unneeded commands and configs from the build

Signed-off-by: Gireesh Hiremath <Gireesh.Hiremath at in.bosch.com>
---
 board/bosch/guardian/board.c      | 21 ---------------------
 configs/am335x_guardian_defconfig |  3 ++-
 2 files changed, 2 insertions(+), 22 deletions(-)

diff --git a/board/bosch/guardian/board.c b/board/bosch/guardian/board.c
index 9911e99c09..a062ec9bfe 100644
--- a/board/bosch/guardian/board.c
+++ b/board/bosch/guardian/board.c
@@ -9,18 +9,13 @@
  */
 
 #include <common.h>
-#include <cpsw.h>
 #include <dm.h>
-#include <env.h>
 #include <env_internal.h>
 #include <errno.h>
 #include <i2c.h>
-#include <init.h>
 #include <led.h>
-#include <miiphy.h>
 #include <panel.h>
 #include <power/tps65217.h>
-#include <power/tps65910.h>
 #include <spl.h>
 #include <watchdog.h>
 #include <asm/arch/clock.h>
@@ -208,27 +203,11 @@ int board_init(void)
 #ifdef CONFIG_BOARD_LATE_INIT
 static void set_bootmode_env(void)
 {
-	char *boot_device_name = NULL;
 	char *boot_mode_gpio = "gpio at 44e07000_14";
 	int   ret;
-	int   value;
 
 	struct gpio_desc boot_mode_desc;
 
-	switch (gd->arch.omap_boot_device) {
-	case BOOT_DEVICE_NAND:
-		boot_device_name = "nand";
-		break;
-	case BOOT_DEVICE_USBETH:
-		boot_device_name = "usbeth";
-		break;
-	default:
-		break;
-	}
-
-	if (boot_device_name)
-		env_set("boot_device", boot_device_name);
-
 	ret = dm_gpio_lookup_name(boot_mode_gpio, &boot_mode_desc);
 	if (ret) {
 		printf("%s is not found\n", boot_mode_gpio);
diff --git a/configs/am335x_guardian_defconfig b/configs/am335x_guardian_defconfig
index dd0c477a86..b5d8d80d14 100644
--- a/configs/am335x_guardian_defconfig
+++ b/configs/am335x_guardian_defconfig
@@ -17,6 +17,7 @@ CONFIG_ENV_OFFSET_REDUND=0x540000
 CONFIG_SPL_LIBDISK_SUPPORT=y
 CONFIG_DEFAULT_DEVICE_TREE="am335x-guardian"
 CONFIG_DISTRO_DEFAULTS=y
+CONFIG_BOOTDELAY=0
 CONFIG_AUTOBOOT_KEYED=y
 CONFIG_AUTOBOOT_PROMPT="Press SPACE to abort autoboot in %d seconds\n"
 CONFIG_AUTOBOOT_DELAY_STR="d"
@@ -39,7 +40,7 @@ CONFIG_SPL_NET_VCI_STRING="Guardian U-Boot SPL"
 CONFIG_SPL_POWER_SUPPORT=y
 CONFIG_SPL_USB_GADGET=y
 CONFIG_SPL_USB_ETHER=y
-CONFIG_CMD_SPL=y
+# CONFIG_CMD_SPL is not set
 CONFIG_CMD_SPL_NAND_OFS=0x0
 CONFIG_CMD_ASKENV=y
 # CONFIG_CMD_FLASH is not set
-- 
2.20.1



More information about the U-Boot mailing list