mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Herve Codina <Herve.CODINA@celad.com>
To: barebox@lists.infradead.org
Cc: Herve Codina <Herve.CODINA@celad.com>
Subject: [PATCH 4/4] exitcall: move board_shutdown to exitcall infrastructure
Date: Mon, 6 Jul 2015 09:36:46 +0200	[thread overview]
Message-ID: <1436168207-6433-5-git-send-email-Herve.CODINA@celad.com> (raw)
In-Reply-To: <1436168207-6433-1-git-send-email-Herve.CODINA@celad.com>

Signed-off-by: Herve Codina <Herve.CODINA@celad.com>
---
 arch/arm/boards/animeo_ip/init.c |    2 +-
 common/startup.c                 |    5 -----
 include/common.h                 |    1 -
 3 files changed, 1 insertion(+), 7 deletions(-)

diff --git a/arch/arm/boards/animeo_ip/init.c b/arch/arm/boards/animeo_ip/init.c
index 0fda013..2069ab3 100644
--- a/arch/arm/boards/animeo_ip/init.c
+++ b/arch/arm/boards/animeo_ip/init.c
@@ -346,6 +346,7 @@ static void animeo_ip_shutdown(void)
 	animeo_ip_shutdown_uart(IOMEM(AT91SAM9260_BASE_US0));
 	animeo_ip_shutdown_uart(IOMEM(AT91SAM9260_BASE_US1));
 }
+postdevshutdown_exitcall(animeo_ip_shutdown);
 
 static int animeo_ip_console_init(void)
 {
@@ -353,7 +354,6 @@ static int animeo_ip_console_init(void)
 
 	usart0 = at91_register_uart(1, ATMEL_UART_RTS);
 	usart1 = at91_register_uart(2, ATMEL_UART_RTS);
-	board_shutdown = animeo_ip_shutdown;
 
 	barebox_set_model("Somfy Animeo IP");
 	barebox_set_hostname("animeoip");
diff --git a/common/startup.c b/common/startup.c
index 4ed390c..dc12415 100644
--- a/common/startup.c
+++ b/common/startup.c
@@ -135,8 +135,6 @@ void __noreturn hang (void)
 	for (;;);
 }
 
-void (*board_shutdown)(void);
-
 /* Everything needed to cleanly shutdown barebox.
  * Should be called before starting an OS to get
  * the devices into a clean state
@@ -150,7 +148,4 @@ void shutdown_barebox(void)
 		pr_debug("exitcall-> %pS\n", *exitcall);
 		(*exitcall)();
 	}
-	
-	if (board_shutdown)
-		board_shutdown();
 }
diff --git a/include/common.h b/include/common.h
index 6766c02..6b9dd4d 100644
--- a/include/common.h
+++ b/include/common.h
@@ -116,7 +116,6 @@ extern int (*barebox_main)(void);
 
 void __noreturn start_barebox(void);
 void shutdown_barebox(void);
-extern void (*board_shutdown)(void);
 
 /*
  * architectures which have special calling conventions for
-- 
1.7.9.5


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  parent reply	other threads:[~2015-07-06  7:37 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-06  7:36 [PATCH 0/4] " Herve Codina
2015-07-06  7:36 ` [PATCH 1/4] exitcall: Add " Herve Codina
2015-07-06  7:36 ` [PATCH 2/4] exitcall: move device_shutdown to " Herve Codina
2015-07-06  7:36 ` [PATCH 3/4] exitcall: move arch_shutdown " Herve Codina
2015-07-06  7:36 ` Herve Codina [this message]
2015-07-06 11:52 ` [PATCH 0/4] " Sascha Hauer
2015-07-06 12:19   ` Herve Codina

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=1436168207-6433-5-git-send-email-Herve.CODINA@celad.com \
    --to=herve.codina@celad.com \
    --cc=barebox@lists.infradead.org \
    /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