Subversion Repositories HelenOS

Rev

Rev 4346 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4346 Rev 4348
Line 24... Line 24...
24
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
25
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27
 */
27
 */
28
 
28
 
29
/** @addtogroup sparc64
29
/** @addtogroup sparc64
30
 * @{
30
 * @{
31
 */
31
 */
32
/** @file
32
/** @file
33
 */
33
 */
34
 
34
 
Line 90... Line 90...
90
 
90
 
91
/** Initilize I/O on the Serengeti machine. */
91
/** Initilize I/O on the Serengeti machine. */
92
static void serengeti_init(void)
92
static void serengeti_init(void)
93
{
93
{
94
#ifdef CONFIG_SGCN_KBD
94
#ifdef CONFIG_SGCN_KBD
-
 
95
    sgcn_instance_t *sgcn_instance = sgcnin_init();
95
    indev_t *kbrdin;
96
    if (sgcn_instance) {
96
    kbrdin = sgcnin_init();
97
        srln_instance_t *srln_instance = srln_init();
97
    if (kbrdin)
98
        if (srln_instance) {
-
 
99
            indev_t *sink = stdin_wire();
-
 
100
            indev_t *srln = srln_wire(srln_instance, sink);
98
        srlnin_init(kbrdin);
101
            sgcnin_wire(sgcn_instance, srln);
-
 
102
        }
-
 
103
    }
99
#endif
104
#endif
100
#ifdef CONFIG_SGCN_PRN
105
#ifdef CONFIG_SGCN_PRN
101
    sgcnout_init();
106
    sgcnout_init();
102
#endif
107
#endif
103
}
108
}
Line 116... Line 121...
116
        panic("Cannot find '/aliases'.");
121
        panic("Cannot find '/aliases'.");
117
   
122
   
118
    /* "def-cn" = "default console" */
123
    /* "def-cn" = "default console" */
119
    prop = ofw_tree_getprop(aliases, "def-cn");
124
    prop = ofw_tree_getprop(aliases, "def-cn");
120
   
125
   
121
    if ((!prop) || (!prop->value) || (strcmp(prop->value, "/sgcn") != 0)) {
126
    if ((!prop) || (!prop->value) || (str_cmp(prop->value, "/sgcn") != 0)) {
122
        standard_console_init(aliases);
127
        standard_console_init(aliases);
123
    } else {
128
    } else {
124
        serengeti_init();
129
        serengeti_init();
125
    }
130
    }
126
}
131
}
Line 132... Line 137...
132
void arch_grab_console(void)
137
void arch_grab_console(void)
133
{
138
{
134
#ifdef CONFIG_FB
139
#ifdef CONFIG_FB
135
    scr_redraw();
140
    scr_redraw();
136
#endif
141
#endif
137
    switch (kbd_type) {
142
   
138
#ifdef CONFIG_SGCN
143
#ifdef CONFIG_SGCN_KBD
139
    case KBD_SGCN:
-
 
140
        sgcn_grab();
144
    sgcn_grab();
141
        break;
-
 
142
#endif
145
#endif
143
    default:
-
 
144
        break;
-
 
145
    }
-
 
146
}
146
}
147
 
147
 
148
/** Return console to userspace
148
/** Return console to userspace
149
 *
149
 *
150
 */
150
 */
151
void arch_release_console(void)
151
void arch_release_console(void)
152
{
152
{
153
    switch (kbd_type) {
-
 
154
#ifdef CONFIG_SGCN
153
#ifdef CONFIG_SGCN_KBD
155
    case KBD_SGCN:
-
 
156
        sgcn_release();
154
    sgcn_release();
157
        break;
-
 
158
#endif
155
#endif
159
    default:
-
 
160
        break;
-
 
161
    }
-
 
162
}
156
}
163
 
157
 
164
/** @}
158
/** @}
165
 */
159
 */