void __init config_amiga(void) { int i; amiga_debug_init(); amiga_identify(); /* Some APUS boxes may have PCI memory, but ... */ iomem_resource.name = "Memory"; for (i = 0; i < 4; i++) request_resource(&iomem_resource, &((struct resource *)&mb_resources)[i]); mach_sched_init = amiga_sched_init; mach_init_IRQ = amiga_init_IRQ; #ifndef CONFIG_APUS mach_default_handler = &amiga_default_handler; mach_request_irq = amiga_request_irq; mach_free_irq = amiga_free_irq; enable_irq = amiga_enable_irq; disable_irq = amiga_disable_irq; #endif mach_get_model = amiga_get_model; mach_get_hardware_list = amiga_get_hardware_list; mach_gettimeoffset = amiga_gettimeoffset; if (AMIGAHW_PRESENT(A3000_CLK)){ mach_gettod = a3000_gettod; rtc_resource.name = "A3000 RTC"; request_resource(&iomem_resource, &rtc_resource); } else{ /* if (AMIGAHW_PRESENT(A2000_CLK)) */ mach_gettod = a2000_gettod; rtc_resource.name = "A2000 RTC"; request_resource(&iomem_resource, &rtc_resource); } mach_max_dma_address = 0xffffffff; /* * default MAX_DMA=0xffffffff * on all machines. If we don't * do so, the SCSI code will not * be able to allocate any mem * for transfers, unless we are * dealing with a Z2 mem only * system. /Jes */ mach_hwclk = amiga_hwclk; mach_set_clock_mmss = amiga_set_clock_mmss; mach_reset = amiga_reset; #ifdef CONFIG_HEARTBEAT mach_heartbeat = amiga_heartbeat; #endif /* Fill in the clock values (based on the 700 kHz E-Clock) */ amiga_masterclock = 40*amiga_eclock; /* 28 MHz */ amiga_colorclock = 5*amiga_eclock; /* 3.5 MHz */ /* clear all DMA bits */ amiga_custom.dmacon = DMAF_ALL; /* ensure that the DMA master bit is set */ amiga_custom.dmacon = DMAF_SETCLR | DMAF_MASTER; /* request all RAM */ for (i = 0; i < m68k_num_memory; i++) { ram_resource[i].name = (m68k_memory[i].addr >= 0x01000000) ? "32-bit Fast RAM" : (m68k_memory[i].addr < 0x00c00000) ? "16-bit Fast RAM" : "16-bit Slow RAM"; ram_resource[i].start = m68k_memory[i].addr; ram_resource[i].end = m68k_memory[i].addr+m68k_memory[i].size-1; request_resource(&iomem_resource, &ram_resource[i]); } /* initialize chipram allocator */ amiga_chip_init (); /* debugging using chipram */ if (!strcmp( m68k_debug_device, "mem" )){ if (!AMIGAHW_PRESENT(CHIP_RAM)) printk("Warning: no chipram present for debugging\n"); else { amiga_savekmsg_init(); amiga_console_driver.write = amiga_mem_console_write; register_console(&amiga_console_driver); } } /* our beloved beeper */ if (AMIGAHW_PRESENT(AMI_AUDIO)) amiga_init_sound(); /* * if it is an A3000, set the magic bit that forces * a hard rekick */ if (AMIGAHW_PRESENT(MAGIC_REKICK)) *(unsigned char *)ZTWO_VADDR(0xde0002) |= 0x80; }
__initfunc(void config_amiga(void)) { amiga_debug_init(); amiga_identify(); mach_sched_init = amiga_sched_init; mach_keyb_init = amiga_keyb_init; mach_kbdrate = amiga_kbdrate; kbd_reset_setup = amiga_kbd_reset_setup; mach_init_IRQ = amiga_init_IRQ; mach_default_handler = &amiga_default_handler; #ifndef CONFIG_APUS mach_request_irq = amiga_request_irq; mach_free_irq = amiga_free_irq; enable_irq = amiga_enable_irq; disable_irq = amiga_disable_irq; #endif mach_get_model = amiga_get_model; mach_get_hardware_list = amiga_get_hardware_list; mach_get_irq_list = amiga_get_irq_list; mach_gettimeoffset = amiga_gettimeoffset; if (AMIGAHW_PRESENT(A3000_CLK)){ mach_gettod = a3000_gettod; } else{ /* if (AMIGAHW_PRESENT(A2000_CLK)) */ mach_gettod = a2000_gettod; } mach_max_dma_address = 0xffffffff; /* * default MAX_DMA=0xffffffff * on all machines. If we don't * do so, the SCSI code will not * be able to allocate any mem * for transfers, unless we are * dealing with a Z2 mem only * system. /Jes */ mach_hwclk = amiga_hwclk; mach_set_clock_mmss = amiga_set_clock_mmss; #ifdef CONFIG_AMIGA_FLOPPY mach_floppy_setup = amiga_floppy_setup; #endif mach_reset = amiga_reset; conswitchp = &dummy_con; kd_mksound = amiga_mksound; #ifdef CONFIG_MAGIC_SYSRQ mach_sysrq_key = 0x5f; /* HELP */ mach_sysrq_shift_state = 0x03; /* SHIFT+ALTGR */ mach_sysrq_shift_mask = 0xff; /* all modifiers except CapsLock */ mach_sysrq_xlate = amiga_sysrq_xlate; #endif #ifdef CONFIG_HEARTBEAT mach_heartbeat = amiga_heartbeat; #endif /* Fill in the clock values (based on the 700 kHz E-Clock) */ amiga_masterclock = 40*amiga_eclock; /* 28 MHz */ amiga_colorclock = 5*amiga_eclock; /* 3.5 MHz */ /* clear all DMA bits */ custom.dmacon = DMAF_ALL; /* ensure that the DMA master bit is set */ custom.dmacon = DMAF_SETCLR | DMAF_MASTER; /* initialize chipram allocator */ amiga_chip_init (); /* debugging using chipram */ if (!strcmp( m68k_debug_device, "mem" )){ if (!AMIGAHW_PRESENT(CHIP_RAM)) printk("Warning: no chipram present for debugging\n"); else { amiga_savekmsg_init(); amiga_console_driver.write = amiga_mem_console_write; register_console(&amiga_console_driver); } } /* our beloved beeper */ if (AMIGAHW_PRESENT(AMI_AUDIO)) amiga_init_sound(); /* * if it is an A3000, set the magic bit that forces * a hard rekick */ if (AMIGAHW_PRESENT(MAGIC_REKICK)) *(unsigned char *)ZTWO_VADDR(0xde0002) |= 0x80; }