From 88cae9d13dcb7164d2445dca837ed76ac405ecd5 Mon Sep 17 00:00:00 2001 From: Solomon Peachy Date: Tue, 1 Jan 2019 23:27:24 -0500 Subject: Coldfire: Don't clobber alwarm wakeup signal in dualboot mode (See FS#7814 for details) Change-Id: I6a09a8dfe1abc3a396ca8afe1dbbf1d203c7e3e2 --- firmware/target/coldfire/crt0.S | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'firmware/target/coldfire/crt0.S') diff --git a/firmware/target/coldfire/crt0.S b/firmware/target/coldfire/crt0.S index 5e73131894..34492ec853 100644 --- a/firmware/target/coldfire/crt0.S +++ b/firmware/target/coldfire/crt0.S @@ -46,6 +46,10 @@ start: lea MBAR2, %a1 move.l (%a1), %a0 /* store GPIO_READ result for button check in main() */ + tst.b 0x30000000 /* preloader sets this to 1 + if woke up due to RTC alarm */ + bne .loadrockbox + /* Wait ~3 seconds for ON-button release. We need roughly 300ns per iteration, so we check 10000000 times to reach the desired delay */ move.l #10000000, %d0 -- cgit v1.2.3