[PATCH 44/50] ARM: vexpress: Drop unnecessary initcall

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Call vexpress_restart_register_feature() from vexpress_*init() to
get rid of an unnecessary initcall.

Signed-off-by: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>
---
 arch/arm/mach-vexpress/reset.c   | 9 ++++-----
 arch/arm/mach-vexpress/v2m.c     | 5 +++--
 include/mach/vexpress/vexpress.h | 6 ++++++
 3 files changed, 13 insertions(+), 7 deletions(-)
 create mode 100644 include/mach/vexpress/vexpress.h

diff --git a/arch/arm/mach-vexpress/reset.c b/arch/arm/mach-vexpress/reset.c
index f0fa75330e..0d626db7d7 100644
--- a/arch/arm/mach-vexpress/reset.c
+++ b/arch/arm/mach-vexpress/reset.c
@@ -9,7 +9,7 @@
 #include <init.h>
 #include <restart.h>
 #include <linux/amba/sp805.h>
-
+#include <mach/vexpress/vexpress.h>
 #include <mach/vexpress/devices.h>
 
 void __iomem *v2m_wdt_base;
@@ -22,10 +22,9 @@ static void __noreturn vexpress_reset_soc(struct restart_handler *rst)
 	hang();
 }
 
-static int restart_register_feature(void)
+void vexpress_restart_register_feature(void __iomem *base)
 {
-	restart_handler_register_fn("soc-wdt", vexpress_reset_soc);
+	v2m_wdt_base = base;
 
-	return 0;
+	restart_handler_register_fn("soc-wdt", vexpress_reset_soc);
 }
-coredevice_initcall(restart_register_feature);
diff --git a/arch/arm/mach-vexpress/v2m.c b/arch/arm/mach-vexpress/v2m.c
index 9181d7e2ef..5c4c2478cf 100644
--- a/arch/arm/mach-vexpress/v2m.c
+++ b/arch/arm/mach-vexpress/v2m.c
@@ -8,6 +8,7 @@
 #include <io.h>
 #include <asm/hardware/sp810.h>
 #include <mach/vexpress/devices.h>
+#include <mach/vexpress/vexpress.h>
 
 void __iomem *v2m_sysreg_base;
 
@@ -26,12 +27,12 @@ static void v2m_sysctl_init(void __iomem *base)
 
 void vexpress_a9_legacy_init(void)
 {
-	v2m_wdt_base = IOMEM(0x1000f000);
 	v2m_sysctl_init(IOMEM(0x10001000));
+	vexpress_restart_register_feature(IOMEM(0x1000f000));
 }
 
 void vexpress_init(void)
 {
-	v2m_wdt_base = IOMEM(0x1c0f0000);
 	v2m_sysctl_init(IOMEM(0x1c020000));
+	vexpress_restart_register_feature(IOMEM(0x1c0f0000));
 }
diff --git a/include/mach/vexpress/vexpress.h b/include/mach/vexpress/vexpress.h
new file mode 100644
index 0000000000..768a3ab07a
--- /dev/null
+++ b/include/mach/vexpress/vexpress.h
@@ -0,0 +1,6 @@
+#ifndef __MACH_VEXPRESS_VEXPRESS_H
+#define __MACH_VEXPRESS_VEXPRESS_H
+
+void vexpress_restart_register_feature(void __iomem *base);
+
+#endif /* __MACH_VEXPRESS_VEXPRESS_H */
-- 
2.30.2





[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux