public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Ovidiu Panait <ovpanait@gmail.com>
To: u-boot@lists.denx.de
Subject: [PATCH v2 1/3] common/board_r: arm: Merge initr_enable_interrupts into interrupts_init
Date: Mon, 20 Apr 2020 10:31:44 +0300	[thread overview]
Message-ID: <20200420073146.29787-1-ovpanait@gmail.com> (raw)

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>
---
v2 updates:
  - add reviewed-by tag

 arch/arm/lib/interrupts.c    |  2 ++
 arch/arm/lib/interrupts_64.c |  2 ++
 arch/arm/lib/interrupts_m.c  |  2 ++
 common/board_r.c             | 12 ------------
 4 files changed, 6 insertions(+), 12 deletions(-)

diff --git a/arch/arm/lib/interrupts.c b/arch/arm/lib/interrupts.c
index 6dbf03b00c..36299d6e54 100644
--- a/arch/arm/lib/interrupts.c
+++ b/arch/arm/lib/interrupts.c
@@ -34,6 +34,8 @@ int interrupt_init(void)
 	 */
 	IRQ_STACK_START_IN = gd->irq_sp + 8;
 
+	enable_interrupts();
+
 	return 0;
 }
 
diff --git a/arch/arm/lib/interrupts_64.c b/arch/arm/lib/interrupts_64.c
index dffdf57aa2..a2df7cf193 100644
--- a/arch/arm/lib/interrupts_64.c
+++ b/arch/arm/lib/interrupts_64.c
@@ -13,6 +13,8 @@ DECLARE_GLOBAL_DATA_PTR;
 
 int interrupt_init(void)
 {
+	enable_interrupts();
+
 	return 0;
 }
 
diff --git a/arch/arm/lib/interrupts_m.c b/arch/arm/lib/interrupts_m.c
index 1f6fdf2995..2ae1c5ba76 100644
--- a/arch/arm/lib/interrupts_m.c
+++ b/arch/arm/lib/interrupts_m.c
@@ -31,6 +31,8 @@ struct autosave_regs {
 
 int interrupt_init(void)
 {
+	enable_interrupts();
+
 	return 0;
 }
 
diff --git a/common/board_r.c b/common/board_r.c
index 0bbeaa7594..bdb0389e31 100644
--- a/common/board_r.c
+++ b/common/board_r.c
@@ -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
-- 
2.17.1

             reply	other threads:[~2020-04-20  7:31 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-20  7:31 Ovidiu Panait [this message]
2020-04-20  7:31 ` [PATCH v2 2/3] cmd/bedbug.c: Make bedbug_init have a return value Ovidiu Panait
2020-05-01 21:56   ` Tom Rini
2020-04-20  7:31 ` [PATCH v2 3/3] common/board_r: Drop initr_bedbug wrapper Ovidiu Panait
2020-05-01 21:56   ` Tom Rini
2020-05-01 21:55 ` [PATCH v2 1/3] common/board_r: arm: Merge initr_enable_interrupts into interrupts_init Tom Rini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200420073146.29787-1-ovpanait@gmail.com \
    --to=ovpanait@gmail.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox