This source file includes following definitions.
- prom_reboot
- prom_cmdline
- prom_halt
- prom_get_idprom
- prom_version
- prom_getrev
- prom_getprev
1
2
3
4
5
6
7
8
9 #include <linux/types.h>
10 #include <linux/kernel.h>
11 #include <linux/sched.h>
12 #include <asm/sun3-head.h>
13 #include <asm/idprom.h>
14 #include <asm/openprom.h>
15 #include <asm/oplib.h>
16 #include <asm/movs.h>
17
18
19 void
20 prom_reboot(char *bcommand)
21 {
22 unsigned long flags;
23 local_irq_save(flags);
24 (*(romvec->pv_reboot))(bcommand);
25 local_irq_restore(flags);
26 }
27
28
29
30
31 void
32 prom_cmdline(void)
33 {
34 }
35
36
37
38
39 void
40 prom_halt(void)
41 {
42 unsigned long flags;
43 again:
44 local_irq_save(flags);
45 (*(romvec->pv_halt))();
46 local_irq_restore(flags);
47 goto again;
48 }
49
50 typedef void (*sfunc_t)(void);
51
52
53
54
55
56 unsigned char
57 prom_get_idprom(char *idbuf, int num_bytes)
58 {
59 int i, oldsfc;
60 GET_SFC(oldsfc);
61 SET_SFC(FC_CONTROL);
62 for(i=0;i<num_bytes; i++)
63 {
64
65
66
67
68 int c;
69 GET_CONTROL_BYTE(SUN3_IDPROM_BASE + i, c);
70 idbuf[i] = c;
71 }
72 SET_SFC(oldsfc);
73 return idbuf[0];
74 }
75
76
77 int
78 prom_version(void)
79 {
80 return romvec->pv_romvers;
81 }
82
83
84 int
85 prom_getrev(void)
86 {
87 return prom_rev;
88 }
89
90
91 int
92 prom_getprev(void)
93 {
94 return prom_prev;
95 }