* [PATCH v2 1/3] common/board_r: arm: Merge initr_enable_interrupts into interrupts_init
@ 2020-04-20 7:31 Ovidiu Panait
2020-04-20 7:31 ` [PATCH v2 2/3] cmd/bedbug.c: Make bedbug_init have a return value Ovidiu Panait
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Ovidiu Panait @ 2020-04-20 7:31 UTC (permalink / raw)
To: u-boot
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
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH v2 2/3] cmd/bedbug.c: Make bedbug_init have a return value
2020-04-20 7:31 [PATCH v2 1/3] common/board_r: arm: Merge initr_enable_interrupts into interrupts_init Ovidiu Panait
@ 2020-04-20 7:31 ` 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:55 ` [PATCH v2 1/3] common/board_r: arm: Merge initr_enable_interrupts into interrupts_init Tom Rini
2 siblings, 1 reply; 6+ messages in thread
From: Ovidiu Panait @ 2020-04-20 7:31 UTC (permalink / raw)
To: u-boot
Do this as a preparation for removing initr_bedbug wrapper from
common/board_r.c.
Signed-off-by: Ovidiu Panait <ovpanait@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
---
v2 updates:
- fix checkpatch warnings
- add reviewed-by tag
cmd/bedbug.c | 4 ++--
include/bedbug/type.h | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/cmd/bedbug.c b/cmd/bedbug.c
index 9fee528830..7cb6378352 100644
--- a/cmd/bedbug.c
+++ b/cmd/bedbug.c
@@ -44,10 +44,10 @@ int bedbug_puts (const char *str)
* settings.
* ====================================================================== */
-void bedbug_init (void)
+int bedbug_init(void)
{
/* -------------------------------------------------- */
- return;
+ return 0;
} /* bedbug_init */
diff --git a/include/bedbug/type.h b/include/bedbug/type.h
index b7b447b1fe..5008b40ca8 100644
--- a/include/bedbug/type.h
+++ b/include/bedbug/type.h
@@ -3,7 +3,7 @@
/* Supporting routines */
int bedbug_puts (const char *);
-void bedbug_init (void);
+int bedbug_init(void);
void bedbug860_init (void);
void do_bedbug_breakpoint (struct pt_regs *);
void bedbug_main_loop (unsigned long, struct pt_regs *);
--
2.17.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH v2 3/3] common/board_r: Drop initr_bedbug wrapper
2020-04-20 7:31 [PATCH v2 1/3] common/board_r: arm: Merge initr_enable_interrupts into interrupts_init Ovidiu Panait
2020-04-20 7:31 ` [PATCH v2 2/3] cmd/bedbug.c: Make bedbug_init have a return value Ovidiu Panait
@ 2020-04-20 7:31 ` 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
2 siblings, 1 reply; 6+ messages in thread
From: Ovidiu Panait @ 2020-04-20 7:31 UTC (permalink / raw)
To: u-boot
Drop initr_bedbug wrapper and call bedbug_init directly during the init
sequence.
Signed-off-by: Ovidiu Panait <ovpanait@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
---
v2 updates:
- add reviewed-by tag
common/board_r.c | 11 +----------
1 file changed, 1 insertion(+), 10 deletions(-)
diff --git a/common/board_r.c b/common/board_r.c
index bdb0389e31..d9015cd057 100644
--- a/common/board_r.c
+++ b/common/board_r.c
@@ -637,15 +637,6 @@ int initr_mem(void)
}
#endif
-#ifdef CONFIG_CMD_BEDBUG
-static int initr_bedbug(void)
-{
- bedbug_init();
-
- return 0;
-}
-#endif
-
static int run_main_loop(void)
{
#ifdef CONFIG_SANDBOX
@@ -848,7 +839,7 @@ static init_fnc_t init_sequence_r[] = {
#endif
#ifdef CONFIG_CMD_BEDBUG
INIT_FUNC_WATCHDOG_RESET
- initr_bedbug,
+ bedbug_init,
#endif
#if defined(CONFIG_PRAM)
initr_mem,
--
2.17.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH v2 1/3] common/board_r: arm: Merge initr_enable_interrupts into interrupts_init
2020-04-20 7:31 [PATCH v2 1/3] common/board_r: arm: Merge initr_enable_interrupts into interrupts_init Ovidiu Panait
2020-04-20 7:31 ` [PATCH v2 2/3] cmd/bedbug.c: Make bedbug_init have a return value Ovidiu Panait
2020-04-20 7:31 ` [PATCH v2 3/3] common/board_r: Drop initr_bedbug wrapper Ovidiu Panait
@ 2020-05-01 21:55 ` Tom Rini
2 siblings, 0 replies; 6+ messages in thread
From: Tom Rini @ 2020-05-01 21:55 UTC (permalink / raw)
To: u-boot
On Mon, Apr 20, 2020 at 10:31:44AM +0300, Ovidiu Panait wrote:
> 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>
Applied to u-boot/master, thanks!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200501/c4085462/attachment.sig>
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v2 2/3] cmd/bedbug.c: Make bedbug_init have a return value
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
0 siblings, 0 replies; 6+ messages in thread
From: Tom Rini @ 2020-05-01 21:56 UTC (permalink / raw)
To: u-boot
On Mon, Apr 20, 2020 at 10:31:45AM +0300, Ovidiu Panait wrote:
> Do this as a preparation for removing initr_bedbug wrapper from
> common/board_r.c.
>
> Signed-off-by: Ovidiu Panait <ovpanait@gmail.com>
> Reviewed-by: Simon Glass <sjg@chromium.org>
Applied to u-boot/master, thanks!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200501/1d56c0e4/attachment.sig>
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v2 3/3] common/board_r: Drop initr_bedbug wrapper
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
0 siblings, 0 replies; 6+ messages in thread
From: Tom Rini @ 2020-05-01 21:56 UTC (permalink / raw)
To: u-boot
On Mon, Apr 20, 2020 at 10:31:46AM +0300, Ovidiu Panait wrote:
> Drop initr_bedbug wrapper and call bedbug_init directly during the init
> sequence.
>
> Signed-off-by: Ovidiu Panait <ovpanait@gmail.com>
> Reviewed-by: Simon Glass <sjg@chromium.org>
Applied to u-boot/master, thanks!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200501/a06eeedf/attachment.sig>
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2020-05-01 21:56 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-04-20 7:31 [PATCH v2 1/3] common/board_r: arm: Merge initr_enable_interrupts into interrupts_init Ovidiu Panait
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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox