From 851737ab8922742732bea5f70407cb95cafcb3ee Mon Sep 17 00:00:00 2001 From: Roman Kovalivskyi Date: Tue, 28 Jul 2020 23:35:32 +0300 Subject: fastboot: Extend fastboot_set_reboot_flag with reboot reason Extend fastboot_set_reboot_flag arguments with reboot reason so that it could handle different reboot cases in future. Signed-off-by: Roman Kovalivskyi --- arch/arm/mach-meson/board-common.c | 6 +++++- arch/arm/mach-rockchip/board.c | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) (limited to 'arch') diff --git a/arch/arm/mach-meson/board-common.c b/arch/arm/mach-meson/board-common.c index 0f21ec8e53..7ea0ed4794 100644 --- a/arch/arm/mach-meson/board-common.c +++ b/arch/arm/mach-meson/board-common.c @@ -5,6 +5,7 @@ #include #include +#include #include #include #include @@ -153,8 +154,11 @@ int board_late_init(void) #if CONFIG_IS_ENABLED(FASTBOOT) static unsigned int reboot_reason = REBOOT_REASON_NORMAL; -int fastboot_set_reboot_flag() +int fastboot_set_reboot_flag(enum fastboot_reboot_reason reason) { + if (reason != FASTBOOT_REBOOT_REASON_BOOTLOADER) + return -ENOTSUPP; + reboot_reason = REBOOT_REASON_BOOTLOADER; printf("Using reboot reason: 0x%x\n", reboot_reason); diff --git a/arch/arm/mach-rockchip/board.c b/arch/arm/mach-rockchip/board.c index 430c0cbf41..ba4da72b39 100644 --- a/arch/arm/mach-rockchip/board.c +++ b/arch/arm/mach-rockchip/board.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include @@ -152,8 +153,11 @@ int board_usb_init(int index, enum usb_init_type init) #endif /* CONFIG_USB_GADGET */ #if CONFIG_IS_ENABLED(FASTBOOT) -int fastboot_set_reboot_flag(void) +int fastboot_set_reboot_flag(enum fastboot_reboot_reason reason) { + if (reason != FASTBOOT_REBOOT_REASON_BOOTLOADER) + return -ENOTSUPP; + printf("Setting reboot to fastboot flag ...\n"); /* Set boot mode to fastboot */ writel(BOOT_FASTBOOT, CONFIG_ROCKCHIP_BOOT_MODE_REG); -- cgit From 27c803848b29ec89e4d1561a509b6bcd95c896b7 Mon Sep 17 00:00:00 2001 From: Peng Fan Date: Tue, 18 Aug 2020 18:16:47 +0800 Subject: spl: add g_dnl_get_board_bcd_device_number Add g_dnl_get_board_bcd_device_number, the new BCD value is used by uuu to distinguish if the SPL supports the SDPV. Signed-off-by: Peng Fan Reviewed-by: Lukasz Majewski --- arch/arm/mach-imx/spl.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'arch') diff --git a/arch/arm/mach-imx/spl.c b/arch/arm/mach-imx/spl.c index 76a5f7aca6..aa2686bb92 100644 --- a/arch/arm/mach-imx/spl.c +++ b/arch/arm/mach-imx/spl.c @@ -187,6 +187,12 @@ int g_dnl_bind_fixup(struct usb_device_descriptor *dev, const char *name) return 0; } + +#define SDPV_BCD_DEVICE 0x500 +int g_dnl_get_board_bcd_device_number(int gcnum) +{ + return SDPV_BCD_DEVICE; +} #endif #if defined(CONFIG_SPL_MMC_SUPPORT) -- cgit