1 /*
2  * Setup kernel for a Sun3x machine
3  *
4  * (C) 1999 Thomas Bogendoerfer (tsbogend@alpha.franken.de)
5  *
6  * based on code from Oliver Jowett <oliver@jowett.manawatu.gen.nz>
7  */
8 
9 #include <linux/types.h>
10 #include <linux/mm.h>
11 #include <linux/console.h>
12 #include <linux/init.h>
13 
14 #include <asm/system.h>
15 #include <asm/machdep.h>
16 #include <asm/irq.h>
17 #include <asm/sun3xprom.h>
18 #include <asm/sun3ints.h>
19 #include <asm/setup.h>
20 #include <asm/oplib.h>
21 
22 #include "time.h"
23 
24 volatile char *clock_va;
25 extern volatile unsigned char *sun3_intreg;
26 
27 extern void sun3_get_model(char *model);
28 
sun3x_keyb_init(void)29 int __init sun3x_keyb_init(void)
30 {
31 	return 0;
32 }
33 
sun3x_kbdrate(struct kbd_repeat * r)34 int sun3x_kbdrate(struct kbd_repeat *r)
35 {
36 	return 0;
37 }
38 
sun3x_kbd_leds(unsigned int i)39 void sun3x_kbd_leds(unsigned int i)
40 {
41 
42 }
43 
sun3_leds(unsigned int i)44 void sun3_leds(unsigned int i)
45 {
46 
47 }
48 
sun3x_get_hardware_list(char * buffer)49 static int sun3x_get_hardware_list(char *buffer)
50 {
51 
52 	int len = 0;
53 
54 	len += sprintf(buffer + len, "PROM Revision:\t%s\n",
55 		       romvec->pv_monid);
56 
57 	return len;
58 
59 }
60 
61 /*
62  *  Setup the sun3x configuration info
63  */
config_sun3x(void)64 void __init config_sun3x(void)
65 {
66 
67 	sun3x_prom_init();
68 
69 	mach_get_irq_list	 = sun3_get_irq_list;
70 	mach_max_dma_address = 0xffffffff; /* we can DMA anywhere, whee */
71 
72 #ifdef CONFIG_VT
73 	mach_keyb_init       = sun3x_keyb_init;
74 	mach_kbdrate         = sun3x_kbdrate;
75 	mach_kbd_leds        = sun3x_kbd_leds;
76 #endif
77 
78 	mach_default_handler = &sun3_default_handler;
79 	mach_sched_init      = sun3x_sched_init;
80 	mach_init_IRQ        = sun3_init_IRQ;
81 	enable_irq           = sun3_enable_irq;
82 	disable_irq          = sun3_disable_irq;
83 	mach_request_irq     = sun3_request_irq;
84 	mach_free_irq        = sun3_free_irq;
85 	mach_process_int     = sun3_process_int;
86 
87 	mach_gettimeoffset   = sun3x_gettimeoffset;
88 	mach_reset           = sun3x_reboot;
89 
90 	mach_gettod          = sun3x_gettod;
91 	mach_hwclk           = sun3x_hwclk;
92 	mach_get_model       = sun3_get_model;
93 	mach_get_hardware_list = sun3x_get_hardware_list;
94 
95 	sun3_intreg = (unsigned char *)SUN3X_INTREG;
96 
97 	/* only the serial console is known to work anyway... */
98 #if 0
99 	switch (*(unsigned char *)SUN3X_EEPROM_CONS) {
100 	case 0x10:
101 		serial_console = 1;
102 		conswitchp = NULL;
103 		break;
104 	case 0x11:
105 		serial_console = 2;
106 		conswitchp = NULL;
107 		break;
108 	default:
109 		serial_console = 0;
110 		conswitchp = &dummy_con;
111 		break;
112 	}
113 #endif
114 
115 }
116 
117