Esempio n. 1
0
void __init config_mac(void)
{
	if (!MACH_IS_MAC) {
	  printk(KERN_ERR "ERROR: no Mac, but config_mac() called!! \n");
	}

	mach_sched_init      = mac_sched_init;
	mach_init_IRQ        = mac_init_IRQ;
	mach_get_model	 = mac_get_model;
	mach_gettimeoffset   = mac_gettimeoffset;
#warning move to adb/via init
#if 0
	mach_hwclk           = mac_hwclk;
#endif
	mach_set_clock_mmss	 = mac_set_clock_mmss;
	mach_reset           = mac_reset;
	mach_halt            = mac_poweroff;
	mach_power_off       = mac_poweroff;
	mach_max_dma_address = 0xffffffff;
#if 0
	mach_debug_init	 = mac_debug_init;
#endif
#if defined(CONFIG_INPUT_M68K_BEEP) || defined(CONFIG_INPUT_M68K_BEEP_MODULE)
        mach_beep            = mac_mksound;
#endif
#ifdef CONFIG_HEARTBEAT
#if 0
	mach_heartbeat = mac_heartbeat;
	mach_heartbeat_irq = IRQ_MAC_TIMER;
#endif
#endif

	/*
	 * 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. */

	if (macintosh_config->ident == MAC_MODEL_IICI
	    || macintosh_config->ident == MAC_MODEL_IIFX) {
		mach_l2_flush = mac_cache_card_flush;
	}

	/*
	 * Check for machine specific fixups.
	 */

#ifdef OLD_NUBUS_CODE
	 nubus_sweep_video();
#endif
}
Esempio n. 2
0
void __init config_mac(void)
{
	if (!MACH_IS_MAC) {
	  printk("ERROR: no Mac, but config_mac() called!! \n");
	}
	
#ifdef CONFIG_VT
#ifdef CONFIG_INPUT_ADBHID
	mach_keyb_init       = mac_hid_init_hw;
	mach_kbd_translate   = mac_hid_kbd_translate;
#ifdef CONFIG_MAGIC_SYSRQ
#ifdef CONFIG_MAC_ADBKEYCODES
	if (!keyboard_sends_linux_keycodes) {
		mach_sysrq_xlate = mac_hid_kbd_sysrq_xlate;
		SYSRQ_KEY = 0x69;
	} else
#endif /* CONFIG_MAC_ADBKEYCODES */
	{
		mach_sysrq_xlate = pckbd_sysrq_xlate;
		SYSRQ_KEY = 0x54;
	}
#endif /* CONFIG_MAGIC_SYSRQ */
#elif defined(CONFIG_ADB_KEYBOARD)
	mach_keyb_init       = mackbd_init_hw;
	mach_kbd_leds        = mackbd_leds;
	mach_kbd_translate   = mackbd_translate;
	mach_sysrq_xlate     = mackbd_sysrq_xlate;
	SYSRQ_KEY = 0x69;
#endif /* CONFIG_INPUT_ADBHID */
#endif /* CONFIG_VT */

	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    = mac_get_irq_list;
	mach_gettimeoffset   = mac_gettimeoffset;
	mach_gettod          = mac_gettod;
	mach_hwclk           = mac_hwclk;
	mach_set_clock_mmss	 = mac_set_clock_mmss;
#if 0
	mach_mksound         = mac_mksound;
#endif
	mach_reset           = mac_reset;
	mach_halt            = mac_poweroff;
	mach_power_off       = mac_poweroff;
	conswitchp	         = &dummy_con;
	mach_max_dma_address = 0xffffffff;
#if 0
	mach_debug_init	 = mac_debug_init;
#endif
	kd_mksound		 = mac_mksound;
#ifdef CONFIG_HEARTBEAT
#if 0
	mach_heartbeat = mac_heartbeat;
	mach_heartbeat_irq = IRQ_MAC_TIMER;
#endif
#endif

	/*
	 * 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. */

	if (macintosh_config->ident == MAC_MODEL_IICI
	    || macintosh_config->ident == MAC_MODEL_IIFX) {
		mach_l2_flush = mac_cache_card_flush;
	}
#ifdef MAC_DEBUG_SOUND
	/* goes on forever if timers broken */
	mac_mksound(1000,10);
#endif

	/*
	 * Check for machine specific fixups.
	 */

#ifdef OLD_NUBUS_CODE
	 nubus_sweep_video();
#endif
}