]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
common/board_r: arm: Merge initr_enable_interrupts into interrupts_init
authorOvidiu Panait <ovpanait@gmail.com>
Mon, 20 Apr 2020 07:31:44 +0000 (10:31 +0300)
committerTom Rini <trini@konsulko.com>
Fri, 1 May 2020 15:34:01 +0000 (11:34 -0400)
initr_enable_interrupts() is an ARM-specific wrapper over
enable_interrupts(), which is run during the common init sequence. It can
be eliminated by moving the enable_interrupts() call to the end of
interrupt_init() function, in arch/arm/lib/interrupts*.c.

Signed-off-by: Ovidiu Panait <ovpanait@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
arch/arm/lib/interrupts.c
arch/arm/lib/interrupts_64.c
arch/arm/lib/interrupts_m.c
common/board_r.c

index 6dbf03b00cd5c98ac0eeb61b2296cfe4a14e072a..36299d6e54315d196db182e8110a02b3febf1ae1 100644 (file)
@@ -34,6 +34,8 @@ int interrupt_init(void)
         */
        IRQ_STACK_START_IN = gd->irq_sp + 8;
 
+       enable_interrupts();
+
        return 0;
 }
 
index dffdf57aa2029127e2e856f141e035f793ccc69b..a2df7cf193c57966b8db2e634de58e6e1d1f3567 100644 (file)
@@ -13,6 +13,8 @@ DECLARE_GLOBAL_DATA_PTR;
 
 int interrupt_init(void)
 {
+       enable_interrupts();
+
        return 0;
 }
 
index 1f6fdf2995d88633496a3e7287d6a8d2972e7d1d..2ae1c5ba76c937e420014b6a77e3abe48729c766 100644 (file)
@@ -31,6 +31,8 @@ struct autosave_regs {
 
 int interrupt_init(void)
 {
+       enable_interrupts();
+
        return 0;
 }
 
index 0bbeaa7594c6bbbcbc9274a238581bf8d02526ca..bdb0389e31a19d0251000e3981f232df602aa100 100644 (file)
@@ -518,15 +518,6 @@ static int initr_api(void)
 }
 #endif
 
-/* enable exceptions */
-#ifdef CONFIG_ARM
-static int initr_enable_interrupts(void)
-{
-       enable_interrupts();
-       return 0;
-}
-#endif
-
 #ifdef CONFIG_CMD_NET
 static int initr_ethaddr(void)
 {
@@ -813,9 +804,6 @@ static init_fnc_t init_sequence_r[] = {
        initr_kgdb,
 #endif
        interrupt_init,
-#ifdef CONFIG_ARM
-       initr_enable_interrupts,
-#endif
 #if defined(CONFIG_MICROBLAZE) || defined(CONFIG_M68K)
        timer_init,             /* initialize timer */
 #endif