The return value of disable_interrupts for SPARC is incorrect (false when all interrupts were enabled). As it may be used to allow re-enabling, this may causes hangs up. Observed issue on FLASH write (flash_write_cfiword in drivers/mtd/cfi_flash.c)
Signed-off-by: Benoit Duhamel <benoit.duha...@alstom.com> --- arch/sparc/lib/interrupts.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/arch/sparc/lib/interrupts.c b/arch/sparc/lib/interrupts.c index cb73d17..1de2cec 100644 --- a/arch/sparc/lib/interrupts.c +++ b/arch/sparc/lib/interrupts.c @@ -44,7 +44,8 @@ void enable_interrupts(void) int disable_interrupts(void) { - return intLock(); + /* Return TRUE if interrupts were previously enabled */ + return intLock() < 15; } int interrupt_is_enabled(void) -- 1.7.1 ________________________________ CONFIDENTIALITY : This e-mail and any attachments are confidential and may be privileged. If you are not a named recipient, please notify the sender immediately and do not disclose the contents to another person, use it for any purpose or store or copy the information in any medium. _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot