return 0;
}
+#if CONFIG_IS_ENABLED(BOOTSTAGE)
void show_boot_progress(int val)
{
outb(val, POST_PORT);
}
+#endif
#if !defined(CONFIG_SYS_COREBOOT) && !defined(CONFIG_EFI_STUB)
/*
}
#endif /* CONFIG_RESET_PHY_R */
+#if CONFIG_IS_ENABLED(BOOTSTAGE)
#define GREEN_LED (1 << 14)
#define ORANGE_LED (1 << 15)
#define BOTH_LEDS (GREEN_LED | ORANGE_LED)
break;
}
}
+#endif
}
#endif /* CONFIG_RESET_PHY_R */
+#if CONFIG_IS_ENABLED(BOOTSTAGE)
#define GREEN_LED (1 << 14)
#define ORANGE_LED (1 << 15)
#define BOTH_LEDS (GREEN_LED | ORANGE_LED)
break;
}
}
+#endif
/*
* Function to set the LEDs in the state "Bootloader error"
*/
-static void leds_set_failure(int state)
+static void __maybe_unused leds_set_failure(int state)
{
#if defined(CONFIG_B_SAMPLE)
/* Turn all blue and green LEDs off */
}
#endif
-#ifdef CONFIG_SHOW_BOOT_PROGRESS
+#if CONFIG_IS_ENABLED(BOOTSTAGE)
static void bosch_check_reset_pin(void)
{
if (readl(GPIO1_BASE + OMAP_GPIO_IRQSTATUS_SET_0) & RESET_MASK) {
break;
}
}
+#endif
void arch_preboot_os(void)
{
leds_set_finish();
}
-#endif
}
#endif
-#ifdef CONFIG_SHOW_BOOT_PROGRESS
+#if CONFIG_IS_ENABLED(BOOTSTAGE)
void show_boot_progress(int progress)
{
if (progress > 0)
return ret;
}
+#if CONFIG_IS_ENABLED(BOOTSTAGE)
#define GPIO_DR 0x0
#define GPIO_GDIR 0x4
#define GPIO_ALT1 0x1
gpio_direction_output(LED_RED, 1);
}
}
+#endif
};
#endif
-#ifdef CONFIG_SHOW_BOOT_PROGRESS
+#if CONFIG_IS_ENABLED(BOOTSTAGE)
void show_boot_progress(int progress)
{
printf("%i\n", progress);
board_init_f_init_stack_protection();
}
+#if CONFIG_IS_ENABLED(BOOTSTAGE)
/*
* Board-specific Platform code can reimplement show_boot_progress () if needed
*/
__weak void show_boot_progress(int val) {}
+#endif
/* Define board data structure */
static struct bd_info bdata __attribute__ ((section(".data")));
+#if CONFIG_IS_ENABLED(BOOTSTAGE)
/*
* Board-specific Platform code can reimplement show_boot_progress () if needed
*/
__weak void show_boot_progress(int val) {}
+#endif
#if defined(CONFIG_SPL_OS_BOOT) || CONFIG_IS_ENABLED(HANDOFF) || \
defined(CONFIG_SPL_ATF)
#ifndef _BOOTSTAGE_H
#define _BOOTSTAGE_H
+#include <linux/kconfig.h>
+
/* Flags for each bootstage record */
enum bootstage_flags {
BOOTSTAGEF_ERROR = 1 << 0, /* Error record */
*/
ulong timer_get_boot_us(void);
-#if defined(USE_HOSTCC)
+#if defined(USE_HOSTCC) || !CONFIG_IS_ENABLED(BOOTSTAGE)
#define show_boot_progress(val) do {} while (0)
#else
/**