/*
* 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/types.h>
#include <linux/kernel.h>
#include <linux/mm.h>
#include <linux/tty.h>
#include <linux/console.h>
#include <linux/rtc.h>
#include <linux/init.h>
#include <linux/vt_kern.h>
#include <linux/delay.h>
#include <linux/interrupt.h>
#include <linux/zorro.h>
#include <linux/module.h>
#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/rtc.h>
#include <asm/machdep.h>
#include <asm/io.h>
unsigned long amiga_model;
EXPORT_SYMBOL(amiga_model);
unsigned long amiga_eclock;
EXPORT_SYMBOL(amiga_eclock);
unsigned long amiga_masterclock;
unsigned long amiga_colorclock;
EXPORT_SYMBOL(amiga_colorclock);
unsigned long amiga_chipset;
EXPORT_SYMBOL(amiga_chipset);
unsigned char amiga_vblank;
unsigned char amiga_psfreq;
struct amiga_hw_present amiga_hw_present;
EXPORT_SYMBOL(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 = {
[AMI_500-AMI_500] = s_a500,
[AMI_500PLUS-AMI_500] = s_a500p,
[AMI_600-AMI_500] = s_a600,
[AMI_1000-AMI_500] = s_a1000,
[AMI_1200-AMI_500] = s_a1200,
[AMI_2000-AMI_500] = s_a2000,
[AMI_2500-AMI_500] = s_a2500,
[AMI_3000-AMI_500] = s_a3000,
[AMI_3000T-AMI_500] = s_a3000t,
[AMI_3000PLUS-AMI_500] = s_a3000p,
[AMI_4000-AMI_500] = s_a4000,
[AMI_4000T-AMI_500] = s_a4000t,
[AMI_CDTV-AMI_500] = s_cdtv,
[AMI_CD32-AMI_500] = s_cd32,
[AMI_DRACO-AMI_500] = s_draco,
};
static char amiga_model_name[13] = "Amiga ";
static void amiga_sched_init(irq_handler_t handler);
/* amiga specific irq functions */
extern void amiga_init_IRQ(void);
static void amiga_get_model(char *model);
static int amiga_get_hardware_list(char *buffer);
/* amiga specific timer functions */
static unsigned long amiga_gettimeoffset(void);
static int a3000_hwclk(int, struct rtc_time *);
static int a2000_hwclk(int, struct rtc_time *);
static int amiga_set_clock_mmss(unsigned long);
static unsigned int amiga_get_ss(void);
extern void amiga_mksound(unsigned int count, unsigned int ticks);
static void amiga_reset(void);
extern void amiga_init_sound(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);
#ifdef CONFIG_HEARTBEAT
static void amiga_heartbeat(int on);
#endif
static struct console amiga_console_driver = {
.name = "debug",
.flags = CON_PRINTBUFFER,
.index = -1,
};
/*
* Motherboard Resources present in all Amiga models
*/
static struct {
struct resource _ciab, _ciaa, _custom, _kickstart;
} mb_resources = {
._ciab = {
.name = "CIA B", .start = 0x00bfd000, .end =