From patchwork Thu Sep 7 13:41:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 137674 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:ab0a:0:b0:3f2:4152:657d with SMTP id m10csp60922vqo; Thu, 7 Sep 2023 11:00:41 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHH7LVjstAEL3ijGbrs+BBBLneHc8p7E9Jr88AO9FszIxAZljll+19yZ0U5r9FaKbcUPmZy X-Received: by 2002:a05:6a20:4422:b0:134:d4d3:f0a5 with SMTP id ce34-20020a056a20442200b00134d4d3f0a5mr472734pzb.2.1694109640577; Thu, 07 Sep 2023 11:00:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694109640; cv=none; d=google.com; s=arc-20160816; b=TPcPEEu9HnuegHQl6lp05s9Tw77kPM2pzUra2Pi7vvfn6PRt3YuhpR4AZXWgwSZfvr by3ILdErlx+8CZxvjZOdg3krhHGbDXtYr5JrGhD5MW/PgmQ/Xgso+5FW2beYmNbzrLWw DQ575UoyG929zmgBjfdgJ84o6msiSO6zxSrOyrr+uqBk8Uxxs3E6dLoAXg1Q6+iWSICj 3R0GYPwFCqDImLEgqeKtjVRtKJsXo26PqvAXzLDsb1AQdxISQ7DRrBvJjdsSRfhJuaNs RuINXx0avXe8Gi6WReKQQZxHVXbxDwDDhSfhKXhfpMEPZsREF6PWusVnHwdSp2JuyeG8 FZ7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=zVI2LKGDdWW4o2b3wuqf/37BYer+Wyg8omwDEWOM/Ik=; fh=fKMC3BTGjlLXl5EvEhzqt3WHCynqYJKK7wAqLAOkWUw=; b=v/N0ACLfLvCNS8hnBVMA+9EVh/g3pi2d7ZaxonNPMwc4octsjmZzlN5yy7p1j6B0JD BbIXyzXQcFk0UivbRHqBcuEXtjskJCA0H2dBQJVpRgyHBMUofMnx0Pbdubp+RIA9julj VtPAjQT/8Fo5Uyd31jTUv5s0rUVt48eFZF02fPbH1o0U05eQcLTdF5OBKdyUPYs+cCiG //tPmzywrz4FM35HTHqOSCfLj+SxQi4ZO/fUzFMrvab+bbYITh3YfDHiBpUd8gehX6Yv bn5/ZpIr3HxH4KYoTVNtuqtuFyVewUNQj8LSTTRytz1AVLAKPpPFaHeM7XKUJvDoXZFB r+Og== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s194-20020a632ccb000000b0056a8dc222f1si14035525pgs.259.2023.09.07.11.00.33; Thu, 07 Sep 2023 11:00:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344062AbjIGPcV (ORCPT + 44 others); Thu, 7 Sep 2023 11:32:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52118 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343609AbjIGPah (ORCPT ); Thu, 7 Sep 2023 11:30:37 -0400 X-Greylist: delayed 146 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Thu, 07 Sep 2023 08:30:10 PDT Received: from weierstrass.telenet-ops.be (weierstrass.telenet-ops.be [195.130.137.81]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D933D1BF6 for ; Thu, 7 Sep 2023 08:30:10 -0700 (PDT) Received: from laurent.telenet-ops.be (laurent.telenet-ops.be [IPv6:2a02:1800:110:4::f00:19]) by weierstrass.telenet-ops.be (Postfix) with ESMTPS id 4RhL534R3Sz4x0lQ for ; Thu, 7 Sep 2023 15:41:59 +0200 (CEST) Received: from ramsan.of.borg ([84.195.187.55]) by laurent.telenet-ops.be with bizsmtp id j1hy2A0031C8whw011hyto; Thu, 07 Sep 2023 15:41:59 +0200 Received: from rox.of.borg ([192.168.97.57]) by ramsan.of.borg with esmtp (Exim 4.95) (envelope-from ) id 1qeFGQ-002m95-I9; Thu, 07 Sep 2023 15:41:57 +0200 Received: from geert by rox.of.borg with local (Exim 4.95) (envelope-from ) id 1qeFGf-00CMgm-QR; Thu, 07 Sep 2023 15:41:57 +0200 From: Geert Uytterhoeven To: linux-m68k@lists.linux-m68k.org Cc: Arnd Bergmann , Finn Thain , Michael Schmitz , Philip Blundell , Greg Ungerer , Joshua Thompson , Sam Creasey , Laurent Vivier , linux-kernel@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH 22/52] m68k: atari: Add and use "atari.h" Date: Thu, 7 Sep 2023 15:41:23 +0200 Message-Id: <0778d9dd186928666d760d5523c7d2311f781621.1694093327.git.geert@linux-m68k.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1776402710241633467 X-GMAIL-MSGID: 1776402710241633467 When building with W=1: arch/m68k/atari/time.c:59:1: warning: no previous prototype for ‘atari_sched_init’ [-Wmissing-prototypes] 59 | atari_sched_init(void) | ^~~~~~~~~~~~~~~~ arch/m68k/atari/time.c:140:5: warning: no previous prototype for ‘atari_mste_hwclk’ [-Wmissing-prototypes] 140 | int atari_mste_hwclk( int op, struct rtc_time *t ) | ^~~~~~~~~~~~~~~~ arch/m68k/atari/time.c:199:5: warning: no previous prototype for ‘atari_tt_hwclk’ [-Wmissing-prototypes] 199 | int atari_tt_hwclk( int op, struct rtc_time *t ) | ^~~~~~~~~~~~~~ arch/m68k/atari/ataints.c:267:13: warning: no previous prototype for ‘atari_init_IRQ’ [-Wmissing-prototypes] 267 | void __init atari_init_IRQ(void) | ^~~~~~~~~~~~~~ arch/m68k/atari/atasound.c:36:6: warning: no previous prototype for ‘atari_microwire_cmd’ [-Wmissing-prototypes] 36 | void atari_microwire_cmd (int cmd) | ^~~~~~~~~~~~~~~~~~~ arch/m68k/atari/atasound.c:53:6: warning: no previous prototype for ‘atari_mksound’ [-Wmissing-prototypes] 53 | void atari_mksound (unsigned int hz, unsigned int ticks) | ^~~~~~~~~~~~~ Fix this by introducing a new header file "atari.h" for holding the prototypes of functions implemented in arch/m68k/atari/. Signed-off-by: Geert Uytterhoeven --- arch/m68k/atari/ataints.c | 3 +-- arch/m68k/atari/atari.h | 15 +++++++++++++++ arch/m68k/atari/atasound.c | 1 + arch/m68k/atari/config.c | 11 ++--------- arch/m68k/atari/time.c | 2 ++ 5 files changed, 21 insertions(+), 11 deletions(-) create mode 100644 arch/m68k/atari/atari.h diff --git a/arch/m68k/atari/ataints.c b/arch/m68k/atari/ataints.c index 56f02ea2c248d844..23256434191c39af 100644 --- a/arch/m68k/atari/ataints.c +++ b/arch/m68k/atari/ataints.c @@ -52,6 +52,7 @@ #include #include +#include "atari.h" /* * Atari interrupt handling scheme: @@ -81,8 +82,6 @@ __ALIGN_STR "\n\t" "orw #0x200,%sp@\n\t" /* set saved ipl to 2 */ "rte"); -extern void atari_microwire_cmd(int cmd); - static unsigned int atari_irq_startup(struct irq_data *data) { unsigned int irq = data->irq; diff --git a/arch/m68k/atari/atari.h b/arch/m68k/atari/atari.h new file mode 100644 index 0000000000000000..494a03ddac3d16ae --- /dev/null +++ b/arch/m68k/atari/atari.h @@ -0,0 +1,15 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +struct rtc_time; + +/* ataints.c */ +void atari_init_IRQ(void); + +/* atasound.c */ +void atari_microwire_cmd(int cmd); +void atari_mksound(unsigned int hz, unsigned int ticks); + +/* time.c */ +void atari_sched_init(void); +int atari_mste_hwclk(int op, struct rtc_time *t); +int atari_tt_hwclk(int op, struct rtc_time *t); diff --git a/arch/m68k/atari/atasound.c b/arch/m68k/atari/atasound.c index a8724d998c39fcfa..c38ef0e6078e7260 100644 --- a/arch/m68k/atari/atasound.c +++ b/arch/m68k/atari/atasound.c @@ -28,6 +28,7 @@ #include #include +#include "atari.h" /* * stuff from the old atasound.c diff --git a/arch/m68k/atari/config.c b/arch/m68k/atari/config.c index b4fe4273ad912ebe..b48a0606a00068b9 100644 --- a/arch/m68k/atari/config.c +++ b/arch/m68k/atari/config.c @@ -48,6 +48,8 @@ #include #include +#include "atari.h" + u_long atari_mch_cookie; EXPORT_SYMBOL(atari_mch_cookie); @@ -69,19 +71,10 @@ int atari_rtc_year_offset; static void atari_reset(void); static void atari_get_model(char *model); static void atari_get_hardware_list(struct seq_file *m); - -/* atari specific irq functions */ -extern void atari_init_IRQ (void); -extern void atari_mksound(unsigned int count, unsigned int ticks); #ifdef CONFIG_HEARTBEAT static void atari_heartbeat(int on); #endif -/* atari specific timer functions (in time.c) */ -extern void atari_sched_init(void); -extern int atari_mste_hwclk (int, struct rtc_time *); -extern int atari_tt_hwclk (int, struct rtc_time *); - /* ++roman: This is a more elaborate test for an SCC chip, since the plain * Medusa board generates DTACK at the SCC's standard addresses, but a SCC * board in the Medusa is possible. Also, the addresses where the ST_ESCC diff --git a/arch/m68k/atari/time.c b/arch/m68k/atari/time.c index 7e44d0e9d0f8a902..3453c6dc6b41d3c9 100644 --- a/arch/m68k/atari/time.c +++ b/arch/m68k/atari/time.c @@ -23,6 +23,8 @@ #include #include +#include "atari.h" + DEFINE_SPINLOCK(rtc_lock); EXPORT_SYMBOL_GPL(rtc_lock);