File: /usr/src/linux/arch/m68k/hp300/config.c

1     /*
2      *  linux/arch/m68k/hp300/config.c
3      *
4      *  Copyright (C) 1998 Philip Blundell <philb@gnu.org>
5      *
6      *  This file contains the HP300-specific initialisation code.  It gets
7      *  called by setup.c.
8      */
9     
10     #include <linux/config.h>
11     #include <linux/types.h>
12     #include <linux/mm.h>
13     #include <linux/kd.h>
14     #include <linux/tty.h>
15     #include <linux/console.h>
16     #include <linux/interrupt.h>
17     #include <linux/init.h>
18     #include <asm/machdep.h>
19     #include <asm/blinken.h>
20     #include <asm/io.h>                               /* readb() and writeb() */
21     #include <asm/hwtest.h>                           /* hwreg_present() */
22     
23     #include "ints.h"
24     #include "time.h"
25     
26     extern void hp300_reset(void);
27     extern void (*hp300_default_handler[])(int, void *, struct pt_regs *);
28     extern int hp300_get_irq_list(char *buf);
29     
30     #ifdef CONFIG_VT
31     extern int hp300_keyb_init(void);
32     #else
33     /* Dummy function for when there is no keyboard. */
34     int __init hp300_keyb_init(void)
35     {
36     }
37     #endif
38     
39     #ifdef CONFIG_HEARTBEAT
40     static void hp300_pulse(int x)
41     {
42        if (x)
43           blinken_leds(0xfe);
44        else
45           blinken_leds(0xff);
46     }
47     #endif
48     
49     static int hp300_kbdrate(struct kbd_repeat *k)
50     {
51       return 0;
52     }
53     
54     static void hp300_kbd_leds(unsigned int leds)
55     {
56     }
57     
58     static void hp300_get_model(char *model)
59     {
60       strcpy(model, "HP9000/300");
61     }
62     
63     void __init config_hp300(void)
64     {
65       mach_sched_init      = hp300_sched_init;
66       mach_keyb_init       = hp300_keyb_init;
67       mach_kbdrate         = hp300_kbdrate;
68       mach_kbd_leds        = hp300_kbd_leds;
69       mach_init_IRQ        = hp300_init_IRQ;
70       mach_request_irq     = hp300_request_irq;
71       mach_free_irq        = hp300_free_irq;
72       mach_get_model       = hp300_get_model;
73       mach_get_irq_list    = hp300_get_irq_list;
74       mach_gettimeoffset   = hp300_gettimeoffset;
75       mach_default_handler = &hp300_default_handler;
76     #if 0
77       mach_gettod          = hp300_gettod;
78     #endif
79       mach_reset           = hp300_reset;
80     #ifdef CONFIG_HEARTBEAT
81       mach_heartbeat       = hp300_pulse;
82     #endif
83     #ifdef CONFIG_DUMMY_CONSOLE
84       conswitchp	       = &dummy_con;
85     #endif
86       mach_max_dma_address = 0xffffffff;
87     }
88