From 5ce904b20faa031e70f6e375b8b8d242c7ac9e94 Mon Sep 17 00:00:00 2001 From: Werner Almesberger Date: Wed, 25 Aug 2010 04:30:28 -0300 Subject: [PATCH] Introduce PLATFORM_ENTER, replacing the old PLATFORM_SETUP for DFU mode setup. PLATFORM_SETUP now performs early general platform setup, such as turning off the watchdog. - fw/boot/boot.c (main): the first thing we do is to run PLATFORM_SETUP - fw/boot/boot.c (boot_loader): instead of PLATFORM_SETUP, run PLATFORM_ENTER --- fw/boot/boot.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/fw/boot/boot.c b/fw/boot/boot.c index 2ce765f..fa55101 100644 --- a/fw/boot/boot.c +++ b/fw/boot/boot.c @@ -56,6 +56,10 @@ #define PLATFORM_SETUP #endif +#ifndef PLATFORM_ENTER +#define PLATFORM_ENTER +#endif + #ifndef PLATFORM_EXIT #define PLATFORM_EXIT #endif @@ -174,7 +178,7 @@ static void boot_loader(void) printk("%s #%u\n", build_date, build_number); - PLATFORM_SETUP; + PLATFORM_ENTER; dfu_init(); usb_init(); @@ -205,6 +209,11 @@ static void boot_loader(void) void main(void) { + /* + * Any early platform setup, such as turning off the watch dog. + */ + PLATFORM_SETUP; + /* * VDD monitor enable sequence, section 7.2 *