diff mbox series

[v4,12/18] common: board_r: Drop initr_xen wrapper

Message ID 20201128084320.10164-13-ovidiu.panait@windriver.com
State Accepted
Delegated to: Tom Rini
Headers show
Series Minor board_f/board_r cleanups | expand

Commit Message

Ovidiu Panait Nov. 28, 2020, 8:43 a.m. UTC
Add a return value to xen_init and use it directly in the
post-relocation init sequence, rather than using a wrapper stub.

Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
---
v4 updates:
- none

v3 updates:
- none

v2 updates:
- add reviewed-by tag

 common/board_r.c         | 10 +---------
 drivers/xen/hypervisor.c |  4 +++-
 include/xen.h            |  2 +-
 3 files changed, 5 insertions(+), 11 deletions(-)

Comments

Tom Rini Jan. 16, 2021, 4:23 p.m. UTC | #1
On Sat, Nov 28, 2020 at 10:43:14AM +0200, Ovidiu Panait wrote:

> Add a return value to xen_init and use it directly in the
> post-relocation init sequence, rather than using a wrapper stub.
> 
> Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>
> Reviewed-by: Simon Glass <sjg@chromium.org>

Applied to u-boot/master, thanks!
diff mbox series

Patch

diff --git a/common/board_r.c b/common/board_r.c
index 48e898b586..a5cbbcc343 100644
--- a/common/board_r.c
+++ b/common/board_r.c
@@ -428,14 +428,6 @@  static int initr_mmc(void)
 }
 #endif
 
-#ifdef CONFIG_XEN
-static int initr_xen(void)
-{
-	xen_init();
-	return 0;
-}
-#endif
-
 #ifdef CONFIG_PVBLOCK
 static int initr_pvblock(void)
 {
@@ -743,7 +735,7 @@  static init_fnc_t init_sequence_r[] = {
 	initr_mmc,
 #endif
 #ifdef CONFIG_XEN
-	initr_xen,
+	xen_init,
 #endif
 #ifdef CONFIG_PVBLOCK
 	initr_pvblock,
diff --git a/drivers/xen/hypervisor.c b/drivers/xen/hypervisor.c
index 178c206f5b..2560894832 100644
--- a/drivers/xen/hypervisor.c
+++ b/drivers/xen/hypervisor.c
@@ -232,7 +232,7 @@  void clear_evtchn(uint32_t port)
 	synch_clear_bit(port, &s->evtchn_pending[0]);
 }
 
-void xen_init(void)
+int xen_init(void)
 {
 	debug("%s\n", __func__);
 
@@ -240,6 +240,8 @@  void xen_init(void)
 	init_events();
 	init_xenbus();
 	init_gnttab();
+
+	return 0;
 }
 
 void xen_fini(void)
diff --git a/include/xen.h b/include/xen.h
index a952a2c84b..868132156e 100644
--- a/include/xen.h
+++ b/include/xen.h
@@ -11,7 +11,7 @@ 
  * Map Xen memory pages, initialize event handler and xenbus,
  * setup the grant table.
  */
-void xen_init(void);
+int xen_init(void);
 
 /**
  * xen_fini() - Board cleanup before Linux kernel start