m68k: Add asm/config.h

To avoid 'warning: no previous prototype for' errors, declare all the
parse_bootinfo and config function prototypes into asm/config.h and
include it in arch/m68k/kernel/setup_mm.c and arch/m68k/*/config.c.

Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Link: https://lore.kernel.org/r/20220121200738.2577697-2-laurent@vivier.eu
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
This commit is contained in:
Laurent Vivier 2022-01-21 21:07:34 +01:00 committed by Geert Uytterhoeven
parent dfd42facf1
commit 91d7b75a58
11 changed files with 43 additions and 22 deletions

View File

@ -37,6 +37,7 @@
#include <asm/irq.h>
#include <asm/machdep.h>
#include <asm/io.h>
#include <asm/config.h>
static unsigned long amiga_model;

View File

@ -16,6 +16,7 @@
#include <asm/apollohw.h>
#include <asm/irq.h>
#include <asm/machdep.h>
#include <asm/config.h>
u_long sio01_physaddr;
u_long sio23_physaddr;

View File

@ -46,6 +46,7 @@
#include <asm/machdep.h>
#include <asm/hwtest.h>
#include <asm/io.h>
#include <asm/config.h>
u_long atari_mch_cookie;
EXPORT_SYMBOL(atari_mch_cookie);

View File

@ -36,6 +36,7 @@
#include <asm/traps.h>
#include <asm/machdep.h>
#include <asm/bvme6000hw.h>
#include <asm/config.h>
static void bvme6000_get_model(char *model);
extern void bvme6000_sched_init(void);

View File

@ -22,6 +22,7 @@
#include <asm/blinken.h>
#include <asm/io.h> /* readb() and writeb() */
#include <asm/hp300hw.h>
#include <asm/config.h>
#include "time.h"

View File

@ -0,0 +1,33 @@
/* SPDX-License-Identifier: GPL-2.0 */
/*
* This file contains prototypes provided by each m68k machine
* to parse bootinfo data structures and to configure the machine
*/
#ifndef _M68K_CONFIG_H
#define _M68K_CONFIG_H
extern int amiga_parse_bootinfo(const struct bi_record *record);
extern int apollo_parse_bootinfo(const struct bi_record *record);
extern int atari_parse_bootinfo(const struct bi_record *record);
extern int bvme6000_parse_bootinfo(const struct bi_record *record);
extern int hp300_parse_bootinfo(const struct bi_record *record);
extern int mac_parse_bootinfo(const struct bi_record *record);
extern int mvme147_parse_bootinfo(const struct bi_record *record);
extern int mvme16x_parse_bootinfo(const struct bi_record *record);
extern int q40_parse_bootinfo(const struct bi_record *record);
extern void config_amiga(void);
extern void config_apollo(void);
extern void config_atari(void);
extern void config_bvme6000(void);
extern void config_hp300(void);
extern void config_mac(void);
extern void config_mvme147(void);
extern void config_mvme16x(void);
extern void config_q40(void);
extern void config_sun3(void);
extern void config_sun3x(void);
#endif /* _M68K_CONFIG_H */

View File

@ -47,6 +47,7 @@
#endif
#include <asm/macintosh.h>
#include <asm/natfeat.h>
#include <asm/config.h>
#if !FPSTATESIZE || !NR_IRQS
#warning No CPU/platform type selected, your kernel will not work!
@ -113,28 +114,6 @@ EXPORT_SYMBOL(isa_type);
EXPORT_SYMBOL(isa_sex);
#endif
extern int amiga_parse_bootinfo(const struct bi_record *);
extern int atari_parse_bootinfo(const struct bi_record *);
extern int mac_parse_bootinfo(const struct bi_record *);
extern int q40_parse_bootinfo(const struct bi_record *);
extern int bvme6000_parse_bootinfo(const struct bi_record *);
extern int mvme16x_parse_bootinfo(const struct bi_record *);
extern int mvme147_parse_bootinfo(const struct bi_record *);
extern int hp300_parse_bootinfo(const struct bi_record *);
extern int apollo_parse_bootinfo(const struct bi_record *);
extern void config_amiga(void);
extern void config_atari(void);
extern void config_mac(void);
extern void config_sun3(void);
extern void config_apollo(void);
extern void config_mvme147(void);
extern void config_mvme16x(void);
extern void config_bvme6000(void);
extern void config_hp300(void);
extern void config_q40(void);
extern void config_sun3x(void);
#define MASK_256K 0xfffc0000
extern void paging_init(void);

View File

@ -47,6 +47,7 @@
#include <asm/mac_via.h>
#include <asm/mac_oss.h>
#include <asm/mac_psc.h>
#include <asm/config.h>
/* Mac bootinfo struct */
struct mac_booter_data mac_bi_data;

View File

@ -34,6 +34,7 @@
#include <asm/traps.h>
#include <asm/machdep.h>
#include <asm/mvme147hw.h>
#include <asm/config.h>
static void mvme147_get_model(char *model);

View File

@ -37,6 +37,7 @@
#include <asm/traps.h>
#include <asm/machdep.h>
#include <asm/mvme16xhw.h>
#include <asm/config.h>
extern t_bdid mvme_bdid;

View File

@ -34,6 +34,7 @@
#include <asm/traps.h>
#include <asm/machdep.h>
#include <asm/q40_master.h>
#include <asm/config.h>
extern void q40_init_IRQ(void);
static void q40_get_model(char *model);