config.c
上传用户:lgb322
上传日期:2013-02-24
资源大小:30529k
文件大小:27k
- /*
- * BK Id: SCCS/s.config.c 1.12 09/18/01 11:19:06 paulus
- */
- #define m68k_debug_device debug_device
- /*
- * linux/arch/m68k/amiga/config.c
- *
- * Copyright (C) 1993 Hamish Macdonald
- *
- * This file is subject to the terms and conditions of the GNU General Public
- * License. See the file COPYING in the main directory of this archive
- * for more details.
- */
- /*
- * Miscellaneous Amiga stuff
- */
- #include <linux/config.h>
- #include <linux/types.h>
- #include <linux/kernel.h>
- #include <linux/mm.h>
- #include <linux/kd.h>
- #include <linux/tty.h>
- #include <linux/console.h>
- #include <linux/init.h>
- #ifdef CONFIG_ZORRO
- #include <linux/zorro.h>
- #endif
- #include <asm/bootinfo.h>
- #include <asm/setup.h>
- #include <asm/system.h>
- #include <asm/pgtable.h>
- #include <asm/amigahw.h>
- #include <asm/amigaints.h>
- #include <asm/irq.h>
- #include <asm/keyboard.h>
- #include <asm/machdep.h>
- #include <asm/io.h>
- unsigned long powerup_PCI_present;
- unsigned long powerup_BPPCPLUS_present;
- unsigned long amiga_model;
- unsigned long amiga_eclock;
- unsigned long amiga_masterclock;
- unsigned long amiga_colorclock;
- unsigned long amiga_chipset;
- unsigned char amiga_vblank;
- unsigned char amiga_psfreq;
- struct amiga_hw_present amiga_hw_present;
- static char s_a500[] __initdata = "A500";
- static char s_a500p[] __initdata = "A500+";
- static char s_a600[] __initdata = "A600";
- static char s_a1000[] __initdata = "A1000";
- static char s_a1200[] __initdata = "A1200";
- static char s_a2000[] __initdata = "A2000";
- static char s_a2500[] __initdata = "A2500";
- static char s_a3000[] __initdata = "A3000";
- static char s_a3000t[] __initdata = "A3000T";
- static char s_a3000p[] __initdata = "A3000+";
- static char s_a4000[] __initdata = "A4000";
- static char s_a4000t[] __initdata = "A4000T";
- static char s_cdtv[] __initdata = "CDTV";
- static char s_cd32[] __initdata = "CD32";
- static char s_draco[] __initdata = "Draco";
- static char *amiga_models[] __initdata = {
- s_a500, s_a500p, s_a600, s_a1000, s_a1200, s_a2000, s_a2500, s_a3000,
- s_a3000t, s_a3000p, s_a4000, s_a4000t, s_cdtv, s_cd32, s_draco,
- };
- static char amiga_model_name[13] = "Amiga ";
- extern char m68k_debug_device[];
- static void amiga_sched_init(void (*handler)(int, void *, struct pt_regs *));
- /* amiga specific keyboard functions */
- extern int amiga_keyb_init(void);
- extern int amiga_kbdrate (struct kbd_repeat *);
- /* amiga specific irq functions */
- extern void amiga_init_IRQ (void);
- extern void (*amiga_default_handler[]) (int, void *, struct pt_regs *);
- extern int amiga_request_irq (unsigned int irq,
- void (*handler)(int, void *, struct pt_regs *),
- unsigned long flags, const char *devname,
- void *dev_id);
- extern void amiga_free_irq (unsigned int irq, void *dev_id);
- extern void amiga_enable_irq (unsigned int);
- extern void amiga_disable_irq (unsigned int);
- static void amiga_get_model(char *model);
- static int amiga_get_hardware_list(char *buffer);
- extern int amiga_get_irq_list (char *);
- /* amiga specific timer functions */
- static unsigned long amiga_gettimeoffset (void);
- static void a3000_gettod (int *, int *, int *, int *, int *, int *);
- static void a2000_gettod (int *, int *, int *, int *, int *, int *);
- static int amiga_hwclk (int, struct hwclk_time *);
- static int amiga_set_clock_mmss (unsigned long);
- extern void amiga_mksound( unsigned int count, unsigned int ticks );
- #ifdef CONFIG_AMIGA_FLOPPY
- extern void amiga_floppy_setup(char *, int *);
- #endif
- static void amiga_reset (void);
- static int amiga_wait_key (struct console *co);
- extern void amiga_init_sound(void);
- static void amiga_savekmsg_init(void);
- static void amiga_mem_console_write(struct console *co, const char *b,
- unsigned int count);
- void amiga_serial_console_write(struct console *co, const char *s,
- unsigned int count);
- static void amiga_debug_init(void);
- #ifdef CONFIG_HEARTBEAT
- static void amiga_heartbeat(int on);
- #endif
- static struct console amiga_console_driver = {
- name: "debug",
- wait_key: amiga_wait_key,
- flags: CON_PRINTBUFFER,
- index: -1,
- };
- #ifdef CONFIG_MAGIC_SYSRQ
- char amiga_sysrq_xlate[128] =
- "