18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */
28c2ecf20Sopenharmony_ci#ifndef __ASM_MACINTOSH_H
38c2ecf20Sopenharmony_ci#define __ASM_MACINTOSH_H
48c2ecf20Sopenharmony_ci
58c2ecf20Sopenharmony_ci#include <linux/seq_file.h>
68c2ecf20Sopenharmony_ci#include <linux/interrupt.h>
78c2ecf20Sopenharmony_ci#include <linux/irq.h>
88c2ecf20Sopenharmony_ci
98c2ecf20Sopenharmony_ci#include <asm/bootinfo-mac.h>
108c2ecf20Sopenharmony_ci
118c2ecf20Sopenharmony_ci
128c2ecf20Sopenharmony_ci/*
138c2ecf20Sopenharmony_ci *	Apple Macintoshisms
148c2ecf20Sopenharmony_ci */
158c2ecf20Sopenharmony_ci
168c2ecf20Sopenharmony_ciextern void mac_reset(void);
178c2ecf20Sopenharmony_ciextern void mac_poweroff(void);
188c2ecf20Sopenharmony_ciextern void mac_init_IRQ(void);
198c2ecf20Sopenharmony_ci
208c2ecf20Sopenharmony_ciextern void mac_irq_enable(struct irq_data *data);
218c2ecf20Sopenharmony_ciextern void mac_irq_disable(struct irq_data *data);
228c2ecf20Sopenharmony_ci
238c2ecf20Sopenharmony_ciextern unsigned char mac_pram_read_byte(int);
248c2ecf20Sopenharmony_ciextern void mac_pram_write_byte(unsigned char, int);
258c2ecf20Sopenharmony_ciextern ssize_t mac_pram_get_size(void);
268c2ecf20Sopenharmony_ci
278c2ecf20Sopenharmony_ci/*
288c2ecf20Sopenharmony_ci *	Macintosh Table
298c2ecf20Sopenharmony_ci */
308c2ecf20Sopenharmony_ci
318c2ecf20Sopenharmony_cistruct mac_model
328c2ecf20Sopenharmony_ci{
338c2ecf20Sopenharmony_ci	short ident;
348c2ecf20Sopenharmony_ci	char *name;
358c2ecf20Sopenharmony_ci	char adb_type;
368c2ecf20Sopenharmony_ci	char via_type;
378c2ecf20Sopenharmony_ci	char scsi_type;
388c2ecf20Sopenharmony_ci	char ide_type;
398c2ecf20Sopenharmony_ci	char scc_type;
408c2ecf20Sopenharmony_ci	char ether_type;
418c2ecf20Sopenharmony_ci	char expansion_type;
428c2ecf20Sopenharmony_ci	char floppy_type;
438c2ecf20Sopenharmony_ci};
448c2ecf20Sopenharmony_ci
458c2ecf20Sopenharmony_ci#define MAC_ADB_NONE		0
468c2ecf20Sopenharmony_ci#define MAC_ADB_II		1
478c2ecf20Sopenharmony_ci#define MAC_ADB_EGRET		2
488c2ecf20Sopenharmony_ci#define MAC_ADB_CUDA		3
498c2ecf20Sopenharmony_ci#define MAC_ADB_PB1		4
508c2ecf20Sopenharmony_ci#define MAC_ADB_PB2		5
518c2ecf20Sopenharmony_ci#define MAC_ADB_IOP		6
528c2ecf20Sopenharmony_ci
538c2ecf20Sopenharmony_ci#define MAC_VIA_II		1
548c2ecf20Sopenharmony_ci#define MAC_VIA_IICI		2
558c2ecf20Sopenharmony_ci#define MAC_VIA_QUADRA		3
568c2ecf20Sopenharmony_ci
578c2ecf20Sopenharmony_ci#define MAC_SCSI_NONE		0
588c2ecf20Sopenharmony_ci#define MAC_SCSI_OLD		1
598c2ecf20Sopenharmony_ci#define MAC_SCSI_QUADRA		2
608c2ecf20Sopenharmony_ci#define MAC_SCSI_QUADRA2	3
618c2ecf20Sopenharmony_ci#define MAC_SCSI_QUADRA3	4
628c2ecf20Sopenharmony_ci#define MAC_SCSI_IIFX		5
638c2ecf20Sopenharmony_ci#define MAC_SCSI_DUO		6
648c2ecf20Sopenharmony_ci#define MAC_SCSI_LC		7
658c2ecf20Sopenharmony_ci
668c2ecf20Sopenharmony_ci#define MAC_IDE_NONE		0
678c2ecf20Sopenharmony_ci#define MAC_IDE_QUADRA		1
688c2ecf20Sopenharmony_ci#define MAC_IDE_PB		2
698c2ecf20Sopenharmony_ci#define MAC_IDE_BABOON		3
708c2ecf20Sopenharmony_ci
718c2ecf20Sopenharmony_ci#define MAC_SCC_II		1
728c2ecf20Sopenharmony_ci#define MAC_SCC_IOP		2
738c2ecf20Sopenharmony_ci#define MAC_SCC_QUADRA		3
748c2ecf20Sopenharmony_ci#define MAC_SCC_PSC		4
758c2ecf20Sopenharmony_ci
768c2ecf20Sopenharmony_ci#define MAC_ETHER_NONE		0
778c2ecf20Sopenharmony_ci#define MAC_ETHER_SONIC		1
788c2ecf20Sopenharmony_ci#define MAC_ETHER_MACE		2
798c2ecf20Sopenharmony_ci
808c2ecf20Sopenharmony_ci#define MAC_EXP_NONE		0
818c2ecf20Sopenharmony_ci#define MAC_EXP_PDS		1 /* Accepts only a PDS card */
828c2ecf20Sopenharmony_ci#define MAC_EXP_NUBUS		2 /* Accepts only NuBus card(s) */
838c2ecf20Sopenharmony_ci#define MAC_EXP_PDS_NUBUS	3 /* Accepts PDS card and/or NuBus card(s) */
848c2ecf20Sopenharmony_ci#define MAC_EXP_PDS_COMM	4 /* Accepts PDS card or Comm Slot card */
858c2ecf20Sopenharmony_ci
868c2ecf20Sopenharmony_ci#define MAC_FLOPPY_UNSUPPORTED	0
878c2ecf20Sopenharmony_ci#define MAC_FLOPPY_SWIM_IOP	1
888c2ecf20Sopenharmony_ci#define MAC_FLOPPY_OLD		2
898c2ecf20Sopenharmony_ci#define MAC_FLOPPY_QUADRA	3
908c2ecf20Sopenharmony_ci#define MAC_FLOPPY_LC		4
918c2ecf20Sopenharmony_ci
928c2ecf20Sopenharmony_ciextern struct mac_model *macintosh_config;
938c2ecf20Sopenharmony_ci
948c2ecf20Sopenharmony_ci
958c2ecf20Sopenharmony_ci    /*
968c2ecf20Sopenharmony_ci     * Internal representation of the Mac hardware, filled in from bootinfo
978c2ecf20Sopenharmony_ci     */
988c2ecf20Sopenharmony_ci
998c2ecf20Sopenharmony_cistruct mac_booter_data
1008c2ecf20Sopenharmony_ci{
1018c2ecf20Sopenharmony_ci	unsigned long videoaddr;
1028c2ecf20Sopenharmony_ci	unsigned long videorow;
1038c2ecf20Sopenharmony_ci	unsigned long videodepth;
1048c2ecf20Sopenharmony_ci	unsigned long dimensions;
1058c2ecf20Sopenharmony_ci	unsigned long boottime;
1068c2ecf20Sopenharmony_ci	unsigned long gmtbias;
1078c2ecf20Sopenharmony_ci	unsigned long videological;
1088c2ecf20Sopenharmony_ci	unsigned long sccbase;
1098c2ecf20Sopenharmony_ci	unsigned long id;
1108c2ecf20Sopenharmony_ci	unsigned long memsize;
1118c2ecf20Sopenharmony_ci	unsigned long cpuid;
1128c2ecf20Sopenharmony_ci	unsigned long rombase;
1138c2ecf20Sopenharmony_ci};
1148c2ecf20Sopenharmony_ci
1158c2ecf20Sopenharmony_ciextern struct mac_booter_data mac_bi_data;
1168c2ecf20Sopenharmony_ci
1178c2ecf20Sopenharmony_ci#endif
118