* Miscellaneous linux stuff
*/
-#include <linux/config.h>
#include <linux/module.h>
#include <linux/types.h>
#include <linux/mm.h>
extern void iop_preinit(void);
extern void iop_init(void);
extern void via_init(void);
-extern void via_init_clock(irqreturn_t (*func)(int, void *, struct pt_regs *));
+extern void via_init_clock(irq_handler_t func);
extern void via_flush_cache(void);
extern void oss_init(void);
extern void psc_init(void);
static void mac_get_model(char *str);
-void mac_bang(int irq, void *vector, struct pt_regs *p)
-{
- printk(KERN_INFO "Resetting ...\n");
- mac_reset();
-}
-
-static void mac_sched_init(irqreturn_t (*vector)(int, void *, struct pt_regs *))
+static void mac_sched_init(irq_handler_t vector)
{
via_init_clock(vector);
}
-#if 0
-void mac_waitbut (void)
-{
- ;
-}
-#endif
-
-extern irqreturn_t mac_default_handler(int, void *, struct pt_regs *);
-
-irqreturn_t (*mac_handlers[8])(int, void *, struct pt_regs *)=
-{
- mac_default_handler,
- mac_default_handler,
- mac_default_handler,
- mac_default_handler,
- mac_default_handler,
- mac_default_handler,
- mac_default_handler,
- mac_default_handler
-};
-
/*
* Parse a Macintosh-specific record in the bootinfo
*/
/*
* Flip into 24bit mode for an instant - flushes the L2 cache card. We
- * have to disable interrupts for this. Our IRQ handlers will crap
+ * have to disable interrupts for this. Our IRQ handlers will crap
* themselves if they take an IRQ in 24bit mode!
*/
mach_sched_init = mac_sched_init;
mach_init_IRQ = mac_init_IRQ;
- mach_request_irq = mac_request_irq;
- mach_free_irq = mac_free_irq;
- enable_irq = mac_enable_irq;
- disable_irq = mac_disable_irq;
mach_get_model = mac_get_model;
- mach_default_handler = &mac_handlers;
- mach_get_irq_list = show_mac_interrupts;
mach_gettimeoffset = mac_gettimeoffset;
#warning move to adb/via init
#if 0
mach_reset = mac_reset;
mach_halt = mac_poweroff;
mach_power_off = mac_poweroff;
-#ifdef CONFIG_DUMMY_CONSOLE
- conswitchp = &dummy_con;
-#endif
mach_max_dma_address = 0xffffffff;
#if 0
mach_debug_init = mac_debug_init;
/*
* Determine hardware present
*/
-
+
mac_identify();
mac_report_hardware();
-
+
/* AFAIK only the IIci takes a cache card. The IIfx has onboard
cache ... someone needs to figure out how to tell if it's on or
not. */
#ifdef OLD_NUBUS_CODE
nubus_sweep_video();
#endif
-}
+}
/*
- * Macintosh Table: hardcoded model configuration data.
+ * Macintosh Table: hardcoded model configuration data.
*
- * Much of this was defined by Alan, based on who knows what docs.
- * I've added a lot more, and some of that was pure guesswork based
- * on hardware pages present on the Mac web site. Possibly wildly
+ * Much of this was defined by Alan, based on who knows what docs.
+ * I've added a lot more, and some of that was pure guesswork based
+ * on hardware pages present on the Mac web site. Possibly wildly
* inaccurate, so look here if a new Mac model won't run. Example: if
* a Mac crashes immediately after the VIA1 registers have been dumped
- * to the screen, it probably died attempting to read DirB on a RBV.
+ * to the screen, it probably died attempting to read DirB on a RBV.
* Meaning it should have MAC_VIA_IIci here :-)
*/
-
+
struct mac_model *macintosh_config;
EXPORT_SYMBOL(macintosh_config);
/*
* Original MacII hardware
- *
+ *
*/
-
+
{
.ident = MAC_MODEL_II,
.name = "II",
.scc_type = MAC_SCC_II,
.nubus_type = MAC_NUBUS
},
-
+
/*
* Weirdified MacII hardware - all subtley different. Gee thanks
* Apple. All these boxes seem to have VIA2 in a different place to
.scc_type = MAC_SCC_II,
.nubus_type = MAC_NUBUS
},
-
+
/*
* Classic models (guessing: similar to SE/30 ?? Nope, similar to LC ...)
*/
/*
* Some Mac LC machines. Basically the same as the IIci, ADB like IIsi
*/
-
+
{
.ident = MAC_MODEL_LC,
.name = "LC",
},
/*
- * Quadra. Video is at 0xF9000000, via is like a MacII. We label it differently
- * as some of the stuff connected to VIA2 seems different. Better SCSI chip and
- * onboard ethernet using a NatSemi SONIC except the 660AV and 840AV which use an
+ * Quadra. Video is at 0xF9000000, via is like a MacII. We label it differently
+ * as some of the stuff connected to VIA2 seems different. Better SCSI chip and
+ * onboard ethernet using a NatSemi SONIC except the 660AV and 840AV which use an
* AMD 79C940 (MACE).
* The 700, 900 and 950 have some I/O chips in the wrong place to
* confuse us. The 840AV has a SCSI location of its own (same as
* the 660AV).
- */
-
+ */
+
{
.ident = MAC_MODEL_Q605,
.name = "Quadra 605",
.nubus_type = MAC_NUBUS
},
- /*
+ /*
* Performa - more LC type machines
*/
{
struct mac_model *m;
- /* Penguin data useful? */
+ /* Penguin data useful? */
int model = mac_bi_data.id;
if (!model) {
/* no bootinfo model id -> NetBSD booter was used! */
printk (KERN_WARNING "No bootinfo model ID, using cpuid instead (hey, use Penguin!)\n");
}
- macintosh_config = mac_data_table;
+ macintosh_config = mac_data_table;
for (m = macintosh_config ; m->ident != -1 ; m++) {
if (m->ident == model) {
macintosh_config = m;
* Report booter data:
*/
printk (KERN_DEBUG " Penguin bootinfo data:\n");
- printk (KERN_DEBUG " Video: addr 0x%lx row 0x%lx depth %lx dimensions %ld x %ld\n",
- mac_bi_data.videoaddr, mac_bi_data.videorow,
- mac_bi_data.videodepth, mac_bi_data.dimensions & 0xFFFF,
- mac_bi_data.dimensions >> 16);
+ printk (KERN_DEBUG " Video: addr 0x%lx row 0x%lx depth %lx dimensions %ld x %ld\n",
+ mac_bi_data.videoaddr, mac_bi_data.videorow,
+ mac_bi_data.videodepth, mac_bi_data.dimensions & 0xFFFF,
+ mac_bi_data.dimensions >> 16);
printk (KERN_DEBUG " Videological 0x%lx phys. 0x%lx, SCC at 0x%lx \n",
- mac_bi_data.videological, mac_orig_videoaddr,
- mac_bi_data.sccbase);
+ mac_bi_data.videological, mac_orig_videoaddr,
+ mac_bi_data.sccbase);
printk (KERN_DEBUG " Boottime: 0x%lx GMTBias: 0x%lx \n",
- mac_bi_data.boottime, mac_bi_data.gmtbias);
+ mac_bi_data.boottime, mac_bi_data.gmtbias);
printk (KERN_DEBUG " Machine ID: %ld CPUid: 0x%lx memory size: 0x%lx \n",
- mac_bi_data.id, mac_bi_data.cpuid, mac_bi_data.memsize);
+ mac_bi_data.id, mac_bi_data.cpuid, mac_bi_data.memsize);
#if 0
- printk ("Ramdisk: addr 0x%lx size 0x%lx\n",
+ printk ("Ramdisk: addr 0x%lx size 0x%lx\n",
m68k_ramdisk.addr, m68k_ramdisk.size);
#endif