mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-25 23:05:23 +07:00
94c0439022
Since commit d3b41b6bb4
("m68k: Dispatch nvram_ops calls to Atari or
Mac functions"), Coldfire builds generate compiler warnings due to the
unconditional inclusion of asm/atarihw.h and asm/macintosh.h.
The inclusion of asm/atarihw.h causes warnings like this:
In file included from ./arch/m68k/include/asm/atarihw.h:25:0,
from arch/m68k/kernel/setup_mm.c:41,
from arch/m68k/kernel/setup.c:3:
./arch/m68k/include/asm/raw_io.h:39:0: warning: "__raw_readb" redefined
#define __raw_readb in_8
In file included from ./arch/m68k/include/asm/io.h:6:0,
from arch/m68k/kernel/setup_mm.c:36,
from arch/m68k/kernel/setup.c:3:
./arch/m68k/include/asm/io_no.h:16:0: note: this is the location of the previous definition
#define __raw_readb(addr) \
...
This issue is resolved by dropping the asm/raw_io.h include. It turns out
that asm/io_mm.h already includes that header file.
Moving the relevant macro definitions helps to clarify this dependency
and make it safe to include asm/atarihw.h.
The other warnings look like this:
In file included from arch/m68k/kernel/setup_mm.c:48:0,
from arch/m68k/kernel/setup.c:3:
./arch/m68k/include/asm/macintosh.h:19:35: warning: 'struct irq_data' declared inside parameter list will not be visible outside of this definition or declaration
extern void mac_irq_enable(struct irq_data *data);
^~~~~~~~
...
This issue is resolved by adding the missing linux/irq.h include.
Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
Acked-by: Greg Ungerer <gerg@linux-m68k.org>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
118 lines
2.4 KiB
C
118 lines
2.4 KiB
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#ifndef __ASM_MACINTOSH_H
|
|
#define __ASM_MACINTOSH_H
|
|
|
|
#include <linux/seq_file.h>
|
|
#include <linux/interrupt.h>
|
|
#include <linux/irq.h>
|
|
|
|
#include <asm/bootinfo-mac.h>
|
|
|
|
|
|
/*
|
|
* Apple Macintoshisms
|
|
*/
|
|
|
|
extern void mac_reset(void);
|
|
extern void mac_poweroff(void);
|
|
extern void mac_init_IRQ(void);
|
|
|
|
extern void mac_irq_enable(struct irq_data *data);
|
|
extern void mac_irq_disable(struct irq_data *data);
|
|
|
|
extern unsigned char mac_pram_read_byte(int);
|
|
extern void mac_pram_write_byte(unsigned char, int);
|
|
extern ssize_t mac_pram_get_size(void);
|
|
|
|
/*
|
|
* Macintosh Table
|
|
*/
|
|
|
|
struct mac_model
|
|
{
|
|
short ident;
|
|
char *name;
|
|
char adb_type;
|
|
char via_type;
|
|
char scsi_type;
|
|
char ide_type;
|
|
char scc_type;
|
|
char ether_type;
|
|
char expansion_type;
|
|
char floppy_type;
|
|
};
|
|
|
|
#define MAC_ADB_NONE 0
|
|
#define MAC_ADB_II 1
|
|
#define MAC_ADB_EGRET 2
|
|
#define MAC_ADB_CUDA 3
|
|
#define MAC_ADB_PB1 4
|
|
#define MAC_ADB_PB2 5
|
|
#define MAC_ADB_IOP 6
|
|
|
|
#define MAC_VIA_II 1
|
|
#define MAC_VIA_IICI 2
|
|
#define MAC_VIA_QUADRA 3
|
|
|
|
#define MAC_SCSI_NONE 0
|
|
#define MAC_SCSI_OLD 1
|
|
#define MAC_SCSI_QUADRA 2
|
|
#define MAC_SCSI_QUADRA2 3
|
|
#define MAC_SCSI_QUADRA3 4
|
|
#define MAC_SCSI_IIFX 5
|
|
#define MAC_SCSI_DUO 6
|
|
#define MAC_SCSI_LC 7
|
|
|
|
#define MAC_IDE_NONE 0
|
|
#define MAC_IDE_QUADRA 1
|
|
#define MAC_IDE_PB 2
|
|
#define MAC_IDE_BABOON 3
|
|
|
|
#define MAC_SCC_II 1
|
|
#define MAC_SCC_IOP 2
|
|
#define MAC_SCC_QUADRA 3
|
|
#define MAC_SCC_PSC 4
|
|
|
|
#define MAC_ETHER_NONE 0
|
|
#define MAC_ETHER_SONIC 1
|
|
#define MAC_ETHER_MACE 2
|
|
|
|
#define MAC_EXP_NONE 0
|
|
#define MAC_EXP_PDS 1 /* Accepts only a PDS card */
|
|
#define MAC_EXP_NUBUS 2 /* Accepts only NuBus card(s) */
|
|
#define MAC_EXP_PDS_NUBUS 3 /* Accepts PDS card and/or NuBus card(s) */
|
|
#define MAC_EXP_PDS_COMM 4 /* Accepts PDS card or Comm Slot card */
|
|
|
|
#define MAC_FLOPPY_UNSUPPORTED 0
|
|
#define MAC_FLOPPY_SWIM_IOP 1
|
|
#define MAC_FLOPPY_OLD 2
|
|
#define MAC_FLOPPY_QUADRA 3
|
|
#define MAC_FLOPPY_LC 4
|
|
|
|
extern struct mac_model *macintosh_config;
|
|
|
|
|
|
/*
|
|
* Internal representation of the Mac hardware, filled in from bootinfo
|
|
*/
|
|
|
|
struct mac_booter_data
|
|
{
|
|
unsigned long videoaddr;
|
|
unsigned long videorow;
|
|
unsigned long videodepth;
|
|
unsigned long dimensions;
|
|
unsigned long boottime;
|
|
unsigned long gmtbias;
|
|
unsigned long videological;
|
|
unsigned long sccbase;
|
|
unsigned long id;
|
|
unsigned long memsize;
|
|
unsigned long cpuid;
|
|
unsigned long rombase;
|
|
};
|
|
|
|
extern struct mac_booter_data mac_bi_data;
|
|
|
|
#endif
|