Skip to content

Commit 91d7b75

Browse files
viviergeertu
authored andcommitted
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>
1 parent dfd42fa commit 91d7b75

11 files changed

Lines changed: 43 additions & 22 deletions

File tree

arch/m68k/amiga/config.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
#include <asm/irq.h>
3838
#include <asm/machdep.h>
3939
#include <asm/io.h>
40+
#include <asm/config.h>
4041

4142
static unsigned long amiga_model;
4243

arch/m68k/apollo/config.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
#include <asm/apollohw.h>
1717
#include <asm/irq.h>
1818
#include <asm/machdep.h>
19+
#include <asm/config.h>
1920

2021
u_long sio01_physaddr;
2122
u_long sio23_physaddr;

arch/m68k/atari/config.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
#include <asm/machdep.h>
4747
#include <asm/hwtest.h>
4848
#include <asm/io.h>
49+
#include <asm/config.h>
4950

5051
u_long atari_mch_cookie;
5152
EXPORT_SYMBOL(atari_mch_cookie);

arch/m68k/bvme6000/config.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
#include <asm/traps.h>
3737
#include <asm/machdep.h>
3838
#include <asm/bvme6000hw.h>
39+
#include <asm/config.h>
3940

4041
static void bvme6000_get_model(char *model);
4142
extern void bvme6000_sched_init(void);

arch/m68k/hp300/config.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
#include <asm/blinken.h>
2323
#include <asm/io.h> /* readb() and writeb() */
2424
#include <asm/hp300hw.h>
25+
#include <asm/config.h>
2526

2627
#include "time.h"
2728

arch/m68k/include/asm/config.h

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
/* SPDX-License-Identifier: GPL-2.0 */
2+
3+
/*
4+
* This file contains prototypes provided by each m68k machine
5+
* to parse bootinfo data structures and to configure the machine
6+
*/
7+
8+
#ifndef _M68K_CONFIG_H
9+
#define _M68K_CONFIG_H
10+
11+
extern int amiga_parse_bootinfo(const struct bi_record *record);
12+
extern int apollo_parse_bootinfo(const struct bi_record *record);
13+
extern int atari_parse_bootinfo(const struct bi_record *record);
14+
extern int bvme6000_parse_bootinfo(const struct bi_record *record);
15+
extern int hp300_parse_bootinfo(const struct bi_record *record);
16+
extern int mac_parse_bootinfo(const struct bi_record *record);
17+
extern int mvme147_parse_bootinfo(const struct bi_record *record);
18+
extern int mvme16x_parse_bootinfo(const struct bi_record *record);
19+
extern int q40_parse_bootinfo(const struct bi_record *record);
20+
21+
extern void config_amiga(void);
22+
extern void config_apollo(void);
23+
extern void config_atari(void);
24+
extern void config_bvme6000(void);
25+
extern void config_hp300(void);
26+
extern void config_mac(void);
27+
extern void config_mvme147(void);
28+
extern void config_mvme16x(void);
29+
extern void config_q40(void);
30+
extern void config_sun3(void);
31+
extern void config_sun3x(void);
32+
33+
#endif /* _M68K_CONFIG_H */

arch/m68k/kernel/setup_mm.c

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
#endif
4848
#include <asm/macintosh.h>
4949
#include <asm/natfeat.h>
50+
#include <asm/config.h>
5051

5152
#if !FPSTATESIZE || !NR_IRQS
5253
#warning No CPU/platform type selected, your kernel will not work!
@@ -113,28 +114,6 @@ EXPORT_SYMBOL(isa_type);
113114
EXPORT_SYMBOL(isa_sex);
114115
#endif
115116

116-
extern int amiga_parse_bootinfo(const struct bi_record *);
117-
extern int atari_parse_bootinfo(const struct bi_record *);
118-
extern int mac_parse_bootinfo(const struct bi_record *);
119-
extern int q40_parse_bootinfo(const struct bi_record *);
120-
extern int bvme6000_parse_bootinfo(const struct bi_record *);
121-
extern int mvme16x_parse_bootinfo(const struct bi_record *);
122-
extern int mvme147_parse_bootinfo(const struct bi_record *);
123-
extern int hp300_parse_bootinfo(const struct bi_record *);
124-
extern int apollo_parse_bootinfo(const struct bi_record *);
125-
126-
extern void config_amiga(void);
127-
extern void config_atari(void);
128-
extern void config_mac(void);
129-
extern void config_sun3(void);
130-
extern void config_apollo(void);
131-
extern void config_mvme147(void);
132-
extern void config_mvme16x(void);
133-
extern void config_bvme6000(void);
134-
extern void config_hp300(void);
135-
extern void config_q40(void);
136-
extern void config_sun3x(void);
137-
138117
#define MASK_256K 0xfffc0000
139118

140119
extern void paging_init(void);

arch/m68k/mac/config.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
#include <asm/mac_via.h>
4848
#include <asm/mac_oss.h>
4949
#include <asm/mac_psc.h>
50+
#include <asm/config.h>
5051

5152
/* Mac bootinfo struct */
5253
struct mac_booter_data mac_bi_data;

arch/m68k/mvme147/config.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
#include <asm/traps.h>
3535
#include <asm/machdep.h>
3636
#include <asm/mvme147hw.h>
37+
#include <asm/config.h>
3738

3839

3940
static void mvme147_get_model(char *model);

arch/m68k/mvme16x/config.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
#include <asm/traps.h>
3838
#include <asm/machdep.h>
3939
#include <asm/mvme16xhw.h>
40+
#include <asm/config.h>
4041

4142
extern t_bdid mvme_bdid;
4243

0 commit comments

Comments
 (0)