Subversion Repositories HelenOS

Rev

Rev 4111 | Rev 4220 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4111 Rev 4119
Line 60... Line 60...
60
 * @param aliases   the "/aliases" OBP node
60
 * @param aliases   the "/aliases" OBP node
61
 */
61
 */
62
static void standard_console_init(ofw_tree_node_t *aliases)
62
static void standard_console_init(ofw_tree_node_t *aliases)
63
{
63
{
64
#ifdef CONFIG_FB
64
#ifdef CONFIG_FB
65
    ofw_tree_property_t *prop;
-
 
66
    ofw_tree_node_t *screen;
-
 
67
    ofw_tree_node_t *keyboard;
-
 
68
   
-
 
69
    prop = ofw_tree_getprop(aliases, "screen");
65
    ofw_tree_property_t *prop_scr = ofw_tree_getprop(aliases, "screen");
70
    if (!prop)
66
    if (!prop_scr)
71
        panic("Cannot find property 'screen'.");
67
        panic("Cannot find property 'screen'.");
72
    if (!prop->value)
68
    if (!prop_scr->value)
73
        panic("Cannot find screen alias.");
69
        panic("Cannot find screen alias.");
74
    screen = ofw_tree_lookup(prop->value);
70
    ofw_tree_node_t *screen = ofw_tree_lookup(prop_scr->value);
75
    if (!screen)
71
    if (!screen)
76
        panic("Cannot find %s.", prop->value);
72
        panic("Cannot find %s.", prop_scr->value);
77
 
73
   
78
    scr_init(screen);
74
    scr_init(screen);
-
 
75
#endif
79
 
76
 
-
 
77
#ifdef CONFIG_SUN_KBD
80
    prop = ofw_tree_getprop(aliases, "keyboard");
78
    ofw_tree_property_t *prop_kbd = ofw_tree_getprop(aliases, "keyboard");
81
    if (!prop)
79
    if (!prop_kbd)
82
        panic("Cannot find property 'keyboard'.");
80
        panic("Cannot find property 'keyboard'.");
83
    if (!prop->value)
81
    if (!prop_kbd->value)
84
        panic("Cannot find keyboard alias.");
82
        panic("Cannot find keyboard alias.");
85
    keyboard = ofw_tree_lookup(prop->value);
83
    ofw_tree_node_t *keyboard = ofw_tree_lookup(prop_kbd->value);
86
    if (!keyboard)
84
    if (!keyboard)
87
        panic("Cannot find %s.", prop->value);
85
        panic("Cannot find %s.", prop_kbd->value);
88
 
86
   
89
    kbd_init(keyboard);
87
    kbd_init(keyboard);
90
#else
-
 
91
    panic("Standard console requires FB, "
-
 
92
          "but the kernel is not compiled with FB support.");
-
 
93
#endif
88
#endif
94
}
89
}
95
 
90
 
96
/** Initilize I/O on the Serengeti machine. */
91
/** Initilize I/O on the Serengeti machine. */
97
static void serengeti_init(void)
92
static void serengeti_init(void)