stm32: Check for CONFIG_HAVE_BOOTLOADER_REQUEST in dfu_reboot.c
Support disabling dfu_reboot if HAVE_BOOTLOADER_REQUEST is disabled in the Kconfig rules. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
parent
b51b068442
commit
1ff0a5494a
|
@ -31,7 +31,7 @@
|
||||||
void
|
void
|
||||||
dfu_reboot(void)
|
dfu_reboot(void)
|
||||||
{
|
{
|
||||||
if (!CONFIG_STM32_DFU_ROM_ADDRESS)
|
if (!CONFIG_STM32_DFU_ROM_ADDRESS || !CONFIG_HAVE_BOOTLOADER_REQUEST)
|
||||||
return;
|
return;
|
||||||
irq_disable();
|
irq_disable();
|
||||||
uint64_t *bflag = (void*)USB_BOOT_FLAG_ADDR;
|
uint64_t *bflag = (void*)USB_BOOT_FLAG_ADDR;
|
||||||
|
@ -46,7 +46,7 @@ dfu_reboot(void)
|
||||||
void
|
void
|
||||||
dfu_reboot_check(void)
|
dfu_reboot_check(void)
|
||||||
{
|
{
|
||||||
if (!CONFIG_STM32_DFU_ROM_ADDRESS)
|
if (!CONFIG_STM32_DFU_ROM_ADDRESS || !CONFIG_HAVE_BOOTLOADER_REQUEST)
|
||||||
return;
|
return;
|
||||||
if (*(uint64_t*)USB_BOOT_FLAG_ADDR != USB_BOOT_FLAG)
|
if (*(uint64_t*)USB_BOOT_FLAG_ADDR != USB_BOOT_FLAG)
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in New Issue