]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
sh: remove board_time_init() callback
authorArnd Bergmann <arnd@arndb.de>
Fri, 20 Apr 2018 15:46:39 +0000 (17:46 +0200)
committerArnd Bergmann <arnd@arndb.de>
Tue, 18 Dec 2018 15:13:04 +0000 (16:13 +0100)
The only remaining user of board_time_init() is the of-generic
machine, and that just calls the global timer_init() function.
Calling that one has no effect on non-DT platforms, so we can
simply call it unconditionally in place of board_time_init().

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Documentation/sh/new-machine.txt
arch/sh/boards/of-generic.c
arch/sh/include/asm/rtc.h
arch/sh/kernel/time.c

index f0354164cb0e4cea15670373b4b3db0e6cf80e42..e0961a66130b0965abb211d34ca20159b47640d1 100644 (file)
@@ -116,7 +116,6 @@ might look something like:
  * arch/sh/boards/vapor/setup.c - Setup code for imaginary board
  */
 #include <linux/init.h>
-#include <asm/rtc.h> /* for board_time_init() */
 
 const char *get_system_type(void)
 {
@@ -132,13 +131,6 @@ int __init platform_setup(void)
         * this board.
         */
 
-       /* 
-        * Presume all FooTech boards have the same broken timer,
-        * and also presume that we've defined foo_timer_init to
-        * do something useful.
-        */
-       board_time_init = foo_timer_init;
-
        /* Start-up imaginary PCI ... */
 
        /* And whatever else ... */
index cde370cad4ae3c0b447929a63e6d197c0a38f562..6e9786548ac652f107600a2e4755ed78d341d898 100644 (file)
@@ -117,18 +117,10 @@ static void __init sh_of_mem_reserve(void)
        early_init_fdt_scan_reserved_mem();
 }
 
-static void __init sh_of_time_init(void)
-{
-       pr_info("SH generic board support: scanning for clocksource devices\n");
-       timer_probe();
-}
-
 static void __init sh_of_setup(char **cmdline_p)
 {
        struct device_node *root;
 
-       board_time_init = sh_of_time_init;
-
        sh_mv.mv_name = "Unknown SH model";
        root = of_find_node_by_path("/");
        if (root) {
index fe55fbb181aa4ed845627fcf87e6d41f478238ac..69dbae2949b0dd679d8fe7a47050c4962b7aaf24 100644 (file)
@@ -3,7 +3,6 @@
 #define _ASM_RTC_H
 
 void time_init(void);
-extern void (*board_time_init)(void);
 
 #define RTC_CAP_4_DIGIT_YEAR   (1 << 0)
 
index eb0a91270499bbd528d804e907ff9ef6f0aa06aa..8a1c6c8ab4ec9698b7f079c418e33f1775bc2791 100644 (file)
@@ -22,8 +22,6 @@
 #include <asm/clock.h>
 #include <asm/rtc.h>
 
-void (*board_time_init)(void);
-
 static void __init sh_late_time_init(void)
 {
        /*
@@ -41,8 +39,7 @@ static void __init sh_late_time_init(void)
 
 void __init time_init(void)
 {
-       if (board_time_init)
-               board_time_init();
+       timer_probe();
 
        clk_init();