From patchwork Tue Jul 24 21:36:24 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 142833 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp65400ljj; Tue, 24 Jul 2018 14:37:10 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcWCNXG92Q/FcMRd92lxfffrj8jAdxiYd50gf8aJxcCtgbv8pHxK8RE+ufxyxXmONIXuXPb X-Received: by 2002:a63:6004:: with SMTP id u4-v6mr17803630pgb.441.1532468230144; Tue, 24 Jul 2018 14:37:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532468230; cv=none; d=google.com; s=arc-20160816; b=tOHLx1lkk6/G/6VVSVSxfnB0bziF6kycf8MpIXtneZGSXBtINZsUU3EH08bPyGSCG/ gSg0m1JjS3n6wXJ3WncNmkJcLBZNvkQ7JoEWkRhLsHDdzx5A1Sq+71Ua/rmsF2Rxk1F8 m8ZJLce+ZfO44rSXO08M5rNRKvptuaGJy9l59cv7tXFG9WXX7PCrPC0Ug5UngTKDfSuD tGIryRfeL2HJ/T196XOwXxiAQujl0DJC6hhVIBuzBW3pztHF5c3hpb/ae9MpGn9Zi2pq c16WMZSnrj1yz5ZSQNOsJy0YpCwHYLk8CUESbRAZGBO3pNvubbUED244YvIQ2VWuqoyg DNbw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=iFGrG2zKeV2/0tbporOfWcKIfSrSYd4/0zo5fdGCGpE=; b=UhDR+TS8ebN3Riz7dYOeJt6YO2HIBEWsD96V2DRwatHEPR/SZKF3Jme6PHgvMMit1N fz3RAH5KfIiY6z7Iv12d3dH6MwhE3naIOVPETXTjFR5ILSQ3MDGaVty80Jaespc5Vbel FZvJvjSitekFUXW3juAXyxu4eqtI7gUWJ9DxqXHXZwWTsi8HG4N8ZT6HgZi3+m0FgSmB MeCnsN+fdkxjwQjoAUqXJvYuN/8tlORf3HFfWhv6kAwEiwYa5fi8GS2IT+daq1A5WQEj gyEM39DwzvNjZN5ZLBr9gV0VdGxAmP4x2yucgpUbUx+Tpsxx51i7NOunH4FtHMP0ukQk Y/MA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y5-v6si11723429pgc.493.2018.07.24.14.37.09; Tue, 24 Jul 2018 14:37:10 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727985AbeGXWpR (ORCPT + 31 others); Tue, 24 Jul 2018 18:45:17 -0400 Received: from mout.kundenserver.de ([212.227.126.187]:50214 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727353AbeGXWpR (ORCPT ); Tue, 24 Jul 2018 18:45:17 -0400 Received: from wuerfel.lan ([109.193.40.16]) by mrelayeu.kundenserver.de (mreue006 [212.227.15.129]) with ESMTPA (Nemesis) id 0LaNXn-1gQExR41BX-00mGC6; Tue, 24 Jul 2018 23:36:35 +0200 From: Arnd Bergmann To: dalias@libc.org Cc: ysato@users.sourceforge.jp, baolin.wang@linaro.org, y2038@lists.linaro.org, linux-sh@vger.kernel.org, linux-kernel@vger.kernel.org, Arnd Bergmann Subject: [PATCH v2 4/4] sh: remove board_time_init() callback Date: Tue, 24 Jul 2018 23:36:24 +0200 Message-Id: <20180724213624.3899336-4-arnd@arndb.de> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180724213624.3899336-1-arnd@arndb.de> References: <20180724213624.3899336-1-arnd@arndb.de> X-Provags-ID: V03:K1:ZIgKU6i9R1fUvipMJQ5XnC7WK7Kl7pHPhsRQgqorIIQraZm0/xW si+aR951mBzu8QwQg0Ljmmav1LriJa9x6ZaoFJTixhiZdRKEUNfviZ1+0TaM+XvOHU3jat/ ILB1740/tuT8v7ISq5RajA8Z7xD4xG6eLhtt9IMhUa/d0oWJkNvcBCWOB9cuQoEXqJgpQhq 9OmabJJGWUbSGHmCicXWA== X-UI-Out-Filterresults: notjunk:1; V01:K0:FOwVERHe538=:hha4BmIKFU6ccpw912TdQz cbJ+tA4AizkZqJ0ODpqiSR95yOL1QJdsE5uql7nRe4nacR5slhhPFch+W7U2ZEP6kOEwGr3Er cW2FnP5woxm3yYnTWAqAmtjLhKuYKtTJlLBKZ1OoDiOhIeO7ULcCLa+JhyGhcLQGBHyX9LPa4 QF79HOZ0XFPONs/KDcPnXc3J71IvGEJ1O3lq3B5YwETZ87/SiTc6GUfVujd9MsANP+PoiQgng nP/yo4LYkytzu2uKxFIvRw9raKLQdShYBlNsBQnnbHpYun5h6p43vGQUXBhkcMDyLLmtFZGYa t92cvST3wcO7jGe8nxXUaAsS2JMxIE4adqsNU9WsTryjC3hcWxLq8N6LzKAFwcBX16j1aK71Y W2yHT117+hfQkpCw+iH14jRtUlYGEtEazbdmUmpydNc1Ozr1Z2exTuV1G+ywUVXKf/DqM7YYT ENhWsXpnkkRe8Z47TNRdwhQhLiwoiRxb4xw8cjFECoi53kdCVI2X4giOoY83D6mqvj0SKfjrg V3x7Pz9Q46EDzrBLi6Lk/mZAP8dJP3wMYpfH7466tAJAbvzSRWtKpyF4HgU7YXaME2XuvU2dK gUisS1UxFZDLAd7TWg02vUREeqWgHWU/alG6K+ZsFCrxJTz9WYg6bOewaJFWeNMRP06QU4vub r/KZbj1nbjz34ny0IKEgbQZ4pmfwOMWmYzqTNMdxmtQ8QK3tJcyfczQu/ZciPM1aqYYc= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- v2: fix a typo as pointed out by the kbuild bot --- Documentation/sh/new-machine.txt | 8 -------- arch/sh/boards/of-generic.c | 8 -------- arch/sh/include/asm/rtc.h | 1 - arch/sh/kernel/time.c | 5 +---- 4 files changed, 1 insertion(+), 21 deletions(-) -- 2.18.0 diff --git a/Documentation/sh/new-machine.txt b/Documentation/sh/new-machine.txt index f0354164cb0e..e0961a66130b 100644 --- a/Documentation/sh/new-machine.txt +++ b/Documentation/sh/new-machine.txt @@ -116,7 +116,6 @@ might look something like: * arch/sh/boards/vapor/setup.c - Setup code for imaginary board */ #include -#include /* 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 ... */ diff --git a/arch/sh/boards/of-generic.c b/arch/sh/boards/of-generic.c index 26789ad28193..04d9a666f924 100644 --- a/arch/sh/boards/of-generic.c +++ b/arch/sh/boards/of-generic.c @@ -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) { diff --git a/arch/sh/include/asm/rtc.h b/arch/sh/include/asm/rtc.h index fe55fbb181aa..69dbae2949b0 100644 --- a/arch/sh/include/asm/rtc.h +++ b/arch/sh/include/asm/rtc.h @@ -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) diff --git a/arch/sh/kernel/time.c b/arch/sh/kernel/time.c index eb0a91270499..8a1c6c8ab4ec 100644 --- a/arch/sh/kernel/time.c +++ b/arch/sh/kernel/time.c @@ -22,8 +22,6 @@ #include #include -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();